Bonjour and Apple Network MIDI Discovery
Bonjour serves as the zero-configuration networking backbone for Apple Network MIDI, enabling devices on a local area network to locate and connect with one another automatically. By leveraging Multicast DNS (mDNS) and DNS-Based Service Discovery (DNS-SD), Bonjour eliminates the need for musicians and audio engineers to manually enter IP addresses, subnet masks, or port numbers. Instead, available MIDI sessions are automatically advertised and populated directly inside macOS, iOS, and compatible third-party MIDI tools for seamless real-time interaction.
Zero-Configuration Discovery via mDNS and DNS-SD
Network MIDI on Apple platforms is built on top of RTP-MIDI (Real-time Transport Protocol for MIDI), which transmits timing and performance data across standard Ethernet or Wi-Fi networks. Underneath this transport layer, Bonjour performs two fundamental functions:
- Multicast DNS (mDNS): Translates human-readable
names (such as
Studio-Mac.local) into local IP addresses without requiring a dedicated, central DNS server. - DNS Service Discovery (DNS-SD): Broadcasts specific service records across the local subnet, announcing that an application or device is prepared to send or receive MIDI network traffic.
The
_apple-midi._udp Service Type
When a Network MIDI session is created in the macOS Audio MIDI Setup
utility or via an iOS core MIDI app, Bonjour advertises the endpoint
under the dedicated service registration type:
_apple-midi._udp.
This registration broadcasts the following parameters:
- Session Name: The friendly display name visible to other users.
- Port Number: The dynamic or designated UDP port assigned to handle MIDI clock, control change, and note data.
- Host Address: The local network location of the broadcasting device.
Real-Time Session Browsing in macOS and iOS
Because Bonjour continuously listens for service announcements and
revocations, the "Directory" list in macOS Network MIDI Setup updates
dynamically. When a new device on the network enables an Apple MIDI
session, Bonjour detects the _apple-midi._udp broadcast and
immediately lists the session as available. Conversely, if a device
disconnects or leaves the network, Bonjour detects the absence of the
service and removes it from the directory list, preventing failed
connection attempts.
Handoff to RTP-MIDI
Bonjour's responsibility is strictly limited to discovery, resolution, and name mapping. Once a user initiates a connection to a discovered session, Bonjour supplies the target IP address and port to the underlying operating system. At that stage, standard RTP-MIDI protocol mechanisms take over to negotiate session initiation, manage synchronization, establish latency compensation, and transmit musical data.