Package heronarts.lx.midi
Class MidiNote
java.lang.Object
javax.sound.midi.MidiMessage
javax.sound.midi.ShortMessage
heronarts.lx.midi.LXShortMessage
heronarts.lx.midi.MidiNote
- All Implemented Interfaces:
LXMidiMessage,Cloneable
- Direct Known Subclasses:
MidiNoteOff,MidiNoteOn
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classKeeps count of a stack of midi notes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class javax.sound.midi.ShortMessage
ACTIVE_SENSING, CHANNEL_PRESSURE, CONTINUE, CONTROL_CHANGE, END_OF_EXCLUSIVE, MIDI_TIME_CODE, NOTE_OFF, NOTE_ON, PITCH_BEND, POLY_PRESSURE, PROGRAM_CHANGE, SONG_POSITION_POINTER, SONG_SELECT, START, STOP, SYSTEM_RESET, TIMING_CLOCK, TUNE_REQUESTFields inherited from class javax.sound.midi.MidiMessage
data, length -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMidiNote(int command, int channel, int pitch, int velocity) protectedMidiNote(ShortMessage message, int command) -
Method Summary
Modifier and TypeMethodDescriptionstatic MidiNoteconstructMutable(int command, int channel, int pitch, int velocity) intgetPitch()static StringgetPitchString(int pitch) intdoublebooleanbooleanisNoteOn()voidsetChannel(int channel) voidsetPitch(int pitch) voidsetVelocity(int velocity) Methods inherited from class heronarts.lx.midi.LXShortMessage
dispatch, fromShortMessage, getSource, setSourceMethods inherited from class javax.sound.midi.ShortMessage
clone, getChannel, getCommand, getData1, getData2, getDataLength, setMessage, setMessage, setMessageMethods inherited from class javax.sound.midi.MidiMessage
getLength, getMessage, getStatus, setMessageMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface heronarts.lx.midi.LXMidiMessage
getInput
-
Field Details
-
NUM_PITCHES
public static final int NUM_PITCHES- See Also:
-
NUM_CHANNELS
public static final int NUM_CHANNELS- See Also:
-
MAX_VELOCITY
public static final int MAX_VELOCITY- See Also:
-
-
Constructor Details
-
MidiNote
protected MidiNote(int command, int channel, int pitch, int velocity) throws InvalidMidiDataException - Throws:
InvalidMidiDataException
-
MidiNote
-
-
Method Details
-
constructMutable
public static MidiNote constructMutable(int command, int channel, int pitch, int velocity) throws InvalidMidiDataException - Throws:
InvalidMidiDataException
-
mutableCopy
-
getPitchString
-
getPitchString
-
getPitch
public int getPitch() -
getVelocity
public int getVelocity() -
getVelocityNormalized
public double getVelocityNormalized() -
isNoteOn
public boolean isNoteOn() -
isNoteOff
public boolean isNoteOff() -
setChannel
public void setChannel(int channel) -
setPitch
public void setPitch(int pitch) -
setVelocity
public void setVelocity(int velocity)
-