|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.common.Disposable
net.charlesames.music.midi.MidiEntity
net.charlesames.music.midi.MidiTrack
public class MidiTrack
The MidiTrack class wraps the javax.sound.midi.Track class.
The parent of a MidiTrack instance is a MidiFile.
The parent of the wrapped javax.sound.midi.Track instance
| Method Summary | |
|---|---|
void |
create14BitEvent(long ticks,
int command,
int channel,
int data)
Create a MIDI short message event. |
void |
createBalanceEvent(long ticks,
int channel,
int data)
Create a balance control-change event. |
void |
createBreathControllerEvent(long ticks,
int channel,
int data)
Create a breath controller control-change event. |
void |
createChannelPrefixEvent(long ticks,
int channel)
Create a MIDI meta-message channel prefix event. |
void |
createControllerEvent(long ticks,
int channel,
int controller,
int data)
Create a MIDI controller event. |
void |
createCopyrightEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message copyright event. |
void |
createCuePointEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message cue point event. |
void |
createDataEntryEvent(long ticks,
int channel,
int data)
Create a data-entry control-change event. |
void |
createDeviceNameEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message device name event. |
void |
createEffectControl1Event(long ticks,
int channel,
int data)
Create an Effect Control #1 control-change event. |
void |
createEffectControl2Event(long ticks,
int channel,
int data)
Create an Effect Control #2 control-change event. |
void |
createEndOfTrackEvent(long ticks)
Create a MIDI meta-message end of track event. |
void |
createExpressionEvent(long ticks,
int channel,
int data)
Create an expression control-change event. |
void |
createFootPedalEvent(long ticks,
int channel,
int data)
Create a foot pedal control-change event. |
void |
createInstrumentNameEvent(long ticks,
int channel,
java.lang.String text)
Create a MIDI meta-message instrument name event. |
void |
createKeySignatureEvent(long ticks,
int sharps,
int mode)
Create a MIDI meta-message key signature event. |
void |
createLyricEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message lyric event. |
void |
createMarkerEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message marker event. |
void |
createMetaMessageEvent(int type,
long ticks,
byte[] data)
Create a MIDI meta-message event. |
void |
createModulationWheelEvent(long ticks,
int channel,
int data)
Create a modulation wheel control-change event. |
void |
createNoteEvents(long ticks,
long duration,
int channel,
int key,
int velocity)
Create a MIDI note-on event paired with a MIDI note-off event. |
void |
createPanPositionEvent(long ticks,
int channel,
int data)
Create a pan position control-change event. |
void |
createPitchBendEvent(long ticks,
int channel,
int value)
Create a MIDI pitch bend event |
void |
createPortamentoTimeEvent(long ticks,
int channel,
int data)
Create a portamento control-change event. |
void |
createProgramChangeEvent(long ticks,
int channel,
int program)
Create a MIDI program change event |
void |
createProgramNameEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message program name event. |
void |
createShortMessageEvent(long ticks,
int status_type,
int channel,
int data_low,
int data_high)
Create a MIDI short message event. |
void |
createTempoEvent(long ticks,
int microsecondsPerBeat)
Create a MIDI meta-message tempo event. |
void |
createTextEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message text event. |
void |
createTimeSignatureEvent(long ticks,
int beats,
int beatType,
int clocks,
int division)
Create a MIDI meta-message time signature event. |
void |
createTrackNameEvent(long ticks,
java.lang.String text)
Create a MIDI meta-message track name event. |
void |
createVolumeEvent(long ticks,
int channel,
int data)
Create a MIDI volume control-change event. |
void |
decodeEvents()
Generate a text interpretation of a MIDI track. |
MidiFile |
getContainer()
Get the parent MidiFile. |
int |
getID()
Get the track id. |
java.util.SortedMap<java.lang.Integer,MidiTrackEvent> |
getMidiTrackEvents()
Get the MIDI track events. |
java.lang.String |
getName()
Get the track name. |
javax.sound.midi.Track |
getTrack()
Get the wrapped javax.sound.midi.Track instance. |
void |
initializeChannel(java.lang.String deviceName,
int channel,
java.lang.String instrumentName,
int midiPitchBendRange)
Initialize a MIDI channel |
void |
interpolatePitchBend(int channel,
long left,
long right,
int origin,
int goal)
Create a ramped sequence of MIDI pitch-bend events |
void |
setName(java.lang.String name)
Set the instance name. |
void |
setRegisteredParameter(long ticks,
int channel,
int rpn_msb,
int rpn_lsb,
int controller,
int data)
Set a MIDI registered parameter value. |
| Methods inherited from class net.charlesames.music.midi.MidiEntity |
|---|
dispose |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public MidiFile getContainer()
MidiFile.
getContainer in class MidiEntityMidiFile.public javax.sound.midi.Track getTrack()
public java.lang.String getName()
getName in class MidiEntitypublic int getID()
getID in class MidiEntitypublic java.util.SortedMap<java.lang.Integer,MidiTrackEvent> getMidiTrackEvents()
MidiTrackEvent instances, indexed by event id.
public void createShortMessageEvent(long ticks,
int status_type,
int channel,
int data_low,
int data_high)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in ticksstatus_type - The MIDI status nibble.channel - The MIDI channel number (1-16)data_low - The low data bit (0-127).data_high - The high data bit (0-127).
javax.sound.midi.InvalidMidiDataException
public void create14BitEvent(long ticks,
int command,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickscommand - The MIDI status nibblechannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits) which this method unpacks into 7-bit high and low bytes.
javax.sound.midi.InvalidMidiDataException
public void createProgramChangeEvent(long ticks,
int channel,
int program)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)program - The MIDI program number (1-128)
javax.sound.midi.InvalidMidiDataException
public void createNoteEvents(long ticks,
long duration,
int channel,
int key,
int velocity)
throws javax.sound.midi.InvalidMidiDataException
ticks - The note-on event time in ticksduration - The number of ticks separating the note-off event from the note-on event.channel - The MIDI channel number (1-16)key - The MIDI key number (60 is middle C).velocity - The MIDI velocity (0-127)
javax.sound.midi.InvalidMidiDataException
public void createControllerEvent(long ticks,
int channel,
int controller,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)controller - The MIDI control number.data - (0-127)
javax.sound.midi.InvalidMidiDataException
public void setRegisteredParameter(long ticks,
int channel,
int rpn_msb,
int rpn_lsb,
int controller,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)rpn_msb - The registered parameter most significant bit.rpn_lsb - The registered parameter least significant bit.controller - The controller number.data - The controller data (0-127).
javax.sound.midi.InvalidMidiDataException
public void createPitchBendEvent(long ticks,
int channel,
int value)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)value - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void interpolatePitchBend(int channel,
long left,
long right,
int origin,
int goal)
throws javax.sound.midi.InvalidMidiDataException
channel - The MIDI channel number (1-16)left - The starting time in ticks.right - The ending time in ticks.origin - The starting pitch-bend value.goal - The ending pitch-bend value.
javax.sound.midi.InvalidMidiDataException
public void createModulationWheelEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createBreathControllerEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createFootPedalEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createPortamentoTimeEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createDataEntryEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createVolumeEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createBalanceEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createPanPositionEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createExpressionEvent(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createEffectControl1Event(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createEffectControl2Event(long ticks,
int channel,
int data)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)data - An integer from 0 to 16383 (14 bits).
javax.sound.midi.InvalidMidiDataException
public void createMetaMessageEvent(int type,
long ticks,
byte[] data)
throws javax.sound.midi.InvalidMidiDataException
type - The meta-message number.ticks - The event time in ticksdata - A byte array.
javax.sound.midi.InvalidMidiDataException
public void createTextEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createCopyrightEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createTrackNameEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createInstrumentNameEvent(long ticks,
int channel,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)text - A string.
javax.sound.midi.InvalidMidiDataException
public void createLyricEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createMarkerEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createCuePointEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createProgramNameEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createDeviceNameEvent(long ticks,
java.lang.String text)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickstext - A string.
javax.sound.midi.InvalidMidiDataException
public void createTempoEvent(long ticks,
int microsecondsPerBeat)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in ticksmicrosecondsPerBeat - The tempo factor expressed in microseconds per beat.
javax.sound.midi.InvalidMidiDataException
public void createChannelPrefixEvent(long ticks,
int channel)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in tickschannel - The MIDI channel number (1-16)
javax.sound.midi.InvalidMidiDataException
public void createTimeSignatureEvent(long ticks,
int beats,
int beatType,
int clocks,
int division)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in ticks.beats - beatType - clocks - division -
javax.sound.midi.InvalidMidiDataException
public void createKeySignatureEvent(long ticks,
int sharps,
int mode)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in ticks.sharps - Negative for flatsmode - 0 (major) 1 (minor)
javax.sound.midi.InvalidMidiDataException
public void createEndOfTrackEvent(long ticks)
throws javax.sound.midi.InvalidMidiDataException
ticks - The event time in ticks.
javax.sound.midi.InvalidMidiDataException
public void initializeChannel(java.lang.String deviceName,
int channel,
java.lang.String instrumentName,
int midiPitchBendRange)
throws javax.sound.midi.InvalidMidiDataException
deviceName - channel - instrumentName - midiPitchBendRange -
javax.sound.midi.InvalidMidiDataExceptionpublic void decodeEvents()
public void setName(java.lang.String name)
MidiEntity
setName in class MidiEntityname - The intended instance name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||