Function

MusicSequenceBeatsToBarBeatTime

Formats a music sequence’s beat time to its bar-beat time.

Declaration

OSStatus MusicSequenceBeatsToBarBeatTime(MusicSequence inSequence, MusicTimeStamp inBeats, UInt32 inSubbeatDivisor, CABarBeatTime *outBarBeatTime);

Parameters

inSequence

The music sequence that you want bar-beat time for.

inBeats

The beats to be represented as bar-beats.

inSubbeatDivisor

The denominator of the fractional number of beats.

outBarBeatTime

On output, the music sequence’s bar-beat time.

Return Value

A result code.

Discussion

The sequence's tempo track time signature events are used to calculate the bar-beat representation. If there are no Time Sig events added to the sequence 4/4 is assumed. A time signature event is a MIDI Meta Event as specified for MIDI files.

Refer to AudioToolbox/CAClock.h for more information.

See Also