示例#1
0
 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);
     }
 }
示例#2
0
        /// <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);
        }
示例#3
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);
        }
示例#4
0
        /// <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);
        }
示例#5
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);
 }
示例#6
0
 /// <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;
 }
示例#7
0
 /// <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;
 }