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 class
Keeps count of a stack of midi notes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields 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_REQUEST
Fields inherited from class javax.sound.midi.MidiMessage
data, length
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MidiNote
(int command, int channel, int pitch, int velocity) protected
MidiNote
(ShortMessage message, int command) -
Method Summary
Modifier and TypeMethodDescriptionstatic MidiNote
constructMutable
(int command, int channel, int pitch, int velocity) int
getPitch()
static String
getPitchString
(int pitch) int
double
boolean
boolean
isNoteOn()
void
setChannel
(int channel) void
setPitch
(int pitch) void
setVelocity
(int velocity) Methods inherited from class heronarts.lx.midi.LXShortMessage
dispatch, fromShortMessage, getSource, setSource
Methods inherited from class javax.sound.midi.ShortMessage
clone, getChannel, getCommand, getData1, getData2, getDataLength, setMessage, setMessage, setMessage
Methods inherited from class javax.sound.midi.MidiMessage
getLength, getMessage, getStatus, setMessage
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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)
-