<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDISysexSendRequest/init(destination:data:bytesToSend:complete:reserved:completionProc:completionRefCon:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "s:So20MIDISysexSendRequestV11destination4data07bytesToB08complete8reserved14completionProc0J6RefConABs6UInt32V_SPys5UInt8VGAK6Darwin0P7BooleanVAM_A2MtySpyABGXCSvSgtcfc"
  },
  "title" : "init(destination:data:bytesToSend:complete:reserved:completionProc:completionRefCon:)"
}
-->

# init(destination:data:bytesToSend:complete:reserved:completionProc:completionRefCon:)

Creates a new single system-exclusive (SysEx) event request.

```
init(destination: MIDIEndpointRef, data: UnsafePointer<UInt8>, bytesToSend: UInt32, complete: DarwinBoolean, reserved: (UInt8, UInt8, UInt8), completionProc: MIDICompletionProc, completionRefCon: UnsafeMutableRawPointer?)
```

## Parameters

`destination`

The endpoint to send the event to.

`data`

Initially, a pointer to the SysEx event to send. The system advances this pointer as it sends the bytes.

`bytesToSend`

Initially, a counter of the number of bytes to send. The system decrements this counter as it sends the bytes.

`complete`

A Boolean value that indicates whether the transmission is complete. You can set this value to `true` to abort transmission and the system sets it to `true` after it transmits all the bytes.

`reserved`

`completionProc`

A function that the system calls after it sends all bytes for the request, or after the client marks the request as complete.

`completionRefCon`

Data to pass to the `completionProc`.

## Discussion

---

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)