|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenpiano.midi.MidiTrack
public class MidiTrack
The MidiTrack class represents single tracks of a MIDI file
| Constructor Summary | |
|---|---|
MidiTrack(int channel)
Constructs a new MIDI track with undefined name |
|
MidiTrack(String trackName,
int channel)
Constructs a new MIDI track |
|
| Method Summary | |
|---|---|
void |
addMidiControl(MidiControl midiControl)
Adds a new MIDI control message to the track |
void |
addMidiNote(MidiNote midiNote)
Adds a new MIDI note to the track |
int |
getChannel()
Returns the channel of the track |
int |
getControlPos()
Returns the actual index of the relevant MIDI control message |
int |
getInstrument()
Returns the instrument of the track |
LinkedList<MidiControl> |
getMidiControls()
Returns the list of MIDI control messages |
LinkedList<MidiNote> |
getMidiNotes()
Returns the list of MIDI notes |
String |
getName()
Returns the name of the track |
int |
getVolume()
Returns the volume of the track |
void |
setChannel(int channel)
Sets the channel of the track |
void |
setControlPos(int controlPos)
Sets the actual index of the relevant MIDI control message |
void |
setInstrument(int instrument)
Sets the instrument of the track |
void |
setTrackName(String trackName)
Sets the name of the track |
void |
setVolume(int volume)
Sets the volume of the track |
void |
sortElements()
Sorts the elements of a MIDI track |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MidiTrack(String trackName,
int channel)
trackName - the name of the trackchannel - the channel this track relies onpublic MidiTrack(int channel)
channel - the channel this track relies on| Method Detail |
|---|
public void addMidiNote(MidiNote midiNote)
midiNote - the midiNote to addpublic void addMidiControl(MidiControl midiControl)
midiControl - the MIDI control message to addpublic LinkedList<MidiNote> getMidiNotes()
public LinkedList<MidiControl> getMidiControls()
public void setTrackName(String trackName)
trackName - the name of the trackpublic void setInstrument(int instrument)
instrument - the instrument of the trackpublic void setChannel(int channel)
channel - the channel of the trackpublic void setVolume(int volume)
volume - the volume of the trackpublic String getName()
public int getInstrument()
public int getChannel()
public int getVolume()
public int getControlPos()
public void setControlPos(int controlPos)
controlPos - the actual index of the relevant MIDI control messagepublic void sortElements()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||