Contents

MusicSequenceBeatsToBarBeatTime(_:_:_:_:)

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

Declaration

func MusicSequenceBeatsToBarBeatTime(_ inSequence: MusicSequence, _ inBeats: MusicTimeStamp, _ inSubbeatDivisor: UInt32, _ outBarBeatTime: UnsafeMutablePointer<CABarBeatTime>) -> OSStatus

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

Managing Music Sequences