Help! I'm stuck. How to send parameter IDs from [zl] to [live.modulate]?

distantnoise's icon

Hi! Since days I'm not making any progress with a device I have in mind. I tried to learn from others devices ("reverse engineered"), asked Claude.ai and so on. I tried [coll] different [zl] objects but I'm stuck.

Let me explain where I am and what I want to achieve.

  1. The device looks for the right now selected device (native Live)

  2. I get all parameter IDs and names of a that device

  3. I set rules to filter the parameter IDs I want to control

  4. I store the IDs from step 3 in [zl.group]

Now I'm stuck. I want the stored ID's to route to individual [message] - at least I think I need that step. Actually I want the stored ID's routed to individual [live.modulate] objects. Depending on the selected device I'll (probably) have 4 up to 24 IDs which then needs to be routed to 4 up to 24 [live.modulate].

I feel dumb because there is probably a pretty easy solution :D

What could be an sane approach to get the stored IDs [zl.group] forwarded to [live.modulate]?

TFL's icon

Check out [listfunnel] + [spray] or [iter]/[zl.iter] + [cycle], or [zl.nth], or [unjoin]/[unpack]

Max Patch
Copy patch and select New From Clipboard in Max.

distantnoise's icon

Thank you. I'll give it a run.

distantnoise's icon

The [cycle] objects works but I do not see a way to use it dynamically. When I set [cycle 24] the values, well cycle through the outputs. Since my device needs to be dynamic this is way from being ideal. Weirdly the other approaches (some of them I tried before myself) always giving me only the very last parameter ID which is stored. The others are "disappearing" though [cycle] shows me all IDs. I'll need to investigate that further. There might be some issue in the logic of my patch before.

TFL's icon

I don't think programmatically creating new [live.modulate~] will work, so you'll probably need to design your device around a fixed maximum number of parameters you want to modulate. So no need for dynamically changing this routing.

Otherwise, I would go with an abstraction containing one [live.modulate~] and a [zl.nth #1]. This way you could create a bunch of [my_modulation_abstraction N], with N being the number of the instance, like from 1 to 24. the #1 in [zl.nth] would be replaced by that number and thus pick up the correct ID from your list of IDs that would be sent to all abstractions.