CAClockTime |
Represents a time value using one of several possible units.
struct CAClockTime { CAClockTimeFormat format; UInt32 reserved; union { UInt64 hostTime; CAClockSamples samples; CAClockBeats beats; CAClockSeconds seconds; SMPTETime smpte; } time; };
format
- Specifies the time's format and units.
reserved
- Must be 0.
time
- The time value. Use the member of the union appropriate to the format (see the description of CAClockTimeFormat).
CABarBeatTime |
A display representation of a musical time in beats.
struct CABarBeatTime { SInt32 bar; UInt16 beat; UInt16 subbeat; UInt16 subbeatDivisor; UInt16 reserved; };
bar
- A measure number.
beat
- A beat number (1..n).
subbeat
- The numerator of the fractional number of beats.
subbeatDivisor
- The denominator of the fractional number of beats.
reserved
- Must be 0.
A clock's internal representation of musical time is in beats based on the
beginning of the timeline. Normally, such times should be displayed to the user
in terms of bars, beats, and subbeats (sometimes called "units" or "parts per
quarter" [PPQ]). This data structure is such a display representation.
By convention, bar 1 is the beginning of the sequence. Beat 1 is the first beat
of the measure. In 4/4 time, beat will have a value from 1 to 4. Music
applications often use beat divisions such as 480 and 960.
CATempoMapEntry |
A tempo change event.
struct CATempoMapEntry { CAClockBeats beats; CAClockTempo tempoBPM; // beats per minute };
beats
- The beat time at which the tempo changes.
tempoBPM
- The new tempo as of that time.
The clock's tempo map defines the correspondence between seconds and musical beats, and is used in conversions between the two.
CAMeterTrackEntry |
A time signature change event.
struct CAMeterTrackEntry { CAClockBeats beats; UInt16 meterNumer; UInt16 meterDenom; // 1,2,4,8 etc. };
beats
- The beat time at which the time signature (meter) changes.
meterNum
- The numerator of the new time signature.
meterDenom
- The denominator of the new time signature (1, 2, 4, 8, etc.).
The meter track is used for converting between beats as floating-point numbers (CAClockBeats) and their display representations (CABarBeatTime).
(Last Updated July 18, 2005)