JS for dynamic patch modification (GUI, but sound engine too)

Julien Bayle's icon

Hi mates,
hope you're all fine in that winter.

Desgning (sketching, actually) a new sequencer, I'd need to dynamically remove/add some parts.
I loved the JS Scripting tuto 02 as soon as I read it (a long time ago) but I didn't really explore it beyond patchers etc.

I'd need to add modules when I click on a button, removing it when I click on another.
modules would be bpatchers (containing both pure max & JS parts + MSP objects too)

1st question: is it possible to do that using bpatchers ? (I guess yes, but the question is more: what is your experiencies / advices about that ?)

2nd question: because each "module" could contain a local DSP stuff, or send via send~, their signals to the main patcher, what should I choose ? (maybe a 3rd or more possibility would be better too)

Any ideas would be appreciated.

Julien Bayle's icon

Hey Kitty!
another "vision" would be to send only sound trigger from each module (which would contain only GUI + max logic stuff) dynamically displayed/treated by JS

I'll test both solution ; I mean: the multi-poly~ one VS the only one poly~ with multi-trigger.
I'll let you all know, if some are interested :)

(kitty, please kiss mimi!)

Julien Bayle's icon

you mean ONE poly + multiple objects dynamically handled with JS (for instance) which trigger that poly, I guess.
It seems the most natural solution (I mean, poly are here to be used like that afaik)

(many thx)

Julien Bayle's icon

yes, no prob in that case.
I'm moving naturally to a static but huge poly, triggered by (a lot of) multiple units and built dynamically

even if JS seems faster than before (I didn't yet tested that with new dictionaries type etc but), JS for gui is safer

GenericUsername's icon

I'm working on a similair project and im running into problems where I don't know how many audio outputs a unit will have it could range from 2 to 16
Does this mean that i need to give all polys 16 signal inputs ?
If so would this cost alot of cpu ?

GenericUsername's icon

Sorry i meant outputs