Time management messages
Date and duration
Time messages control the time dimension of the score components. They could be sent to any address with the form /ITL/scene/\textit{identifier} where identifier is the unique identifier string of a scene component.
- 1) Time is specified as a rational value d/n where 1/1 represents a whole note.
- 2) Time may be specified with a single integer, then 1 is used as implicit denominator value.
- 3) Time may be specified as a single float value that is converted using the following approximation: let f be the floating point date, the corresponding rational date is computed as f x 10000 / 10000.
-
4) Time may also be specified as a string in the form 'n/d'.
-
clock: similar to MIDI clock message: advances the object date by 1/24 of quarter note.
- durClock: a clock message applied to duration: increases the object duration by 1/24 of quarter note.
- date: sets the time position of an object. Default value is 0/1.
- duration: changes the object duration. Default value is 1/1.
- ddate: relative time positioning message: adds the specified value to the object date.
- dduration: relative duration message: adds the specified value to the object duration.
Example Various ways to set an object date.
/ITL/scene/myObject date 2 1 ;
/ITL/scene/myObject date 2; # the denominator is 1 (implied)
/ITL/scene/myObject date 0.5; # equivalent to 1/2
/ITL/scene/myObject date '1/2'; # the string form
Similar ways to move an object date.
/ITL/scene/myObject clock;
/ITL/scene/myObject ddate '1/96';
Date queries
Several formats are available to query the date of an object:
- date: gives the object date as a rational value.
- date%f: gives the object date as a float value.
- date%a: gives the object date as an absolute time. It assumes that the tempo is 60bpm.
Tempo
The tempo message is supported by all the score components. Its default value is 0. When non null, the date of an object is moved at the corresponding tempo (e.g. with a tempo = 60, the date move will be 1/4 - a quarter note - every second). Note that the date is refreshed at INScore time task rate.
- tempo: set an object tempo. Default value is 0.
- dtempo: relative tempo message: adds the specified value to the object tempo.
Example A cursor moving over a score using the tempo message.
/ITL/scene/score set gmn "[a a a a a a]"; # a short score
/ITL/scene/cursor set ellipse 0.5 0.5; # a cursor
/ITL/scene/sync cursor score; # synchonizes the cursor to the score
/ITL/scene/cursor tempo 80; # an set the tempo