<!--
{
  "availability" : [
    "macOS: 10.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDIDriverEnableMonitoring(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:@F@MIDIDriverEnableMonitoring"
  },
  "title" : "MIDIDriverEnableMonitoring(_:_:)"
}
-->

# MIDIDriverEnableMonitoring(_:_:)

Enables monitoring of all outgoing MIDI packets.

```
func MIDIDriverEnableMonitoring(_ driver: MIDIDriverRef, _ enabled: Bool) -> OSStatus
```

## Parameters

`driver`

The driver for which to enable monitoring.

`enabled`

A Boolean value that indicates whether to enable monitoring.

## Return Value

An `OSStatus` result code.

## Discussion

Some specialized drivers, like a MIDI monitor display, can intercept and inspect all outgoing MIDI messages. Enablng monitoring causes the system to call the [`Monitor`](/documentation/CoreMIDI/MIDIDriverInterface/Monitor) function with the outgoing MIDI packets for all destinations in the system. The [`Monitor`](/documentation/CoreMIDI/MIDIDriverInterface/Monitor) function can’t rely on the MIDI events arriving in order, due to the MIDI server’s schedule-ahead facilities.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)