---
title: "MIDIClientCreate(_:_:_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midiclientcreate(_:_:_:_:)"
---

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

Creates a MIDI client.

## Declaration

```swift
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

Return Value An OSStatus result code.

## Discussion

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

## Topics

### Callbacks

- [MIDINotifyProc](coremidi/midinotifyproc.md)
- [MIDINotification](coremidi/midinotification.md)

## See Also

### Client management

- [Incorporating MIDI 2 into your apps](coremidi/incorporating-midi-2-into-your-apps.md)
- [MIDIClientCreateWithBlock(_:_:_:)](coremidi/midiclientcreatewithblock(_:_:_:).md)
- [MIDIClientDispose(_:)](coremidi/midiclientdispose(_:).md)
- [MIDIClientRef](coremidi/midiclientref.md)
