A newer version of Max is available. Click here to access the latest version of this document.
Using ReWire in Max/MSP
Max supports ReWire, a software protocol developed by Propellerheads that allows data transfer and remote control among audio software applications. In addition to being able to route audio between Max and ReWire compatible applications, ReWire supports sending synchronization, transport, and tempo information both to and from Max and the host application.
You can use Max as a ReWire client and route audio from Max into another application (such as Ableton Live or Digital Performer) using ad_rewire, a special audio driver.
You can also use Max as a ReWire mixer using the rewire~ object and route audio to Max from other applications.
You cannot use both the ad_rewire audio driver and the rewire~ object simultaneously; When you try to use them at the same time, you won’t get any audio output because each is waiting for the other: the ad_rewire driver is waiting for the rewire~ object to ask it for an audio stream, but the rewire~ object can't do anything unless given processing time by an audio driver.
You can also use the ad_rewire driver when creating standalone applications.
Using Max as a ReWire client
To use Max as a ReWire client and route audio to another application the Max ad_rewire driver is used.
Enabling the ad_rewire driver
With ad_rewire selected as the audio driver for Max, there are three MSP objects you can use to provide this information and to control the host’s transport:
Connecting from Max to a host application using ReWire
Hosting a ReWire client
The rewire~ object is used when Max is used as a ReWire host, routing audio from other host applications to Max. The rewire~ object allows you to select a ReWire client, use the available audio outputs, send and receive MIDI messages and control the connected device’s transport controls.
Creating a connection from a ReWire client to Max

Routing ReWire client audio outputs to Max/MSP outputs
In addition to routing audio from other applications through Max, the rewire~ object also lets you control the transport mechanism of any client application to which it is connected, and to send and receive MIDI messages. See the rewire~ help file and the rewire~ object Reference page for more information.
ReWire and MIDI
Rewire 2 also supports MIDI communication to and from ReWire Devices. Currently both the rewire~ object and the ad_rewire~ driver support MIDI, although they work in different ways.
When you use the ad_rewire driver, Max MIDI ports are automatically created so you can use the standard Max MIDI objects to send and receive MIDI. After you choose the ad_rewire driver in the DSP Status Window, MIDI ports will appear in the MIDI Setup window the next time it is opened.
Using MIDI with the ad_rewire driver
By default, the ad_rewire driver has two MIDI input channels and two MIDI output channels available for your use.
Setting up MIDI ports with the ad_rewire driver
You can use the same procedure to set up an output port using the midiout object.

Adding MIDI ports to ReWire
Using MIDI with the rewire~ object
When you use Max as a ReWire host using the rewire~ object, MIDI messages are automatically sent and received using the rewire~ object—it includes a dedicated outlet for MIDI messages, and you can use the midi message to the rewire~ object to send MIDI data to the ReWire clients. For more information about the format that the rewire~ object understands, see the rewire~ object Help file or the rewire~ object Reference page.