Namespaces

Variants
Actions

ReWire and Reason

From Cycling '74 Wiki
(Difference between revisions)
Jump to: navigation, search
(23 intermediate revisions by one user not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
 
== Overview Material ==
 
 
* [http://cycling74.com/docs/max5/vignettes/core/rewire.html ReWire Vignette]
 
* [http://cycling74.com/docs/max5/refpages/msp-ref/rewire~.html ReWire Reference]
 
* [http://cycling74.com/2006/09/18/rewire-essentials-1-from-maxmsp-to-your-host/ ReWire Essentials, Part 1]
 
* [http://cycling74.com/2006/12/15/rewire-essentials-part-two/ ReWire Essentials, Part 2]
 
  
 
== Using Max with Reason ==
 
== Using Max with Reason ==
  
In the ReWire Essentials tutorials (linked above), we used Max as both a ''mixer'' (hosting application) and "device" (controlled application). These are the two sides of the ReWire connectivity equation, and Max can work equally in both modes. In order to dive into ReWire at a deeper level, let's look at a connection to one of the most-used ReWire packages there is: [https://www.propellerheads.se/products/reason/ Propellerheads Reason].
+
In the ReWire Essentials tutorials (linked at the bottom), we used Max as both a ''mixer'' (hosting application) and "device" (controlled application). These are the two sides of the ReWire connectivity equation, and Max can work equally in both modes. In order to dive into ReWire at a deeper level, let's look at a connection to one of the most-used ReWire packages there is: [https://www.propellerheads.se/products/reason/ Propellerheads Reason].
  
 
In order to have the most fun with our Max/Reason combination, we are going to do some sequencing and audio processing in Max, and use Reason as a synth/sampling and mixing device. What we *won't* do is run the Reason sequencer or use its recording capabilities. In this way, we'll get to do goofy and interesting Max sequencing and processing (something Max is really good at...), and let Reason handle the synthesis (something Reason is damned good at).
 
In order to have the most fun with our Max/Reason combination, we are going to do some sequencing and audio processing in Max, and use Reason as a synth/sampling and mixing device. What we *won't* do is run the Reason sequencer or use its recording capabilities. In this way, we'll get to do goofy and interesting Max sequencing and processing (something Max is really good at...), and let Reason handle the synthesis (something Reason is damned good at).
Line 24: Line 17:
  
 
[[File:MaxReason-Connection-1-all.gif]]
 
[[File:MaxReason-Connection-1-all.gif]]
 
  
 
== Send MIDI Messages to Reason ==
 
== Send MIDI Messages to Reason ==
Line 57: Line 49:
 
Here it is as a copy-compressed patch:
 
Here it is as a copy-compressed patch:
  
<pre><code>
+
<maxpat>
 
----------begin_max5_patcher----------
 
----------begin_max5_patcher----------
 
2118.3oc2b01aaaCD9yI+JHLFv9vb036TpnXX6uv951PghMqCaskLjjS51v5
 
2118.3oc2b01aaaCD9yI+JHLFv9vb036TpnXX6uv951PghMqCaskLjjS51v5
Line 108: Line 100:
 
29+Ps7lFK
 
29+Ps7lFK
 
-----------end_max5_patcher-----------
 
-----------end_max5_patcher-----------
</code></pre>
+
</maxpat>
  
  
Line 123: Line 115:
 
Let's start with the Reason MIDI routing setup. If we go to the top of our instrument rack, our basic Hardware Interface display doesn't even have anything related to MIDI showing. Clicking on the Advanced MIDI will reveal a MIDI router, which is where we do our dirty work.
 
Let's start with the Reason MIDI routing setup. If we go to the top of our instrument rack, our basic Hardware Interface display doesn't even have anything related to MIDI showing. Clicking on the Advanced MIDI will reveal a MIDI router, which is where we do our dirty work.
  
''This is a work in progress...''
+
 
 +
[[File:MaxReason-Connection-3-1.gif]]
 +
 
 +
 
 +
In this case, the MIDI Interface shows "No MIDI Input" (because I didn't set it up in Reason's preferences), but that doesn't matter - we will access these devices directly. For the first channel, we set the MIDI routing to the Kong 1 Input; for the second channel, we set the MIDI routing to the SubTractor 1 In (make sure you are selecting the In option as opposed to the Mixer connection). Now, within Max, if we can access the MIDI Bus A device, we should be able to send MIDI to the individual devices - either individually or simultaneously.
 +
 
 +
Next up is the changes to our Max patch. We need to change the contents of our ''midi'' message to route the message to the correct MIDI channel of Reason's interface device. Luckily, the changes are pretty simple using a few extra inputs and some message formatting.
 +
 
 +
 
 +
[[File:MaxReason-Connection-3-2.gif]]
 +
 
 +
 
 +
We now use the bus number value of the midi message to choose a MIDI bus: #1 is Bus A (in the Reason Advanced MIDI interface), #2 is Bus B, #3 is Bus C and #4 is Bus D. We also have to adjust the MIDI channel by changing the message number (144 in the earlier example) to the range from 144-159; we do this using a "+ 143" after a channel input to set the channel number. Now, if we select a device number of 1 and switch between midi channels 1 and 2, we can switch the MIDI output between the Kong and SubTractor devices.
 +
 
 +
Here's the updated version of the patch:
 +
 
 +
<maxpat>
 +
----------begin_max5_patcher----------
 +
2513.3oc2bsziiaiD9b2+JH71.YWDGshukFDDrK1bIG1K60IKFHKywMyXKYH
 +
I28jDj42d3CIY4tkrdXa1JCFL1sjnIq5qJ9whEI0ue+cKVk9YQ9Bv6.uGb2c
 +
+982cm4V5abW402sXWzmi2FkaJ1hDwyoq9kEKsOpP74Bys+V.jfqta5ghshh
 +
hecuvVyKjIpR8+Kepbs4Wnpku63O4ioIEIQ6L+fE+6LYz1pmrOpH9QYxlOjI
 +
hKr0Gh66QYALFcI.Cwd9KADn9Sjumec6jbXmLQIGF4F0ncxk+locfH0uotrV
 +
g1TXn9l+w82q+X4.wk3zc6DJ07k.y+8m9weB7edLJIQTqRMQ.XsdlIxUUPTg
 +
LMogthoHOT.hPTZG2np9keTqniB6ZVer.cUEPNOzAqZlrMqzW6WiZCBL8m.X
 +
JShWKh6zc5iaSiZ2gBR6CNQXOJEi4zZ8+U3YanFBp73HAvv5eFxeXv19nLks
 +
oPj8AQRzpsFc3541opgUhry1waIXwpnjMGwKkPJ2cXWSgrADhC6ABQbjBB4H
 +
T2HnRDqaA1k1CurQnWA7dPNrnqXu+eT7jLV.9aszyGRlD2GVg.U8ewF9.Je1
 +
0+sK3PyCtQ.d.CJRA4hsJsBDALTjqNjuDDaedwiB6MEOopEf1eF72gDx+P+y
 +
JKSrkRM2qpQ1JSDwoGRLsDoElVzzFqgP83PX.BqPZhFj.PqqH6qBFSL6bJeH
 +
8Hao0a6qVZu5tiMHuHSyigTyOV1CcNScUjtYipoFanaLz4HoBIdATrOhqBPC
 +
oB3P4+n5GU94zAgUoYqEYwoaSyrMDr4vOK0W1rxa5jUd23GEweRrtmpXBv3l
 +
7mkJbnSbrcPDdFPjnH1QDFjpixMnQTtXTC0TZI7fsAoXmzWrKx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rJlUbvPhQzcVKLedMCC7PhgFSlW4hB6NuY7PxsJwg1qgLC
 +
UnC6eMjjsf6az8cx06SkIEkI.GygGeCSvsunXzuhXpN7T5a03L7c0zE+agtD
 +
x7vkGwIHyb1SOQWz25VnKyJVXT3s.YQPOd4ofwcNInfagpPXdrxi3jCcRP7a
 +
ftneKU5WcvSbncgcKzEUm2vxiUjKsKzagtfPJhH6g8vglExsPUTBNp7f73Ry
 +
B9FnKPU2EV4IrvglEzsPUB4pgssmdFWZVtEgfn2MxgUGqAGZWtEgfnEbdPCi
 +
firKCIxY2EIO7VDCBGqHhJOaCtyKAdKhAILvyu7Xq3PmD3sHDDRfZjN6Arvk
 +
pxMIBDy6uGW5aMnA4bW51Fj73vMewPFrA5tr0NDwg4ToAN.oYJqlucaxEse+
 +
Shr7xpzHHK1E8K12EXl2JN5W2z1KM03hLg90Sis776001eb+eBboQs5E
 +
-----------end_max5_patcher-----------
 +
</maxpat>
  
 
== Adding a Second Sequencer ==
 
== Adding a Second Sequencer ==
  
 +
At this point, we can directly access individual Reason devices, so we probably want to have sequencers for each device that match their capabilities. The grid device that we created is perfect for a percussion synth (like Kong), but doesn't really work that well with a standard synthesizer like Subtractor. In order to deal with this, let's reformat our patch a little (in fact, we'll hide some of it inside of an encapsulation to free up some on-screen room), and create a second sequencer that will produce basslines suitable for Subtractor.
 +
 +
 +
[[File:MaxReason-Connection-3-3.gif]]
 +
 +
 +
You will notice quite a few changes in this patch. First, we've hidden much of our logic within subpatchers (named timing-and-randomize and different-timing-and-randomize) to free up a little space. Since the two sequencers are of different types (live.grid and live.step), we need somewhat different timer/randomizer functions, so peering inside these subpatchers might be useful as you create your own, personalized version of this patch. The other place where we've tucked in some interesting logic is in the formatter subpatchers. Here is where we format the MIDI messages that properly route the data to the correct devices. It is important that you either make this logic very flexible, or you make sure you are always using the same Reason setup, since the MIDI message formatting is specific to the Advanced MIDI setting of the Reason device set that you use.
  
 
== Modulation of Reason Parameters ==
 
== Modulation of Reason Parameters ==
 +
 +
As cool as it is to generatively fire off notes to Reason, we can take Reason even farther if we can automate the parameters of our Reason devices. Not surprisingly, this can also be accomplished by sending MIDI messages (in this case, MIDI CC messages), but we need to know which MIDI controller messages to use, and we need to properly format the messages for the ReWire connection. This first part of this is provided by our friends at Propellerheads; the [http://dl.propellerheads.se/Reason65/Manuals/Reason%206.5%20MIDI%20Implementation%20Chart.pdf Reason 6.5 MIDI Implementation Chart] gives us MIDI CC mappings for virtually every knob, slider and switch of the devices available. We will be referring to this manual extensively in the next section, so it is probably wise to download it now...
 +
 +
Our next addition to the patch is to create a parameter animator. The easiest thing to do - and to hear - is to manipulate the filter. With a few simple additions, we can get an animator that randomly changes the filter 1 cutoff and resonance of the SubTractor synth in time with the rest of the piece. The animator looks like this:
 +
 +
 +
[[File:MaxReason-Connection-3-4.gif]]
 +
 +
 +
Here we have to use the raw MIDI CC message type (which starts at 176 for channel 1, and here is set to 177 for channel 2), along with the controller number and the value. The value is coming from the random objects, and the controller number is straight out of the MIDI Implementation Chart. This gives us the following patch:
 +
 +
<maxpat>
 +
----------begin_max5_patcher----------
 +
3805.3oc6c01iiaaD9y69qfv3PSK5tthuIJEDDzzK.EAEooH8Z+xkfEZs05U
 +
4jkLjj26tDj7au7EIsR1R1zdEk4kJb25cMkszvGNyvgyLb3ub8UytO8Cg4y.
 +
eN3sfqt5Wt9pqjMIZ3px2e0r0AeXQbPt7iMKI78o2+SytQcohvOTHaNKHYY5
 +
Z.zwo5RIaWGkDGVH+ZnxFeHMoHO5mCEsAQycJadSPwhGiRVcWV3hBE0343vu
 +
L.6xlSuAvnh2f3MA9wmu+oaKpd.vxVUMU7wMgpayrnD9M7Ga73SBVKu1ruJK
 +
JHthZiVJai20tEhmIZ6Wu9ZwK2nItrNLOOXU3d.y5nkQ.G.D.YL.CBdEbXAH
 +
B0Q.PPGew6fdmNBcpvCppwMYg4gIEAEQoIcPXDOAgI+a431Y.p8vrkuHHNT.
 +
pHF.6.76lmy8jgTWlqjmymIwRmyl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ZozHNJugB2zrnlw.F1gUP0AAuQ7haz
 +
sddJfxx1QyNzfJGrMIpHu3iJ.fzAC7Z93nTovytZs0Uij8waYNcd8H9sORod
 +
P1qdd0hcHK5nonVCFkiIqI+nubgs1QDqYzvRyC2DvWpyPMGnizsiDhhe1cuC
 +
kXScxzLa.QEQhDXBPApr5VUR0FAPAOfFKkE9d97b+F36CCxSSNgC.LsLDm3W
 +
p+ygdDKwcOUcb6OgsVX2YsvEglrsQGDZD.5c0Y8Aec9kgd+TANF84kKCgHMW
 +
+hf.U19FtdS5rgR3q0Zhke21QAPgc65HuRD7vd8WKWQuue612mc6MTpK4ryi
 +
RmDS0nziuNji6nQNDMHG+wavBoC5LZjiNrxjQiZb8rJvwUGAK2Qjdzg2gLhC
 +
WPMnGp23QOZPNrQkZfZPMvQgZn5HZ4NdiUTrUIpS0QzBSGO5Y.Pmc2dZP4Yw
 +
Iorjch3ViU+1F9JZvl1UGoQ53YkDQG6.FOijvL6hgCaY5xwlS..q7dak.f7s
 +
FP..oicv3i0GZD6BwRwf9tva54u7k+kI5I5X1w3YPOz0pl5PGAG2QkZfZPMm
 +
iUGpENuy9DRPH6r+f1YuAs69Bhe290q+e1Y0HHA
 +
-----------end_max5_patcher-----------
 +
</maxpat>
 +
 +
At this point, we've created a pair of unique sequencers and a pair of random number generators, and have them use the rewire~ object to control a pair of devices within Reason. Unfortunately, that's not really why we would want to use ReWire; this same functionality could be accomplished by sending MIDI data through Max's Virtual MIDI ports, and wouldn't require ReWire at all. Where rewire~ becomes necessary is when we want to get the audio out of the devices and further manipulate it within Max - allowing us to hand-roll our own audio processing to create sonic mayhem that couldn't be done within Reason itself. Let's use the audio outputs of the rewire~ object to further mess with our sounds, and see what we can do!
 +
 +
== Messing with the Audio Output ==
 +
 +
We have to start off by changing the patch cord wiring of our Reason Device Rack. Basically, we are going to bypass the built-in mixer, and route the outputs of our devices directly to audio outputs of the Interface. This will allow us to treat the audio of each of the synthesizers separately within our Max patch. (Note: In order to make the back panel more clear, I've removed all of the cables connecting the default effects processors.)
 +
 +
 +
[[File:MaxReason-Connection-4.gif]]
 +
 +
 +
 +
Now, instead of mixing the device outputs in Reason, they are available to the ReWire host: Channels 1 and 2 will be the stereo output of Kong, and channel 3 will be the mono output of the Subtractor synth. Now, let's jump back to the Max patch to subject these channels to some MSP mayhem.
 +
 +
 +
[[File:MaxReason-Connection-4-1.gif]]
 +
 +
 +
Gaining access to the new channels is pretty simple: we just change the number of channels in the rewire~ object to 3 (to match the outputs of Reason that we are going to use), then use live.gain objects to create a mix of the two devices for our output. The next stop is to create a few idiosyncratic effects processors for the out-bound audio.
 +
 +
There are many kinds of effects available using Max; in this case, we are going to allow the drums to pass through unchanged, but apply a "chopper" effect to the SubTractor line that is in sync with the main tempo. Since all of this information lives within the Max patch, it is easy for us to use tempo, subdivision and content cues from our Max-based objects.
 +
 +
[[File:MaxReason-Connection-Final.gif]]
 +
 +
I started by adding a rhythmic "scrambler" to our Kong drum audio (double-click on the subpatcher to see its contents). To do this, I combined the {maxword|name=chucker~} object with some code that will do the basic setup and sequencing for me. What this subpatcher does is watch the transport location, and creates a repeating section occasionally (based on the amount value we provide as an input). You'll notice that my random value selections mean that the number and location of repeats are constantly varying, but the length is always a 16th note. This provide interesting (if not always well-controlled) results.
 +
 +
Next, I added a beat-sync'd bit-crush effect to the SubTractor output. Working with this is similar to some of the earlier beat-sync things we did. In this case, we track the transport, and on sixteenth note divisions we randomly alter the value between 2 and 8 bits.
 +
 +
These are just two simple (but kind of interesting) examples of audio manipulation of Reason's output. It is unlikely that either of these audio processors would ever be created by Propellerheads (or Rack Extension developers) to be included within Reason; thus, being able to design our own crazy effects gives us advantages we'd never otherwise have. Great fun!
 +
 +
<maxpat>
 +
----------begin_max5_patcher----------
 +
6490.3oc6cs0jiaic94d9UvnZprO3t0RbiWb4xk2rIUdHUhS43jW75ZJ1RrU
 +
ycnH6hjZF6YKO+1CH.nDoD.In3klTMqwt6VhThG7ctAbv4bv+3c2s5w3eyOc
 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e
 +
F17N7kJPAMEAEESUJw+yTG0e03m78RiiLPW8zvwtB4ELpt4g2l0dX2drQlIq
 +
pFuJ4S+JPwbaZGBJihe3XVGXYVr6usEBsImV0L..u.+xep7I15u+k3URTCgi
 +
4paXzU0PSywtyitj.AaHpR0UJvGS0uKilzkQR5Bdo1zisFziyzibLGGxobPe
 +
0ptsGVxQGgG2Jz7PRNtUDKTD27QSzwUCrwZTkbzgSMdTCPCpYb3TNZfMimRk
 +
iFXy3YO1RGvALZfikNVbrFQ5ApA8fwiG8nidNY7bXYMoTsrlTpVDcTsrFOdE
 +
AMoT0I5nZgHiG8zCny4k9Gfc3mhE8IUHckFGe4omTuMBv5nMdlTvPhnmYWTQ
 +
KpZ7HGcXvliF4frmVx+nIlqEzvoOh3a.Rg9H6kCf9HTmkHfZZLTZSDyi5Av0
 +
Bbuh+xk8WCwHQmYAMhK1wZR4IC.00xxHETCScnmqkcwCI0YkEVNobV4fcVof
 +
cdYfQ+19i28+CqIeJq.
 +
-----------end_max5_patcher-----------
 +
</maxpat>
  
  
 
== Wrapping it Up ==
 
== Wrapping it Up ==
  
 +
Hopefully this article inspires you to extend the Reason environment by using ReWire to connect it to Max. There are a world of things that can occur in this combination, and the results are often very different than you would normally create within the Reason sequencer. But don't limit yourself to this code - alter, add and twist this to create your own creation, and have a blast working it!
 +
 +
== Additional Material on ReWire ==
 +
 +
* [http://cycling74.com/docs/max5/vignettes/core/rewire.html ReWire Vignette]
 +
* [http://cycling74.com/docs/max5/refpages/msp-ref/rewire~.html ReWire Reference]
 +
* [http://cycling74.com/2006/09/18/rewire-essentials-1-from-maxmsp-to-your-host/ ReWire Essentials, Part 1]
 +
* [http://cycling74.com/2006/12/15/rewire-essentials-part-two/ ReWire Essentials, Part 2]
  
 
[[Category:Max And Rewire]]
 
[[Category:Max And Rewire]]

Revision as of 02:52, 8 January 2013

Contents


Using Max with Reason

In the ReWire Essentials tutorials (linked at the bottom), we used Max as both a mixer (hosting application) and "device" (controlled application). These are the two sides of the ReWire connectivity equation, and Max can work equally in both modes. In order to dive into ReWire at a deeper level, let's look at a connection to one of the most-used ReWire packages there is: Propellerheads Reason.

In order to have the most fun with our Max/Reason combination, we are going to do some sequencing and audio processing in Max, and use Reason as a synth/sampling and mixing device. What we *won't* do is run the Reason sequencer or use its recording capabilities. In this way, we'll get to do goofy and interesting Max sequencing and processing (something Max is really good at...), and let Reason handle the synthesis (something Reason is damned good at).

Let's start by creating a very basic connection between Max and Reason. Here's the patch that I created:

MaxReason-Connection-1-basic.gif

Unlike what you see in most of the ReWire help files, I'm using the rewire~ object with a named device. This allows me to state explicitly that this is a connection to Reason, and I don't have to mess around with application selection or other confusing UI elements. I connect the outputs of the rewire~ object to an audio chain (live.gain and ezdac~), and I create two message for the input: "openpanel" and "closepanel".

Different ReWire clients work differently, and even the same application not work the same on Windows vs. Mac. In my case (Max OS X, Reason 6.5), clicking on the "openpanel" message will actually launch the Reason application in ReWire client mode, and will be completely active with no other interaction. If I create a Reason instrument (Kong, in this case), I can play that instrument and receive the audio within my Max patch.


MaxReason-Connection-1-all.gif

Send MIDI Messages to Reason

The next thing we want to do is to fire notes into the Kong instrument using MIDI messages from Max. To do this, we have to send a specially formatted message into the rewire~ object. The format of the message is:

midi <timestamp> <bus number> <MIDI message> <note value> <velocity value>

Since we don't care about sequence timing or routing, our timestamp and bus number are always 0. Since we are sending notes, our MIDI message is always 144. The note number and velocity information is created by a makenote object, which will take our incoming note information and turn in to MIDI note pairs (noteon and noteoff messages).

The basic note-playing patch will look something like this:


MaxReason-Connection-2-1.gif

In order to virtually "play" any of the Kong's pads, just click on one of the message boxes (numbered 1-16).

Sequencing in Max, Playing in Reason

The next step is to create some way to do an interesting sequencing system in Max. Let's start by making a simple drum matrix sequencer that is run off the transport:

MaxReason-Connection-2-2a.gif

In this case, we have a transport-based timing system that uses a counter to output a step position. This goes into a live.grid object (set to matrix mode), then the output is split apart and sent to our input keys. These keys are used to send the MIDI messages from the previous patch to the Kong drum machine. This creates a basic grid-style drum sequencer that can play back Kong without having to mess around with pad programming.

But why program the grid at all. By watching for the first step of the sequence and randomizing the grid, we can have Max do the hard work for us! In this updated patch, I have a compound message that is activated whenever the first step is seen:

MaxReason-Connection-2-2b.gif

At that first step, the message will clear and randomly place one note in each column. But I also want a four-on-the-floor kick drum, so I'm using the setcell message to force the kick to fire on every downbeat. While this is really simple generative stuff, it also is surprisingly good-sounding. In fact, some of the patterns are so good that I don't want an immediate change to the next pattern, so I placed a switch at the output of the generator to allow me to "hold" a pattern until I'm sick of it.

Here it is as a copy-compressed patch:

-- Pasted Max Patch, click to expand. --


Adding a Second Instrument

Jumping back to Reason, I've now added a second instrument: a SubTractor analog-ish synth. When you create a new instrument, it makes a new track in the sequencing area of application:


MaxReason-Connection-3.gif


If you start our grid-based sequencer, you will hear that the MIDI stream is not routed; rather, the MIDI input is used by whichever track is currently selected. This isn't optimal, so we want to find a way to force our sequence to be routed to a chosen instrument. Performing this sort of routing magic will require two things: MIDI routing setup within Reason, and manipulation of the midi message that we are sending to the rewire~ object.

Let's start with the Reason MIDI routing setup. If we go to the top of our instrument rack, our basic Hardware Interface display doesn't even have anything related to MIDI showing. Clicking on the Advanced MIDI will reveal a MIDI router, which is where we do our dirty work.


MaxReason-Connection-3-1.gif


In this case, the MIDI Interface shows "No MIDI Input" (because I didn't set it up in Reason's preferences), but that doesn't matter - we will access these devices directly. For the first channel, we set the MIDI routing to the Kong 1 Input; for the second channel, we set the MIDI routing to the SubTractor 1 In (make sure you are selecting the In option as opposed to the Mixer connection). Now, within Max, if we can access the MIDI Bus A device, we should be able to send MIDI to the individual devices - either individually or simultaneously.

Next up is the changes to our Max patch. We need to change the contents of our midi message to route the message to the correct MIDI channel of Reason's interface device. Luckily, the changes are pretty simple using a few extra inputs and some message formatting.


MaxReason-Connection-3-2.gif


We now use the bus number value of the midi message to choose a MIDI bus: #1 is Bus A (in the Reason Advanced MIDI interface), #2 is Bus B, #3 is Bus C and #4 is Bus D. We also have to adjust the MIDI channel by changing the message number (144 in the earlier example) to the range from 144-159; we do this using a "+ 143" after a channel input to set the channel number. Now, if we select a device number of 1 and switch between midi channels 1 and 2, we can switch the MIDI output between the Kong and SubTractor devices.

Here's the updated version of the patch:

-- Pasted Max Patch, click to expand. --

Adding a Second Sequencer

At this point, we can directly access individual Reason devices, so we probably want to have sequencers for each device that match their capabilities. The grid device that we created is perfect for a percussion synth (like Kong), but doesn't really work that well with a standard synthesizer like Subtractor. In order to deal with this, let's reformat our patch a little (in fact, we'll hide some of it inside of an encapsulation to free up some on-screen room), and create a second sequencer that will produce basslines suitable for Subtractor.


MaxReason-Connection-3-3.gif


You will notice quite a few changes in this patch. First, we've hidden much of our logic within subpatchers (named timing-and-randomize and different-timing-and-randomize) to free up a little space. Since the two sequencers are of different types (live.grid and live.step), we need somewhat different timer/randomizer functions, so peering inside these subpatchers might be useful as you create your own, personalized version of this patch. The other place where we've tucked in some interesting logic is in the formatter subpatchers. Here is where we format the MIDI messages that properly route the data to the correct devices. It is important that you either make this logic very flexible, or you make sure you are always using the same Reason setup, since the MIDI message formatting is specific to the Advanced MIDI setting of the Reason device set that you use.

Modulation of Reason Parameters

As cool as it is to generatively fire off notes to Reason, we can take Reason even farther if we can automate the parameters of our Reason devices. Not surprisingly, this can also be accomplished by sending MIDI messages (in this case, MIDI CC messages), but we need to know which MIDI controller messages to use, and we need to properly format the messages for the ReWire connection. This first part of this is provided by our friends at Propellerheads; the Reason 6.5 MIDI Implementation Chart gives us MIDI CC mappings for virtually every knob, slider and switch of the devices available. We will be referring to this manual extensively in the next section, so it is probably wise to download it now...

Our next addition to the patch is to create a parameter animator. The easiest thing to do - and to hear - is to manipulate the filter. With a few simple additions, we can get an animator that randomly changes the filter 1 cutoff and resonance of the SubTractor synth in time with the rest of the piece. The animator looks like this:


MaxReason-Connection-3-4.gif


Here we have to use the raw MIDI CC message type (which starts at 176 for channel 1, and here is set to 177 for channel 2), along with the controller number and the value. The value is coming from the random objects, and the controller number is straight out of the MIDI Implementation Chart. This gives us the following patch:

-- Pasted Max Patch, click to expand. --

At this point, we've created a pair of unique sequencers and a pair of random number generators, and have them use the rewire~ object to control a pair of devices within Reason. Unfortunately, that's not really why we would want to use ReWire; this same functionality could be accomplished by sending MIDI data through Max's Virtual MIDI ports, and wouldn't require ReWire at all. Where rewire~ becomes necessary is when we want to get the audio out of the devices and further manipulate it within Max - allowing us to hand-roll our own audio processing to create sonic mayhem that couldn't be done within Reason itself. Let's use the audio outputs of the rewire~ object to further mess with our sounds, and see what we can do!

Messing with the Audio Output

We have to start off by changing the patch cord wiring of our Reason Device Rack. Basically, we are going to bypass the built-in mixer, and route the outputs of our devices directly to audio outputs of the Interface. This will allow us to treat the audio of each of the synthesizers separately within our Max patch. (Note: In order to make the back panel more clear, I've removed all of the cables connecting the default effects processors.)


MaxReason-Connection-4.gif


Now, instead of mixing the device outputs in Reason, they are available to the ReWire host: Channels 1 and 2 will be the stereo output of Kong, and channel 3 will be the mono output of the Subtractor synth. Now, let's jump back to the Max patch to subject these channels to some MSP mayhem.


MaxReason-Connection-4-1.gif


Gaining access to the new channels is pretty simple: we just change the number of channels in the rewire~ object to 3 (to match the outputs of Reason that we are going to use), then use live.gain objects to create a mix of the two devices for our output. The next stop is to create a few idiosyncratic effects processors for the out-bound audio.

There are many kinds of effects available using Max; in this case, we are going to allow the drums to pass through unchanged, but apply a "chopper" effect to the SubTractor line that is in sync with the main tempo. Since all of this information lives within the Max patch, it is easy for us to use tempo, subdivision and content cues from our Max-based objects.

MaxReason-Connection-Final.gif

I started by adding a rhythmic "scrambler" to our Kong drum audio (double-click on the subpatcher to see its contents). To do this, I combined the {maxword|name=chucker~} object with some code that will do the basic setup and sequencing for me. What this subpatcher does is watch the transport location, and creates a repeating section occasionally (based on the amount value we provide as an input). You'll notice that my random value selections mean that the number and location of repeats are constantly varying, but the length is always a 16th note. This provide interesting (if not always well-controlled) results.

Next, I added a beat-sync'd bit-crush effect to the SubTractor output. Working with this is similar to some of the earlier beat-sync things we did. In this case, we track the transport, and on sixteenth note divisions we randomly alter the value between 2 and 8 bits.

These are just two simple (but kind of interesting) examples of audio manipulation of Reason's output. It is unlikely that either of these audio processors would ever be created by Propellerheads (or Rack Extension developers) to be included within Reason; thus, being able to design our own crazy effects gives us advantages we'd never otherwise have. Great fun!

-- Pasted Max Patch, click to expand. --


Wrapping it Up

Hopefully this article inspires you to extend the Reason environment by using ReWire to connect it to Max. There are a world of things that can occur in this combination, and the results are often very different than you would normally create within the Reason sequencer. But don't limit yourself to this code - alter, add and twist this to create your own creation, and have a blast working it!

Additional Material on ReWire