Trying to figure out how to make a 4x5 button matrix script, anyone got an example?
I think i can get the matrix reading going, but a bit lost on how to get the values “out of the script” and in to the patch
Trying to figure out how to make a 4x5 button matrix script, anyone got an example?
I think i can get the matrix reading going, but a bit lost on how to get the values “out of the script” and in to the patch
Greetings! This sounds more like a job for a patch/obj (which is an embedded object, more “full-featured” than scripts)
For the simplest form of a button array, you would add a bunch of boolean outlets:
Then maybe create your scan function(s) in local data:
Then execute the function at k-rate and pass the value to the outlets:
This is a naive beginning and not very efficient of course
Give us more info about your matrix. Does it have diodes in series per row and column?
scanMyCoolButtonMatrix_stub.axp (1.7 KB)
Thank you very much!
It’s a 4x5 matrix.
I’m using a diode in series with each switch, cant remember what pins i’m using atm.
Curios about what would be the efficient method to do this?
My patch is at its limits!
Well I would take my time and look at online libraries for STM32 or arduino and experiment a bit with those. Possibly getting the rows and columns all in one series of scans, and placed as bits into one variable. Depending on what pins you use also… possibly could put together one array of pin numbers and do one loop scanning them all