private void SetChordOff(int channel, List <byte> midiPitches) { for (int i = 0; i < midiPitches.Count; i++) { NoteOff noteOff = new NoteOff(channel, midiPitches[i], 64); ChordOff.AddNote(noteOff); } }
/// <summary> /// This NoteOn is converted to a NoteOff having the same Channel and Pitch, /// The new NoteOff has Velocity 64 by default. /// For a description of MIDI note-off, see http://users.adelphia.net/~jgglatt/tech/midispec.htm /// </summary> public override NoteOff CloneNoteOff() { // 64 is usually the default velocity for NoteOffs - see // NoteOff clone = new NoteOff(this.Channel, this.Pitch, 64); return(clone); }
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); }
/// <summary> /// A duplicate of this NoteOff is created. /// </summary> /// <returns></returns> public override NoteOff CloneNoteOff() { NoteOff clone = new NoteOff(this.Channel, this.Pitch, this.Velocity); return(clone); }
/// <summary> /// A duplicate of this NoteOff is created. /// </summary> /// <returns></returns> public override NoteOff CloneNoteOff() { NoteOff clone = new NoteOff(this.Channel, this.Pitch, this.Velocity); return clone; }
/// <summary> /// This NoteOn is converted to a NoteOff having the same Channel and Pitch, /// The new NoteOff has Velocity 64 by default. /// For a description of MIDI note-off, see http://users.adelphia.net/~jgglatt/tech/midispec.htm /// </summary> public override NoteOff CloneNoteOff() { // 64 is usually the default velocity for NoteOffs - see // NoteOff clone = new NoteOff(this.Channel, this.Pitch, 64); return clone; }