Esempio n. 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);
     }
 }
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
        /// <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);
        }
Esempio n. 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);
 }
Esempio n. 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;
 }