|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.music.midi.MidiNote
public class MidiNote
| Constructor Summary | |
|---|---|
MidiNote(MidiTrack midiTrack,
long onTicks,
long offTicks)
Simple constructor for MidiNote instances. |
|
MidiNote(MidiTrack midiTrack,
long onTicks,
long offTicks,
int bank,
int program,
int velocity,
int key)
Extended constructor for MidiNote instances. |
|
| Method Summary | |
|---|---|
MidiNote |
copy(MidiTrack midiTrack)
Create a new note in the specified MIDI track and copy this note's attributes to the new note. |
void |
createAfterTouchEvent(long ticks,
int pressure)
Create a MIDI after touch event. |
void |
createNoteEvents()
Generate MIDI note on and MIDI note off events. |
void |
createProgramChangeEvent()
Generate program change events for MIDI bank and MIDI program, whichever has actually changed on the channel. |
int |
getBank()
Get the MIDI bank. |
int |
getKey()
Get the MIDI key number. |
MidiChannel |
getMidiChannel()
Get the MIDI channel. |
long |
getOffTicks()
Get the note end time in ticks. |
int |
getOnsetPitchBend()
Get the pitch bend at the onset of the note. |
long |
getOnTicks()
Get the note start time in ticks. |
int |
getProgram()
Get the MIDI program. |
int |
getReleasePitchBend()
Get the pitch bend at the release of the note |
MidiTrack |
getTrack()
Get the MidiTrack instance that hold the note. |
int |
getVelocity()
Get the MIDI velocity. |
void |
interpolatePitchBend()
Create a sequence of MIDI pitch-bend events over the duration of the note that plot a line from the onset value to the relase value. |
void |
setBank(int bank)
Set the MIDI bank. |
void |
setKey(int key)
Set the MIDI key number. |
void |
setMidiChannel(MidiChannel midiChannel)
Set the MIDI channel. |
void |
setOriginPitchBend(int originPitchBend)
Set the pitch bend at the onset of the note. |
void |
setProgram(int program)
Set the MIDI program |
void |
setReleasePitchBend(int goalPitchBend)
Set the pitch bend at the release of the note |
void |
setVelocity(int velocity)
Set the MIDI velocity. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MidiNote(MidiTrack midiTrack,
long onTicks,
long offTicks)
midiTrack - The MidiTrack instance that hold the note.onTicks - The note start time in ticks.offTicks - The note end time in ticks.
public MidiNote(MidiTrack midiTrack,
long onTicks,
long offTicks,
int bank,
int program,
int velocity,
int key)
midiTrack - The MidiTrack instance that hold the note.onTicks - The note start time in ticks.offTicks - The note end time in ticks.bank - program - velocity - key - | Method Detail |
|---|
public MidiTrack getTrack()
MidiTrack instance that hold the note.
MidiTrack instance that hold the note.public long getOnTicks()
public long getOffTicks()
public MidiChannel getMidiChannel()
MidiChannel instance.public void setMidiChannel(MidiChannel midiChannel)
midiChannel - A MidiChannel instance.public int getBank()
public void setBank(int bank)
bank - The intended MIDI Bank.public int getProgram()
public void setProgram(int program)
program - The intended MIDI program (1-128).public int getVelocity()
public void setVelocity(int velocity)
velocity - The intended MIDI velocity (0-127).public int getKey()
public void setKey(int key)
key - The inteded MIDI key number (60 is middle C).public int getOnsetPitchBend()
public void setOriginPitchBend(int originPitchBend)
originPitchBend - The intended onset pitch bend.public int getReleasePitchBend()
public void setReleasePitchBend(int goalPitchBend)
goalPitchBend - public MidiNote copy(MidiTrack midiTrack)
midiTrack - The specified MIDI track.
public void createNoteEvents()
throws javax.sound.midi.InvalidMidiDataException
javax.sound.midi.InvalidMidiDataException
public void createProgramChangeEvent()
throws javax.sound.midi.InvalidMidiDataException
javax.sound.midi.InvalidMidiDataException
public void createAfterTouchEvent(long ticks,
int pressure)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time.pressure - The after-touch value.
javax.sound.midi.InvalidMidiDataException
public void interpolatePitchBend()
throws javax.sound.midi.InvalidMidiDataException
javax.sound.midi.InvalidMidiDataException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||