---
title: "MIDIDeviceListGetDevice(_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/mididevicelistgetdevice(_:_:)"
---

# MIDIDeviceListGetDevice(_:_:)

Retrieves a MIDI device from a device list.

## Declaration

```swift
func MIDIDeviceListGetDevice(_ devList: MIDIDeviceListRef, _ index0: Int) -> MIDIDeviceRef
```

## Parameters

- `devList`: The device list.
- `index0`: The index of the device to return.

## Return Value

Return Value A reference to a device, or NULL if an error occurred.

## See Also

### Managing Device Lists

- [MIDIDeviceListGetNumberOfDevices(_:)](coremidi/mididevicelistgetnumberofdevices(_:).md)
- [MIDIDeviceListAddDevice(_:_:)](coremidi/mididevicelistadddevice(_:_:).md)
- [MIDIDeviceListDispose(_:)](coremidi/mididevicelistdispose(_:).md)
- [MIDIDeviceListRef](coremidi/mididevicelistref.md)
