Creating objects dynamically
I haven't explored this yet but it's my understanding that scripting is the way that one creates new objects at runtime. So I assume that this means that if I have a bpatcher containing dials and sliders (e.g, a channel strip), I could create as many as I need at runtime, based on some user input. Is that correct?
More importantly, if that is correct, will this work if I create a standalone application?
Thank you.
>> Is that correct?
yes
>> will this work if I create a standalone application?
yes
Alternatively, you could create everything you need in advance, but only display to the user the objects you want him/her to see. You can change the visible portion of the bpatcher with an offset message to a thispatcher object in the bpatcher's subpatch, AND you can change the size of your bpatcher with a script size message to a thispatcher object in the parent patch. Here's an example.
Creating in advance is not practical. For example, I have a virtual mixer patcher that I would like others to use b I have no way to know in advance whether someone needs 4 channel strips and 3 effect inserts or 128 channel strips and 8 effects inserts.
It seems silly to have to predefine maximums.....if I made it 128, the next day someone will want 129!
Did anyone ever figure this out?
I've got a midi mapping/translation app I'm working on and would love the ability to dynamically create and reference objects for any number of combinations of outboard MIDI gear.
You can do it with scripting. There's documentation at https://docs.cycling74.com/max5/refpages/max-ref/thispatcher.html although I must admit I don't understand why it says near the top that creating objects with [thispatcher] is not supported with Max5 and then goes on to tell you how to do it and it clearly works.