<!--
{
  "availability" : [
    "iOS: 4.2.0 -",
    "iPadOS: 4.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDIClientCreate(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:@F@MIDIClientCreate"
  },
  "title" : "MIDIClientCreate(_:_:_:_:)"
}
-->

# MIDIClientCreate(_:_:_:_:)

Creates a MIDI client.

```
func MIDIClientCreate(_ name: CFString, _ notifyProc: MIDINotifyProc?, _ notifyRefCon: UnsafeMutableRawPointer?, _ outClient: UnsafeMutablePointer<MIDIClientRef>) -> OSStatus
```

## Parameters

`name`

The client’s name.

`notifyProc`

An optional callback function through which the client receives notifications of changes to the system.

`notifyRefCon`

A void pointer.

`outClient`

On successful return, points to the newly created MIDI client.

## Return Value

An `OSStatus` result code.

## Discussion

The system invokes the callback function on the same run loop that you created the client on.

## Topics

### Callbacks

[`MIDINotifyProc`](/documentation/CoreMIDI/MIDINotifyProc)

A callback function for notifying clients of state changes.

[`MIDINotification`](/documentation/CoreMIDI/MIDINotification)

A message that describes a system state change.



---

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)