Example #1
0
 private void SetChordOn(int channel, List <byte> midiPitches, List <byte> midiVelocities)
 {
     for (int i = 0; i < midiPitches.Count; i++)
     {
         NoteOn noteOn = new NoteOn(channel, midiPitches[i], midiVelocities[i]);
         ChordOn.AddNote(noteOn);
     }
 }
Example #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);
        }
Example #3
0
        /// <summary>
        /// A duplicate of this NoteOn is created.
        /// </summary>
        /// <returns></returns>
        public override NoteOn CloneNoteOn()
        {
            NoteOn clone = new NoteOn(this.Channel, this.Pitch, this.Velocity);

            return(clone);
        }
Example #4
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);
 }
Example #5
0
 /// <summary>
 /// A duplicate of this NoteOn is created.
 /// </summary>
 /// <returns></returns>
 public override NoteOn CloneNoteOn()
 {
     NoteOn clone = new NoteOn(this.Channel, this.Pitch, this.Velocity);
     return clone;
 }