- * Returns the channel of the current note.
- * @return the channel of the note (1-16)
- */
- public int getChannel() {
- return noteOnMsg.getChannel();
- }
-
- /**
- * Returns the pitch of the current note.
- * @return the pitch of the note (0-127)
- */
- public int getPitch() {
- return noteOnMsg.getData1();
- }
-
- /**
- * Returns the velocity of the current note.
- * @return the velocity of the note (0-127)
- */
- public int getVelocity() {
- return noteOnMsg.getData2();
- }
-
- /**
- * Returns the duration of the current note.
- * @return the duration of the note (in ticks)
- */
- public int getDuration() {
- if (!hasNoteOffEvent()) return 0;
- return (int)(noteOffEvent.getTick() - getTick());
- }
-
- /**
- * Returns whether the NoteOff event was found.
- * @return the note off MidiEvent
+ * Transposes the current note the given number of halftones.
+ * @param halftones the number of halftones to transpose - positive for up, negative for down