public Sonifier()
        {
            beats = new PeakAnalyser();
            PeakAnalyser.FootPeakDetected += new PeakAnalyser.PeakEventHandler(Foot_PeakDetected);
            //metronome.Elapsed += new ElapsedEventHandler(metronome_beat);
            //metronome.Enabled = false;
            //metronome.Interval = 2000;
            //metronome.Enabled = true;

            soundPath = new DirectoryInfo(Environment.CurrentDirectory).Parent.FullName + @"\Sounds";

            string[] soundFileList = new string[NUMBER_OF_SOUNDS_TO_LOAD]  {
                "cymbal.wav",
                "Conga2.wav",
                "clave.wav",
                "bleep.wav"
            };

            for (int i = 0; i < soundFileList.Length; i++)
            {
                if (File.Exists(soundPath + @"\" + soundFileList[i]))
                {
                    try
                    {
                        soundPlayerList[i] = new SoundPlayer(soundPath + @"\" + soundFileList[i]);
                    }
                    catch (System.IO.FileNotFoundException ex)
                    {
                        System.Windows.Forms.MessageBox.Show("Cannot load sound files. Please ensure that the \"Sounds\" folder is in the executable partent directory. Exception Message: " + ex.Message, "Cannot Find Sound Files");
                        Environment.Exit(-1);
                    }
                }
            }

            //leftToe_Sound = new SoundPlayer(soundPath + "cymbal.wav");
            //rightToe_Sound = new SoundPlayer(soundPath + "Conga2.wav");
            //leftHeel_Sound = new SoundPlayer(soundPath + "clave.wav");
            //rightHeel_Sound = new SoundPlayer(soundPath + "bleep.wav");

            try
            {
                soundPlayerList[0].Load();
                soundPlayerList[1].Load();
                soundPlayerList[2].Load();
                soundPlayerList[3].Load();
            }
            catch (FileNotFoundException ex)
            {
                System.Windows.Forms.MessageBox.Show("Cannot load sound files. Please ensure that the \"Sounds\" folder is in the executable parent directory. Exception Message: " + ex.Message, "Cannot Find Sound Files");
                Environment.Exit(-1);
            }
            catch (System.NullReferenceException exNull)
            {
                System.Windows.Forms.MessageBox.Show("Cannot load sound files. Please ensure that the \"Sounds\" folder is in the executable parent directory. Exception Message: " + exNull.Message, "Cannot Load Sound Files");
                Environment.Exit(-1);
            }
        }
        public Sonifier()
        {
            beats = new PeakAnalyser();
            PeakAnalyser.FootPeakDetected += new PeakAnalyser.PeakEventHandler(Foot_PeakDetected);
            //metronome.Elapsed += new ElapsedEventHandler(metronome_beat);
            //metronome.Enabled = false;
            //metronome.Interval = 2000;
            //metronome.Enabled = true;

            soundPath = new DirectoryInfo(Environment.CurrentDirectory).Parent.FullName + @"\Sounds";

            string[] soundFileList = new string[NUMBER_OF_SOUNDS_TO_LOAD]  {"cymbal.wav",
                                                                            "Conga2.wav",
                                                                            "clave.wav",
                                                                            "bleep.wav"};

            for (int i = 0; i < soundFileList.Length; i++)
            {
                if (File.Exists(soundPath + @"\" + soundFileList[i]))
                {
                    try
                    {
                        soundPlayerList[i] = new SoundPlayer(soundPath + @"\" + soundFileList[i]);
                    }
                    catch (System.IO.FileNotFoundException ex)
                    {
                        System.Windows.Forms.MessageBox.Show("Cannot load sound files. Please ensure that the \"Sounds\" folder is in the executable partent directory. Exception Message: " + ex.Message, "Cannot Find Sound Files");
                        Environment.Exit(-1);
                    }
                }
            }

            //leftToe_Sound = new SoundPlayer(soundPath + "cymbal.wav");
            //rightToe_Sound = new SoundPlayer(soundPath + "Conga2.wav");
            //leftHeel_Sound = new SoundPlayer(soundPath + "clave.wav");
            //rightHeel_Sound = new SoundPlayer(soundPath + "bleep.wav");

            try
            {
                soundPlayerList[0].Load();
                soundPlayerList[1].Load();
                soundPlayerList[2].Load();
                soundPlayerList[3].Load();
            }
            catch (FileNotFoundException ex)
            {
                System.Windows.Forms.MessageBox.Show("Cannot load sound files. Please ensure that the \"Sounds\" folder is in the executable parent directory. Exception Message: " + ex.Message, "Cannot Find Sound Files");
                Environment.Exit(-1);
            }
            catch (System.NullReferenceException exNull)
            {
                System.Windows.Forms.MessageBox.Show("Cannot load sound files. Please ensure that the \"Sounds\" folder is in the executable parent directory. Exception Message: " + exNull.Message, "Cannot Load Sound Files");
                Environment.Exit(-1);
            }

        }
 public Sonifier()
 {
     beats = new PeakAnalyser();
     PeakAnalyser.FootPeakDetected += new PeakAnalyser.PeakEventHandler(Foot_PeakDetected);
     //metronome.Elapsed += new ElapsedEventHandler(metronome_beat);
     //metronome.Enabled = false;
     //metronome.Interval = 2000;
     //metronome.Enabled = true;
     
     
     leftToe_Sound = new SoundPlayer(soundPath + "cymbal.wav");
     rightToe_Sound = new SoundPlayer(soundPath + "Conga2.wav");
     leftHeel_Sound = new SoundPlayer(soundPath + "clave.wav");
     rightHeel_Sound = new SoundPlayer(soundPath + "bleep.wav");
     leftToe_Sound.Load();
     rightToe_Sound.Load();
     leftHeel_Sound.Load();
     rightHeel_Sound.Load();
 }
        public Sonifier()
        {
            beats = new PeakAnalyser();
            PeakAnalyser.FootPeakDetected += new PeakAnalyser.PeakEventHandler(Foot_PeakDetected);
            //metronome.Elapsed += new ElapsedEventHandler(metronome_beat);
            //metronome.Enabled = false;
            //metronome.Interval = 2000;
            //metronome.Enabled = true;


            leftToe_Sound   = new SoundPlayer(soundPath + "cymbal.wav");
            rightToe_Sound  = new SoundPlayer(soundPath + "Conga2.wav");
            leftHeel_Sound  = new SoundPlayer(soundPath + "clave.wav");
            rightHeel_Sound = new SoundPlayer(soundPath + "bleep.wav");
            leftToe_Sound.Load();
            rightToe_Sound.Load();
            leftHeel_Sound.Load();
            rightHeel_Sound.Load();
        }
 public AsymmetryAnalysis()
 {
     strideDiagnostics              = new StrideDiagnostics();
     peaks                          = new PeakAnalyser();
     PeakAnalyser.FootPeakDetected += new PeakAnalyser.PeakEventHandler(GaitProcessor_PeakDetected);
 }
 public AsymmetryAnalysis()
 {
     strideDiagnostics = new StrideDiagnostics();
     peaks = new PeakAnalyser();
     PeakAnalyser.FootPeakDetected += new PeakAnalyser.PeakEventHandler(GaitProcessor_PeakDetected);
 }