Forums > MaxMSP

One control to rule them all

July 11, 2010 | 8:12 am

Hello there, I’m trying to build a control system so I can switch one set of dials between a number of zones, for example one set of controls that is switchable between x oscillators (or whatever)

I’m guessing that this has maybe been done already or can be achieved in a much simpler way as it seems like a fairly useful thing to do!

I currently have one dial and a tab object. Tab chooses control ‘zone’ 1-8. Ideally, when you change this value, it should recall the parameter for that zone and assign it to the dial before the stored parameter can be replaced.

However I cant seem to get it to work. Anyone any ideas please??

I’ve attached both files… Thanks a lot!


July 11, 2010 | 12:26 pm

You have an [append $1] in your patch which is throwing errors. Take a look at the patch below and see if it helps.

lh

– Pasted Max Patch, click to expand. –

July 11, 2010 | 2:35 pm

 
for things like that i would use dynamic gates of forward/receive pairs with
names ending on ints, and put a [+ ] in the name formatting path.

then you can control targets 25-48 from your 24 sliders interface by adding
int 24 to the [forward] names.


July 12, 2010 | 5:18 am

You can also have multiple dials atop each other (one layer for each zone) and use the [tab] to bring the current zone dials to the top:

bringtofront [dialscriptingname] message to [thispatcher]

It’s more objects but the appearance is the same, and the layers will of course remember their values as they are unique.

If you name the first dial something like

my_dial[1]

and then alt-drag to copy, they’ll auto-name themselves my_dial[2], etc. Then your message from [tab] (which outputs the numbers 1 to 8 for 8 zones) would go though

sprintf script bringtofront my_dial[%ld]
–> to [thispatcher]

the %ld is replaced by the tab’s output number, you’re done with the whole setup.

It’s good to check out the scripting messages to [thispatcher] anyways if you haven’t, the [thispatcher] help file changed how I do many many things in Max. A very versatile and surprising object to know well… not to mention the many window-control commands, essential for patch-building.


July 13, 2010 | 5:22 pm

Thanks a lot for the replies! The learning never stops :)


July 19, 2010 | 6:47 am

@ Luke Hall – thanks a lot for that, I knew I almost had it!

@ Roman – excuse my ignorance, but I don’t fully understand what you are mean by "dynamic gates of forward/receive pairs". Could you perhaps upload a basic patch if you had a second?

@ seejayjames – Ye thats something I never really looked into! I am sure there are all kind of handy things that can be done from there.

Thanks once again for all the replies.


July 19, 2010 | 2:17 pm

just use forward and receive to build a gate in order to reach different targets:

dial – [forward]

[receive] – DSP 1
[receive] – DSP 2

sorry for the cryptic description :) see the abstractions´ helpfile maybe.

one of the rare cases where i use sends instead of connections.


July 19, 2010 | 2:23 pm

   

Attachments:
  1. forum_dynsend.zip

July 25, 2010 | 2:52 am

oh je, i uploaded from the wrong computer, these abstractions do not work correctly.

please replace the "#2" with "s" in both files and they will do what they should!

-110


July 30, 2010 | 1:14 am

Cool, thanks a lot! Will check them out now


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