Exemplo n.º 1
0
 public MainForm()
 {
     InitializeComponent();
     this.db = new SongStore();
     this.musicalAnalyzer = new MusicalAnalyzer();
     this.musicalAnalyzer.ProcessingFinished += new EventHandler <AudioProcessingFinishedEventArgs>(onEntradaProcessada);
 }
Exemplo n.º 2
0
        public void SetUpTestEnvironment()
        {
            this.musicalAnalyzer = new MusicalAnalyzer();
            this.musicalAnalyzer.NotesDetected      += new EventHandler <NotesDetectedEventArgs>(onNotesDetected);
            this.musicalAnalyzer.ChordDetected      += new EventHandler <ChordDetectedEventArgs>(onChordDetected);
            this.musicalAnalyzer.ProcessingFinished += new EventHandler <AudioProcessingFinishedEventArgs>(onProcessingFinished);

            this.notesBeingPlayed = new Dictionary <MusicalNote, double>();
            this.chord            = null;
            this.chordSequence    = string.Empty;
        }
Exemplo n.º 3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.musicalAnalyzer = new MusicalAnalyzer();
            this.musicalAnalyzer.NotesDetected += new EventHandler <NotesDetectedEventArgs>(musicalAnalyzer_NotesDetected);
            this.musicalAnalyzer.ChordDetected += new EventHandler <ChordDetectedEventArgs>(musicalAnalyzer_ChordDetected);

            foreach (Chord chord in MusicalAnalyzer.ChordDictionary)
            {
                ListViewItem item = chordsView.Items.Add(chord.Name);
                item.SubItems.Add(chord.ToString());
            }

            //this.musicalAnalyzer.AnalyzeAudio(@"..\..\..\Sounds\G.wav");
            this.musicalAnalyzer.AnalyzeAudio();

            this.chordsView.Focus();
        }