Going deep with matrices (matrix widget)


Hi, still working on this supersized sequencer project with Open Stage control and I'm struggling with "matrices wizardry".

I'd like to do things programmatically like setting up the content of modals in matrices (with the API i'm already proficient in thanks to @jean-emmanuel advices). It will help to avoid copy-pasting and get more flexibility as the size of the project grows bigger and bigger.

I'm looking for the general philosophy around matrices but I tried to illustrate the question with tangible use cases. Thus, I thought it would be easier to understand while reading.


  • Question 1 : How to setup the switch widget inside the modal widget of each matrix element (each switch may contain different values) for example modal 1 would be the kick drum sample selection (with 909, 808, 606, Linndrum...), modal 2 the snares... (you know the rest hey :grin: #humTssHumTss)
  • Question 2 : Then, in order to inform back the user about which sample was selected as active, how to get the switch value back from each one of the modals ? So It can be used as a display label for the modal.

I could have gone with copy-pasting, but as the system grows bigger and bigger I try to think a bit before acting. Thanks for your help.

Here is an example: template_matrix.json (5.1 KB). The pattern is to create a template widget with everything that needs to change defined in its variables property. The clone matrix then overrides the template's variable property depending on the clone's index.

Now this can get really cumbersome, there is actually a better approach that is to build the widget data in a custom module and edit the interface programmatically (example), this way you'll be able to manage you sample lists in a much more efficient way.

Thank you Jean-Emmanuel, I'm going to dig into this.

In 1.9.3 I'm getting this in the console. For the life of me, I can't find that paranthesis!


It's a regression in 1.9.3, to be fixed (done in v1.9.4).

1 Like