---
title: MIDIPortRef
framework: coremidi
role: symbol
role_heading: Type Alias
path: coremidi/midiportref
---

# MIDIPortRef

A MIDI connection that a client maintains.

## Declaration

```swift
typealias MIDIPortRef = MIDIObjectRef
```

## Discussion

Discussion A port object derives from MIDIObjectRef, and its owning object is a MIDIDeviceRef. It represents an input or output port, and it provides the means to communicate with any number of MIDI sources or destinations.

## See Also

### Port management

- [MIDIInputPortCreateWithProtocol(_:_:_:_:_:)](coremidi/midiinputportcreatewithprotocol(_:_:_:_:_:).md)
- [MIDIOutputPortCreate(_:_:_:)](coremidi/midioutputportcreate(_:_:_:).md)
- [MIDIPortDispose(_:)](coremidi/midiportdispose(_:).md)
- [MIDIPortConnectSource(_:_:_:)](coremidi/midiportconnectsource(_:_:_:).md)
- [MIDIPortDisconnectSource(_:_:)](coremidi/midiportdisconnectsource(_:_:).md)
- [MIDIReceiveBlock](coremidi/midireceiveblock.md)
