|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.soundhelix.misc.Track
public class Track
Represents a track. A track consists of an arbitrary number of sequences and a type. The type can either be MELODIC, which means that the sequences contain melodic notes which are subject for transposition, or it can be RHYTHMIC, which means the sequences contain rhythm notes which must never be transposed. For example, for drum machines, RHYTHMIC must be used, because each pitch of a sequence selects a drum sample to play (c' might be the base drum, c#' might be the snare and so on) rather than a frequency of a tone to play. Only a whole track can be assigned to an instrument, so all contained sequences use the same instrument for playback. If different instruments are needed, the sequences must each be put into a track individually. The assignment of a whole track to an instrument is also the reason why it doesn't make sense to individually assign the types to sequences. If you have an instrument where part of the keys should use RHYTHMIC, the others should use MELODIC, you should split these off into two different tracks and assign them to the same MIDI channel for playback.
| Nested Class Summary | |
|---|---|
static class |
Track.TrackType
The possible track types. |
| Constructor Summary | |
|---|---|
Track(Track.TrackType type)
Constructor. |
|
| Method Summary | |
|---|---|
void |
add(Sequence sequence)
Adds the given sequence to this track. |
Sequence |
get(int index)
Returns the sequence with the given index. |
Track.TrackType |
getType()
Returns the track's type. |
Iterator<Sequence> |
iterator()
Returns an iterator that iterates over this track's sequences. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Track(Track.TrackType type)
type - the type| Method Detail |
|---|
public void add(Sequence sequence)
sequence - the sequence to addpublic int size()
public Track.TrackType getType()
public Sequence get(int index)
index - the index
public Iterator<Sequence> iterator()
public void transpose(int halftones)
halftones - the number of halftones (positive or negative)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||