---
title: "MIDIDeviceCreate(_:_:_:_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/mididevicecreate(_:_:_:_:_:)"
---

# MIDIDeviceCreate(_:_:_:_:_:)

Creates a new device object that corresponds to the available hardware.

## Declaration

```swift
func MIDIDeviceCreate(_ owner: MIDIDriverRef?, _ name: CFString, _ manufacturer: CFString, _ model: CFString, _ outDevice: UnsafeMutablePointer<MIDIDeviceRef>) -> OSStatus
```

## Parameters

- `owner`: The driver that creates the device, or NULL for a non-driver.
- `name`: The name of the new device.
- `manufacturer`: The name of the device’s manufacturer.
- `model`: The name of the model of the device.
- `outDevice`: On successful return, points to the newly created device.

## Return Value

Return Value An OSStatus result code.

## Discussion

Discussion Nondrivers may call this function to create external devices.

## See Also

### Managing Device Lifecyle

- [MIDIDeviceDispose(_:)](coremidi/mididevicedispose(_:).md)
- [MIDIDeviceRef](coremidi/midideviceref.md)
