---
title: MIDIEntityRef
framework: coremidi
role: symbol
role_heading: Type Alias
path: coremidi/midientityref
---

# MIDIEntityRef

An entity that a device owns and that contains endpoints.

## Declaration

```swift
typealias MIDIEntityRef = MIDIObjectRef
```

## Discussion

Discussion An entity object derives from MIDIObjectRef, and its owning object is a MIDIDeviceRef. Devices may have multiple logically distinct subcomponents; for example, a MIDI synthesizer and a pair of MIDI ports are addressable using a USB port. By grouping a device’s endpoints into entities, the system has enough information for an app to make reasonable assumptions about how to communicate bidirectionally with each entity, as required by MIDI librarian apps.

## See Also

### Entity lookup

- [MIDIEntityGetDevice(_:_:)](coremidi/midientitygetdevice(_:_:).md)
- [MIDIEntityGetNumberOfSources(_:)](coremidi/midientitygetnumberofsources(_:).md)
- [MIDIEntityGetSource(_:_:)](coremidi/midientitygetsource(_:_:).md)
- [MIDIEntityGetNumberOfDestinations(_:)](coremidi/midientitygetnumberofdestinations(_:).md)
- [MIDIEntityGetDestination(_:_:)](coremidi/midientitygetdestination(_:_:).md)
