Forums > MaxMSP

Drum machine issues

February 18, 2006 | 5:29 pm

Hi

I’m sure this applies to most patches, but I can’t think of a way around it – My patch will be absolutely enormous if I continue as I am! I hope what I am about to explain makes sence.

I need to insert a variable number into a message. At the moment I have to copy every sub patcher for every sample number (what I call a ‘lane’), changing all the instances of a ‘lane’ number in every single patch.

For example, I’m sending individual velocities for each step of each lane like so:
I need the "1" of "lane1" to be a variable:

send lane1_step_velocity1

send lane1_step_velocity16

send lane8_step_velocity1

send lane8_step_velocity16

Add to this decays for each step, and envelopes for each step, and my patch is already enormous at 3 lanes. Also if I want to change anything I have to change it for all eight lanes!

Would really appreciate some help.

Toby


February 18, 2006 | 5:45 pm

i don’t thonk i completely understand, but perhaps poly(~)?
maybe post a patch…


February 18, 2006 | 5:59 pm

Instead of naming lane1_step, lane2_step, etc. Just use #1-lane_step
using an abstraction instead of a subpatcher.

Peter McCulloch


February 18, 2006 | 6:05 pm

Hi Toby,

you need to use abstractions, not subpatchers, and # changeable arguments.
for abstractions look at the "max 4.5 tutorials and topics" manual,
Tutorial 27, (your object); for # arguments look at page 417
(Arguments: $ and #, Changeable Arguments to Objects)

m

HomePage: http://www.giri.it
Computer Music Italian Forum http://www.virtual-sound.com


February 20, 2006 | 10:21 pm

I find Open Sound Control to be very handy when organizing this many parameters. You can build a heirarcical name space and use OSC-route to parse things the properly. Also there are wildcard characters that can be handy.

see:

http://www.cnmat.berkeley.edu/OpenSoundControl/Max/

OSC, it’s not just for networking.

mzed


Viewing 5 posts - 1 through 5 (of 5 total)