Update Matrix row and column number in real time (ControlP5)

CONTROLP5
Is there a way to update (change) row number and column number of a matrix in real time?

Resources -> ControlP5 -> Controllers -> ControlP5Matrix

Hi luisArandas,

From the controlP5 reference, it seems that you have this method that can do what you want:

public Matrix setGrid(int theCellX, int theCellY)
1 Like

Hello jb4x, my question is can that be updated real time?
Let’s make an example I create a slider cp5.addSlider -> and then in the function to get the event I would say get the value from the slider and override the variable that is for example cellX

void public controlEvent(ControlEvent theEvent){ theCellX = (int)(theEvent.getController("newSlider").getValue()); }

If I want to change the cells in real time (or columns) in accordance with a slider, how actually would I call that method?
Best, Luis

This is the way I am approaching -> and it doesn’t work