<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/MusicSequenceBeatsToBarBeatTime(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@MusicSequenceBeatsToBarBeatTime"
  },
  "title" : "MusicSequenceBeatsToBarBeatTime(_:_:_:_:)"
}
-->

# MusicSequenceBeatsToBarBeatTime(_:_:_:_:)

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

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)