---
title: destinationMIDIEndpoint
framework: avfaudio
role: symbol
role_heading: Instance Property
path: avfaudio/avmusictrack/destinationmidiendpoint
---

# destinationMIDIEndpoint

The MIDI endpoint you specify as the track’s target.

## Declaration

```swift
var destinationMIDIEndpoint: MIDIEndpointRef { get set }
```

## Discussion

Discussion This property and a destinationAudioUnit are mutually exclusive. Setting this property removes the track’s reference to an AVAudioUnit destination. When playing, the track sends events to the MIDI endpoint. For more information, see MIDIDestinationCreate(_:_:_:_:_:). You can’t change the endpoint while the track’s sequence is in a playing state.

## See Also

### Configuring the Track Destinations

- [destinationAudioUnit](avfaudio/avmusictrack/destinationaudiounit.md)
