<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AUScheduleMIDIEventBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@T@AUScheduleMIDIEventBlock"
  },
  "title" : "AUScheduleMIDIEventBlock"
}
-->

# AUScheduleMIDIEventBlock

A block to schedule MIDI events.

```
typealias AUScheduleMIDIEventBlock = (AUEventSampleTime, UInt8, Int, UnsafePointer<UInt8>) -> Void
```

## Discussion

The block takes the following parameters:

- eventSampleTime: The sample time at which the MIDI event is to occur. When scheduling parameters during the render cycle, this time can be set to the `AUEventSampleTimeImmediate` value plus an optional buffer offset, in which case the event is scheduled at that position in the current render cycle.
- cable: The virtual cable number.
- length: The number of bytes of MIDI data in the provided event(s).
- midiBytes: One or more valid MIDI 1.0 events, except *sysex* which must always be sent as the only event in the chunk. Running status is not allowed.

---

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)