Next: jMax sequence object creation
Up: Data structures
Previous: Used structures
Contents
The main problem of score acquisition is that we have to convert ``musical time'' into ``official time'', i.e.:
- A position in [Measure, Beat, Fraction] into a start time in ms;
- A duration in x/y into a duration in ms.
These convertions are related to tempo, and are calculated as following:
With:
= note duration upper value
= note duration lower value
= time signature lower value
Calculation of start time is a bit more complex because of the possible tempo changes. So we have to calculate elapsed time between two tempo changes and record it as offset.
With:
= measure number of note position
= measure number of last tempo change
= beat number of note position
= beat number of last tempo change
= beat fraction number of note position
= beat fraction number of last tempo change
= time signature upper value
= time elapsed from the beginning to last tempo change
( is calculated by the same way)
Next: jMax sequence object creation
Up: Data structures
Previous: Used structures
Contents
Mathieu Gilles (Betr. soltau)
2003-08-25