Welcome to %s forums

BrainModular Users Forum

Login Register

Looking for a "send index if has changed" module

I need help on a Patch
Post Reply
creal
Member
Posts: 96
Contact:

Looking for a "send index if has changed" module

Unread post by creal » 13 Dec 2022, 17:54

Hello,

I am building a simple patch to tweak parameters of a MIDI device.

The patch works but I think it could be optimized. To achieve this, and because only one paramter can be tweaked at the same time, I would like a module that would take n data flows and return the index of the flow that is changing. Does it exist?

If you see another way to reduce the number of modules, please tell me how. For the moment, I am using switch groups and pass multi modules but there are a lot of cables just for playing with a few faders.

Thanks,

creal.
Attachments
Control Change.pat
(92.43 KiB) Downloaded 554 times

SylvainT
Site Admin
Posts: 494
Contact:

Unread post by SylvainT » 13 Dec 2022, 19:45

Hello

One idea for three faders.
You can continue.

All the best

Sylvain
Control Change 2.pat
(42.33 KiB) Downloaded 755 times

creal
Member
Posts: 96
Contact:

Unread post by creal » 13 Dec 2022, 20:16

Thank you very much Sylvain. I would never find that way of patching by myself.

The "max pos" module is great. The only thing that I don't understand well is the "wait", "minus", "abs", "concat" modules before entering the "max pos" module. I guess it's for bypassing values when no fader is changing, isn't it?

SylvainT
Site Admin
Posts: 494
Contact:

Unread post by SylvainT » 13 Dec 2022, 20:47

Wait and minus show me a modification. The array has only 0 if nothing changes. On change, one value of the array is <>0. Abs is there to have always a positive number
Concat to add a value in the array and avoid 0 for MaxPos. It is a little trick not easy to explain and maybe to understand.

creal
Member
Posts: 96
Contact:

Unread post by creal » 14 Dec 2022, 17:52

Thank you. It's very clear now. Something I missed is that "Max Pos" returns the lowest index if two indexes reach the same max value. Therefore, Concat (with the combination of X-1 and Pass) avoids always returning to the first fader and sending unwanted values (data 1 = 1, data 2 = x) each time Max Pos can't be detected (i.e. between two consecutive blocs, I guess). Instead, it bypasses both flows.

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests