* Creates a MooNote of the given pitch, velocity and length in the current track.
*/
public MooNote (int pitch, int velocity, int length) {
- // MidiEvent(MidiMessage message, long tick)
noteOnMsg = new ShortMessage();
noteOffMsg = new ShortMessage();
noteOnMsg.setMessage(ShortMessage.NOTE_ON, pitch, velocity);
noteOffMsg.setMessage(ShortMessage.NOTE_OFF, pitch, velocity);
// noteOnTime = ???;
noteOffTime = noteOnTime + length;
- noteOnEvent = new MidiEvent(noteOnMsg, noteOnTime)
- noteOffEvent = new MidiEvent(noteOffMsg, noteOffTime)
+ noteOnEvent = new MidiEvent(noteOnMsg, noteOnTime);
+ noteOffEvent = new MidiEvent(noteOffMsg, noteOffTime);
}
/*
* Sets the pitch of the current note.
- + @param pitch the pitch of the note (0-127)
+ * @param pitch the pitch of the note (0-127)
*/
public void setPitch(int pitch) {
noteOnMsg.setMessage(ShortMessage.NOTE_ON, pitch, noteOnMsg.getData2());