strip bangs from a float?

coffeencigs's icon

Hey

i hope you can see my picture.. and i hope you understand what iam trying to do...

if i press my midipad #64 the toggle turns on, if i press it again it turns of..

what the two msgs are doing is, if the toggle turns on it sends 127 velocity to my pad and my pad will light up red. when i press it again, the toggle turns of and sends vel 0 to my pad, the pad will stop lighting up!

so now my launchpad has 64 pads... thats why iam using the $1 in both msgs...
because i dont want to create 128 msgs for every toggle!

what i need now.. is a way to get the number from the pad pressed at the moment.. in to the $1 msg...
the problem is if i use a float and connect it to the notein / stripnote object.. it is sending bangs everytime iam pressing any key... because of that every msgs will recieve a bang every time...

is there a way to "strip" this bang away.. so that the msgs only look at the float when they receive a bang from the toggle?

i hope you get what iam trying to do..

thanks for your time

bkshepard's icon

There are several issues with your patch. One is that it will only trigger on note number 64. Second, you have the [sel 1] only passing bangs instead of note numbers. I'm afraid in order to keep track of the on/off status of all 64 pads you will probably need to do something like this.

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

ch's icon

Hi,

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

Or something like that :

Charles