MIDI Controller Toggle Button - noob

mradentz's icon

Hi All.

After, humbly, spending a day writing this seemingly very simple patch:

A) I am crushed to discover that I really don't know as much math as I thought I did

B) I know even less about the physics of musical expression

C) I know even less about programming

and...

D) I am convinced that there is a more elegant way to create a bank of toggle switches.

I started by creating a rect~ object with a biquad~ filter object for a simple "wobble" bass patch. I thought it would be cool to control a line object to create a tempo synced ramp of the filter with the pushbuttons on an Oxygen 25 MIDI controller. Here is where I got bogged down.

Max Patch
Copy patch and select New From Clipboard in Max.

Not being very familiar with the practice of coding this is what I came up with, take a look if you like:

Any suggestions are greatly apprecited.

mike

BTW... I've posted the finished patch with all six pushbutton controllers connected if anyone actually would find it useful.

3276.ledSwitcher.maxpat
Max Patch