Methods Summary |
---|
public javax.sound.midi.Track | createTrack()
/*
* new Tracks accrue to the end of vector
*/
Track tr = new Track();
tracks.add(tr);
return tr;
|
public boolean | deleteTrack(javax.sound.midi.Track track)
return tracks.remove(track);
|
public float | getDivisionType()
return divisionType;
|
public long | getMicrosecondLength()
float divisionType;
if (this.divisionType == 0.0f) {
divisionType = 2;
} else {
divisionType = this.divisionType;
}
return (long) (1000000.0 * getTickLength() /
(divisionType * this.resolution * 1.0f));
|
public javax.sound.midi.Patch[] | getPatchList()
//FIXME
/*
* I don't understand how to works this method, and so
* I simply return an empty array. 'patches' initializes
* in the constructor as empty vector
*/
Patch[] patch = new Patch[patches.size()];
patches.toArray(patch);
return patch;
|
public int | getResolution()
return resolution;
|
public long | getTickLength()
/*
* this method return the biggest value of tick of
* all tracks contain in the Sequence
*/
long maxTick = 0;
for (int i = 0; i < tracks.size(); i++) {
if (maxTick < tracks.get(i).ticks()) {
maxTick = tracks.get(i).ticks();
}
}
return maxTick;
|
public javax.sound.midi.Track[] | getTracks()
Track[] track = new Track[tracks.size()];
tracks.toArray(track);
return track;
|