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

# MusicSequenceGetIndTrack(_:_:_:)

Gets the music track at the specified track index.

```
func MusicSequenceGetIndTrack(_ inSequence: MusicSequence, _ inTrackIndex: UInt32, _ outTrack: UnsafeMutablePointer<MusicTrack?>) -> OSStatus
```

## Parameters

`inSequence`

The music sequence to obtain the music track from.

`inTrackIndex`

The index for the music track you want to obtain. Music tracks are zero-indexed. Out of bound indexes result in an error.

`outTrack`

On output, the music track specified by the `inTrackIndex` parameter.

## Return Value

A result code.

## Discussion

This function is for accessing only music tracks, not the tempo track.

---

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)