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); } }
public override ChordOn CloneChordOn() { ChordOn chordOn = new ChordOn(this.BasicMidiChord); foreach (NoteOff noteOff in this.Notes) { chordOn.AddNote(noteOff.CloneNoteOn()); } return(chordOn); }
public override ChordOn CloneChordOn() { ChordOn chordOn = new ChordOn(this.BasicMidiChord); foreach (NoteOn noteOn in this.Notes) { chordOn.AddNote(noteOn.CloneNoteOn()); } chordOn.GetIdleOrnamentBW = GetIdleOrnamentBW; return(chordOn); }
public BasicMidiChord(int channel, MidiChord midiChord, BasicMidiChordDef bmcd, int realMsDuration) { MidiChord = midiChord; //MsPosition = bmcd.MsPosition; MsDuration = realMsDuration; if(bmcd.BankIndex != null) { BankControl = new BankControl(channel, (byte)bmcd.BankIndex); } if(bmcd.PatchIndex != null) { PatchControl = new PatchControl(channel, (byte)bmcd.PatchIndex); } ChordOn = new ChordOn(this); SetChordOn(channel, bmcd.Pitches, bmcd.Velocities); if(bmcd.HasChordOff) { ChordOff = new ChordOff(this); SetChordOff(channel, bmcd.Pitches); } }
public BasicMidiChord(int channel, MidiChord midiChord, BasicMidiChordDef bmcd, int realMsDuration) { MidiChord = midiChord; //MsPosition = bmcd.MsPosition; MsDuration = realMsDuration; if (bmcd.BankIndex != null) { BankControl = new BankControl(channel, (byte)bmcd.BankIndex); } if (bmcd.PatchIndex != null) { PatchControl = new PatchControl(channel, (byte)bmcd.PatchIndex); } ChordOn = new ChordOn(this); SetChordOn(channel, bmcd.Pitches, bmcd.Velocities); if (bmcd.HasChordOff) { ChordOff = new ChordOff(this); SetChordOff(channel, bmcd.Pitches); } }
public override ChordOn CloneChordOn() { ChordOn chordOn = new ChordOn(this.BasicMidiChord); foreach(NoteOn noteOn in this.Notes) chordOn.AddNote(noteOn.CloneNoteOn()); chordOn.GetIdleOrnamentBW = GetIdleOrnamentBW; return chordOn; }
public override ChordOn CloneChordOn() { ChordOn chordOn = new ChordOn(this.BasicMidiChord); foreach(NoteOff noteOff in this.Notes) chordOn.AddNote(noteOff.CloneNoteOn()); return chordOn; }
public void AddNote(int channel, int pitch, int velocity) { ChordOn.AddNote(new NoteOn(channel, pitch, velocity)); ChordOff.AddNote(new NoteOff(channel, pitch, 64)); }