MAX/MSP with ProTools Tutorial

peacesong's icon

As part of a project at school, I created a tutorial on using MAXMSP with Protools. Seems this might be useful to others and was asked to put up a webpage with example code, etc. Will probably also create a video to walk through the steps.

Question 1: Would this be a useful thing to add somewhere in this forum? Or, a link from a post like this to my school page on this? Or, in some other way contribute to the max community?

Here's an outline of what is covered:
1) Generating MIDI in MAX and sending to ProTools
a) using PT as a sound module
b) recording the midi

2) Midi output from ProTools to MAX
a) playing input via ctlin directly
b) modifying the incoming data and returning to PT

3) Generate audio in MAXMSP and record in PT (using rewire)

4) ProTools midi -> MAXMSP-> audio generated in max->record in ProTools

5) PT Audio -> MAX manipulation -> back to ProTools audio recording

Question 2:
I think I have good instruction for steps 1-4, but don't see how to do step 5 unless I use physical wires (ie, output of ProTools physically wired into an audio channel...).

Is there a good way to send audio from protools to maxmsp and back to protools? Ie, an RTAS audio pluggin? (pretty green here - seems this may be what the pluggo discussion is about)

Thank you for your guidance,
Stephen

Pierre Alexandre Tremblay's icon

peacesong wrote on Sun, 31 May 2009 00:08in some other way contribute to the max community?

I these times of Pluggo mourning, this would be welcome. My students struggle with this, and I would definitely need to do a how-to so if you have done one, I can give them the link!

thanks for sharing

pa

Guillaume Bertrand's icon

If you achieve to do step 5 without wires, I would really appreciate to know how you did it..!

thanks for sharing

Guillaume Evrard's icon

hi,

you could try Jack audio server in order to map audio between max ans pt.

let's say pt outputs 1&2 are mapped on max inputs 1&2, and then the signal is sent to max outputs 3&4, and received in pt inputs 3&4.

just be careful not to create a feedback loop.

if you're on a mac : http://www.jackosx.com/

g

@guillaume : c'est mal d'être sur le forum max au boulot

Guillaume Bertrand's icon

Unfortunately protools does not work with core audio. So neither soundflower nor jackosx will work with protools.

This thread : https://cycling74.com/forums/index.php?t=msg&goto=149775&rid=0&S=90106e6b701fd9754ba4530e62844c70
mentions a time consuming method that does not fit my needs at all.

Maybe it will fit you.

@guillaume : c'est celui qui dit qui y est...

Samueled's icon

That would be amazingly useful! Please post a link!

peacesong's icon

Sorry for the delay (thought, I had posted this already)...
================
Hi Everyone,

Here are step by step instructions on re-creating the demo presented this quarter. In addition to step-by-step instructions, I create sample MAX and ProTools projects at the end of each major step so that you can see exactly how this works.

Zip of sample projects Here =>http://www.wou-edu.info/ProToolsMaxSteps.zip

Try to reproduce with without using the example projects.

Please let me know if you have suggestions to improve tutorial.

Thank you,

Stephen Pierce

Overview
1) Max midi -> PT
a) max midi to play instrument (pt as tone module)
b) record midi data on instrument track

2) PT midi -> MAX
(draw volume and interpret as notes)
a) play it

mix with generated midi using input as velocity
b) operate and return it

3) MAX audio -> record in PT (rewire)
a) via PT sound from inst to audio (ie, midi in)
b) max audio via rewire (taking output of ezdac)

4) PT midi-> MAX audio -> PT audio
back to using midi input

- Detailed steps (try following instructions without looking at sample files)

1.a. Create a ProTools session

1.b. Create a stereo Instrument Track

1.c. Create a new max patcher

1.d. Create simple midi generating steps (eg, metro, random, makenote, noteout -see example)

1.e. Double click on noteout to view output list and select "from maxMSP 1" (or equivalent, depending on your protools hardware setup).

1.f. Turn on the max midi generator

1.g. In ProTools, create an insert on the instrument track. Select a sound modules, such as "multi channel plugin->instrument->Mini grand (stereo)"

1.h. Record enable the track

At this point you're using ProTools as a sound module for MAX midi data.

1.i. Now, begin recording in ProTools and you will capture the midi data on the instrument track.

See projects:
named "step1"

2. PT midi -> MAX

2.a. create a midi track in ProTools with some midi data (eg, you could draw volume change controller data)

2.b. set the output of the midi track "to Max MSP1-1"

2.c. in Max, create a "ctlin" (control input) object

2.d. in max, connect the left outlet of ctlin to the middle inlet of makenote

2.e. Play in Protools

2.f. double click on "noteout" in Max and change the output back to AU DLS Synth 1 (on mac, or the previous default on PC)

If using the sample files, notice the volume goes up and down on the randomly generated notes.

2.g. Next, connect the left outlet of ctlin to the left inlet of makenote.

Notice that the volume control data is now used to create a series of notes. How is this possible? Can you explain this?

2.h. Finally, return the output of "noteout" to ProTools as described above

2.i. create a stereo audio track in protools and set it's input to Bus 1-2

2.j. set the output of the instrument track to be Bus 1-2

2.k. record enable the audio track and record in protools; turn on max

What we're now doing is sending midi data from ProTools to Max, which is used in computation of new midi data which is returned to ProTools, routed through a Sound module and recorded on the instrument track as well as an audio track.

3) MAX audio -> record in PT (rewire)
and, PT midi-> MAX audio -> PT audio

*) max audio via rewire (taking output of ezdac)

3.a. remove output from makenote going to noteout

3.b. create ezdac and connect makenote to mtof to cycle~ to the ezdac

Now, the output of the max patch is no longer midi data, but raw frequency data (sound).

3.c. Change the DSP output to ad_rewire
Options->DSP Status->Driver->ad_rewire

3.d. In protools change the insert on the instrument track to be multichannel->instrument->maxmsp (stereo)

(note, turn your volume down as this new signal will be HOT)

3.e. turn on max; record enable and record

3.f. next, use the controller input data (ctlin) as a gain control on the volume to ezdac (see example for specific steps)

To recap: We now have midi controller data from protools driving the generation of frequency creation in MAXMSP, which is routed as an audio signal via ReWire back to ProTools thru the instrument track, to the audio track for recording.

Note: the instrument track is unique in that it can process input as midi or audio.

5) ProTools Audio -> Max MSP audio manipulation -> ProTools

Get out your cables and experiment with different configurations.

roger.carruthers's icon

Nice one.
You might also want to mention that you can use hostsync~ & hostphasor~ to receive sync data from PT in Max, so that you can slave, say a Max arpeggiator to PT and record the audio back into PT.
I did this with my VST Shell app to play VST instruments sequenced/arpeggiated in Max and record the results in PT - there's a brief description of the setup in the Readme file for VST Shell, which is at www.wildfrontear.co.uk/VST Shell UB.zip .
Note that this is quite an old version, so the Readme refers to older versions of PT, which I think pre-dates Instrument tracks. I've actually recently revisited VST Shell and made a number of improvements to the sequencer/arpeggiator in particular, which I could post if anyone's interested,
cheers
Roger

Matthew Aidekman's icon

regards to 5. Don't you just wanna start a petition? Or hack your own bridge plugin... Kidnap the CEO of avid and ask for interopribility as ransom? hack those pci cards and publish an API or break into headquarters and steal the technical documents. Maybe hire an ex digi employee and start a sequel to blackwater. Can someone sue for anticompetitive practice? I wish you could blame cycling because then something might actually get done but you just can't.
The thing that's frustrationg is that in order to develop pt plugins you literally have to sign a contract that says you won't make this possible. I know a pretty shady way to get a plugin written for 5k but I couldn't get enough interest. To make it worth it.

I've spent ten minutes a day for the last month trying to get this done *without* an ak 47 and a prayer.

tomazbevilaqua's icon

Hey, I was following your tutorial and there's only one problem.

I'm trying 3) MAX audio -> record in PT (rewire). Everything's seems to work. I can hear the Max sounds through PT, the volume meter is jumping up and down and etc, but there's where the problem comes. I can't record anything. The track is record enabled and I can hear everything though PT but when I try recording it the track just comes out blank. Do you, by any chance, know what's happening?

Thanks again,

Tomaz

peacesong's icon

Hi Tomaz,

Glad to hear that [most] of this example is working well for you.

Try bussing output of the instrument track to the input of an audio track.

Ie, on instrument track, change output to bus1; create an audio track and set it's input to bus1.

Best wishes,
Stephen