Welcome to %s forums

BrainModular Users Forum

Login Register

routing and replace

I need help on a Patch
Post Reply
Gilsornette
Member
Posts: 280
Contact:

routing and replace

Unread post by Gilsornette » 09 Sep 2025, 18:07

Hello,

I use a matrix 8x8 and I'd like 1st clicked Cell to be routed to subpatch 1, 2nd Clicked cell to subpatch 2, and so until 8th clicked cell is routed to subpatch 8.
I also want that if I release Cell 3 then 6 and that I click on two new cells those one are routed to subpatch 3 and 6 . And I can't achieve to do this.
I've tried with counter and array, but without convincing result.
Do you have ideas ? I
thank you
-

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 10 Sep 2025, 00:07

Hi,
You have to use an array of 8 elements.
when a cell is set to 1, the array store the number of the cell
when the cell is release, your patch must search the element in the array that is of value the number of the cell then set it to -1
when you click on another cell, the patch search for the first element that is of value = -1 and replace it by the index of the new cell.

Actually, the "midi dispatch" just do that, so you could simply transform the click cell info into midi note on or off (data1 being the index of the cell)

see the workspace (works for 4x4 matrix, but can be easily hacked)
matrix to midi.wkp
(215.04 KiB) Downloaded 256 times
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Gilsornette
Member
Posts: 280
Contact:

Unread post by Gilsornette » 10 Sep 2025, 10:14

Thank you very much for the advice! I'll try this.

grego mondo
Member
Posts: 464
Location: 22110 Rostrenen
Contact:

Unread post by grego mondo » 10 Sep 2025, 10:39

I love the midi dispatch !!
I used to use a data dispatch with has changed incrementing the destination voice (out 1, then 2 then 3, ...) to get in a sub patch
Attachments
dispatch selector.PNG
En attendant cordialement l'apocalypse ... 100% Usine !!
https://lesformesdufond.kaz.bzh/grego-mondo/
PC i7 2.6Ghz - Win11 / RME Fireface UFX
Tubas / Serpent / Music Box
Interfaces Midi / OSC / DMX

Gilsornette
Member
Posts: 280
Contact:

Unread post by Gilsornette » 11 Sep 2025, 09:16

@grego : thank you for your patch!

It seems to me that it'd be interesting to have a data dispatch object and a data expand object as they exist for Midi. What do you think about this? Shall I ask for it in suggestions?

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 11 Sep 2025, 10:19

Gilsornette wrote:
11 Sep 2025, 09:16
@grego : thank you for your patch!

It seems to me that it'd be interesting to have a data dispatch object and a data expand object as they exist for Midi. What do you think about this? Shall I ask for it in suggestions?
I did a Midi demux module some time ago, it shouldn't be too much trouble to adapt it for non midi datas : I may look into it soonish !

Another way would be to use the procedure thing : each time a cell is changed, the procedure will go thru each element of an array to check if there is an empty slot, otherwise remove the older taken one : it is a good challenge to learn procedure !

Olivar
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Gilsornette
Member
Posts: 280
Contact:

Unread post by Gilsornette » 11 Sep 2025, 10:46

Thank you for the idea! and the challenge ;-)

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 12 Sep 2025, 15:45

HI !
please note that the part that goes from the array output of the matrix is just here because I plan to use this patch with an OSC interface.

if you're planning to use this patch with a panel matrix and you intend to click directly on it, you can use this mod :
Capture d'écran 2025-09-12 153915.png
cheers

Olivar
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Gilsornette
Member
Posts: 280
Contact:

Unread post by Gilsornette » 13 Sep 2025, 15:41

thank you! I was doing this way :-)

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 17 Sep 2025, 21:40

Hi,
too bad for the challenge, here is a cyclic switch that manages polyphony without midi.

You'll need Modulilab addon because of the addsr module.

I let you test it for bugs

cheers

Olivar
Attachments
cyclic permutator sampler.pat
(396.69 KiB) Downloaded 241 times
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Gilsornette
Member
Posts: 280
Contact:

Unread post by Gilsornette » 18 Sep 2025, 08:27

Thank you very much Oli! I'll check in the next few days and tell you how it's going for me.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests