Function

MusicSequenceBarBeatTimeToBeats

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

Declaration

OSStatus MusicSequenceBarBeatTimeToBeats(MusicSequence inSequence, const CABarBeatTime *inBarBeatTime, MusicTimeStamp *outBeats);

Parameters

inSequence

The music sequence that you want the beat count for.

inBarBeatTime

The bar-beat time to be represented as beats.

outBeats

On output, the music sequence’s beat time.

Return Value

A result code.

Discussion

The sequence's tempo track time signature events are used to 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