public OutputManager(UserSettings settings)
        {
            // Create a new directory if it isn't there yet
            if (!Directory.Exists("output"))
                Directory.CreateDirectory("output");

            // Create a new file for the current subject
            CreateNewFile(settings);

            iterations = 1;
        }
        private void CreateNewFile(UserSettings settings)
        {
            // Create a file name
            file = "output/output-" + settings.Subject + ".csv";

            // Make sure file name is unique
            int i = 1;
            while (File.Exists(file))
            {
                file = "output/output-" + settings.Subject + " (" + i + ").csv";
                i++;
            }

            // Put all initial user settings and headings in the file
            using (StreamWriter sw = new StreamWriter(file, true))
            {
                sw.WriteLine("Test subject;" + settings.Subject);
                sw.WriteLine("Gender;" + (settings.Gender == 'm' ? "Male" : "Female"));
                sw.WriteLine("Gender preferences;" + string.Join(", ", settings.GenrePreferences.ToArray()));
                sw.WriteLine("Goal emotion;" + CharToEmotion(settings.GoalEmotion) + "\n");
                sw.WriteLine("Iteration;Song ID;Current emotion;Happy;Sad;Anger;Fear;Neutral;Arousal;Valence");
            }
        }
        public TestAudio(UserSettings settings)
        {
            InitializeComponent();
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.settings = settings;
            this.om = new OutputManager(settings);
            this.ec = new EmotionCalculator();

            var series1 = new Series
            {
                Name = "Series1",
                Color = Color.Green,
                IsVisibleInLegend = false,
                IsXValueIndexed = true,
            };

            GlobalVariables.WaveChart = waveChart;

            waveChart.ChartAreas[0].AxisX.Maximum = 4000;
            waveChart.ChartAreas[0].AxisX.Minimum = 0;
            waveChart.ChartAreas[0].AxisY.Maximum = 0.05f;
            waveChart.ChartAreas[0].AxisY.Minimum = 0;
            waveChart.ChartAreas[0].AxisY.Enabled = AxisEnabled.False;
        }