ControlP5 matrix...changing the colors of the blocks in the matrix grid.
in
Contributed Library Questions
•
7 months ago
Hi all.
I am attempting to make an audio sequencer using Matrix sine square saw and noise waves using ControlP5 matrix grid of 16 x 16 to play notes according to which wave is selected in an itemlist (menu)
I would like to know if anyone can tell me how to change the colors in the blocks according to which wave I have selected.
For example, if I select "sine" in the menu, the block color of the matrix is green, if I select "saw wave" the blocks are purple etc and the blocks of the different wave types retain their color according to which wave was selected...
I have included a screen shot. I can change the block colors using:
if (theEvent.group().value() == 2) {
gui.get(Matrix.class,"myMatrix").setColorActive(activeCellSine);
where activeCellSIne is a color variable set to green...
but when I switch between waveforms ALL the blocks change color and I want to be able to retain the colors of the blocks determined by the wave selected...
Any ideas?
Any help greatly appreciated.
All the best,
Steve.
1