Esempio n. 1
0
        public override void AddNote(NoteMessage note)
        {
            // All notes in a ChordOff must have the same channel.
            Debug.Assert(note is NoteOff && ((_notes.Count == 0) || (note.Channel == _notes[0].Channel)));
            NoteOff noteOff = new NoteOff();

            noteOff.Channel  = note.Channel;
            noteOff.Pitch    = note.Pitch;
            noteOff.Velocity = 64;
            _notes.Add(noteOff);
        }
Esempio n. 2
0
        public override void AddNote(NoteMessage note)
        {
            // All notes in a ChordOn must have the same channel.
            Debug.Assert(note is NoteOn && ((_notes.Count == 0) || (note.Channel == _notes[0].Channel)));
            NoteOn newNote = new NoteOn();

            newNote.Channel  = note.Channel;
            newNote.Pitch    = note.Pitch;
            newNote.Velocity = note.Velocity;
            _notes.Add(newNote);
        }
Esempio n. 3
0
 public void RemoveNote(NoteMessage note)
 {
     if (_notes.Count > 0)
     {
         for (int i = _notes.Count - 1; i >= 0; i--)
         {
             if (note.Channel == _notes[i].Channel &&
                 note.Pitch == _notes[i].Pitch &&
                 note.Velocity == _notes[i].Velocity)
             {
                 _notes.RemoveAt(i);
                 break;
             }
         }
     }
 }
Esempio n. 4
0
 public void RemoveNote(NoteMessage note)
 {
     if(_notes.Count > 0)
         for(int i = _notes.Count - 1 ; i >= 0 ; i--)
         {
             if(note.Channel == _notes[i].Channel
                 && note.Pitch == _notes[i].Pitch
                 && note.Velocity == _notes[i].Velocity)
             {
                 _notes.RemoveAt(i);
                 break;
             }
         }
 }
Esempio n. 5
0
 public abstract void AddNote(NoteMessage note);
Esempio n. 6
0
 public override void AddNote(NoteMessage note)
 {
     // All notes in a ChordOn must have the same channel.
     Debug.Assert(note is NoteOn && ((_notes.Count == 0) || (note.Channel == _notes[0].Channel)));
     NoteOn newNote = new NoteOn();
     newNote.Channel = note.Channel;
     newNote.Pitch = note.Pitch;
     newNote.Velocity = note.Velocity;
     _notes.Add(newNote);
 }
Esempio n. 7
0
 public override void AddNote(NoteMessage note)
 {
     // All notes in a ChordOff must have the same channel.
     Debug.Assert(note is NoteOff && ((_notes.Count == 0) || (note.Channel == _notes[0].Channel)));
     NoteOff noteOff = new NoteOff();
     noteOff.Channel = note.Channel;
     noteOff.Pitch = note.Pitch;
     noteOff.Velocity = 64;
     _notes.Add(noteOff);
 }
Esempio n. 8
0
 public abstract void AddNote(NoteMessage note);