<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudioTypes",
  "identifier" : "/documentation/CoreAudioTypes/kAudioFormatMIDIStream",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Audio Types"
    ],
    "preciseIdentifier" : "c:@Ea@kAudioFormatLinearPCM@kAudioFormatMIDIStream"
  },
  "title" : "kAudioFormatMIDIStream"
}
-->

# kAudioFormatMIDIStream

A key that specifies the MIDI stream codec, and uses no flags.

```
var kAudioFormatMIDIStream: AudioFormatID { get }
```

## Discussion

This codec contains a stream of <doc://com.apple.documentation/documentation/CoreMIDI/MIDIPacketList> structures where the time stamps are sample offsets in the stream. The [`mSampleRate`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mSampleRate) field describes how time passes in this stream. An audio unit that receives or generates this stream can use this sample rate, the number of frames it’s rendering, and the sample offsets within the <doc://com.apple.documentation/documentation/CoreMIDI/MIDIPacketList> to define the time for any MIDI event within this list.

---

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)