JMSL Tutorial: JScore's Transcriber, part 3
The input to the transcriber is a MusicShape where dimension 0 contains timestamps in seconds,
dimension 1 contains pitch,
dimension 2 contains amplitude,
dimension 3 contains hold (sustain) time.
Generating data for the transcriber
Values of dimensions higher than 3 are preserved.
IMPORTANT: Dimension 0 of a MusicShape is usually interpreted as "duration" (ie the amount of time in seconds that the MusicShape waits before executing the next element).
HOWEVER: The Transcriber expects this dimension to hold absolute time stamps (that is, the absolute timestamp that the element executes, not how long it lasts).
For example, if the durations of the first three elements were
...then integrating dimension 0 results in these absolute timestamps:
Going from relative durations to absolute timestamps is simple to do: just call myShape.integrate(0).
You see that these timestamps are the absolute times since the beginning of the shape that each element executes.
If you need to preserve the original MusicShape, you should first clone() it, integrate dim 0 of the clone, and hand the clone to the transcriber.
(C) 2000 Nick Didkovsky and Phil Burk, All Rights Reserved
JMSL is based upon HMSL (C) Phil Burk, Larry Polansky and David Rosenboom.