Contents

MusicSequenceGetBeatsForSeconds(_:_:_:)

Calculates the number of beats that correspond to a number of seconds.

Declaration

func MusicSequenceGetBeatsForSeconds(_ inSequence: MusicSequence, _ inSeconds: Float64, _ outBeats: UnsafeMutablePointer<MusicTimeStamp>) -> OSStatus

Parameters

  • inSequence:

    The sequence that you want to get a count of beats for.

  • inSeconds:

    The number of seconds that you want the corresponding number of beats for.

  • outBeats:

    On output, the number of beats that corresponds to the number of seconds in the inSeconds parameter.

Return Value

A result code.

Discussion

This function makes use of the music sequence’s tempo track.

See Also

Managing Music Sequences