public class Track extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Track.TrackType
The possible track types.
|
| Constructor and Description |
|---|
Track(Track.TrackType type)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(LFOSequence sequence,
String name)
Adds the given sequence to this track.
|
void |
add(Sequence sequence)
Adds the given sequence to this track.
|
Sequence |
get(int index)
Returns the sequence with the given index.
|
LFOSequence |
getLFOSequence(String name)
Returns the LFO sequence with the given name.
|
Track.TrackType |
getType()
Returns the track's type.
|
Iterator<Sequence> |
iterator()
Provides an iterator that iterates over all Sequences of this Track in the order they have been added.
|
void |
scaleVelocity(int velocity)
Scales the volume of the track by a factor of velocity/maxVelocity.
|
int |
size()
Returns the number of sequences this track contains.
|
void |
transpose(int halftones)
Transposes all sequences of this track up by the given number of halftones.
|
public Track(Track.TrackType type)
type - the typepublic void add(Sequence sequence)
sequence - the sequence to addpublic void add(LFOSequence sequence, String name)
sequence - the sequence to addname - the LFO namepublic LFOSequence getLFOSequence(String name)
name - the LFO sequence name.public int size()
public Track.TrackType getType()
public Sequence get(int index)
index - the indexpublic Iterator<Sequence> iterator()
public void transpose(int halftones)
halftones - the number of halftones (positive or negative)public void scaleVelocity(int velocity)
velocity - the velocity