Toggle buttons using a midi controller

Mar 12, 2008 at 10:12am

Toggle buttons using a midi controller

I have a problem regarding the toggle button. Basically what I want is when I press button X on my usb controller, i want the toggle to be on until i press button X again, so the toggle goes off.

I have temporarily solved this using a counter [Counter 0 0 2] this object (or how i have programmed it) isnt fail-safe as sometimes when I press button X to turn the toggle off it doesnt work and i have to press it a few times! I know it has something to do how ive programmed it but if anybody could shed some light on this i’d be greatful.

#36316
Mar 12, 2008 at 11:08am

Something like this?

max v2;
#N vpatcher 33 59 537 658;
#P user radiogroup 49 254 18 32;
#X size 2;
#X offset 16;
#X inactive 0;
#X itemtype 0;
#X flagmode 0;
#X set 0;
#X done;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 21 183 45 196617 onebang;
#P newex 21 163 27 196617 ==;
#P newex 48 137 21 196617 t 1;
#P newex 18 137 21 196617 t 1;
#P button 56 164 15 0;
#P newex 33 68 44 196617 sel 127;
#P newex 18 37 40 196617 notein;
#P toggle 49 213 15 0;
#P connect 1 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 7 0;
#P connect 1 1 2 0;
#P connect 5 0 6 1;
#P connect 2 0 5 0;
#P connect 7 0 0 0;
#P connect 0 0 8 0;
#P fasten 7 1 3 0 61 202 73 202 73 161 61 161;
#P connect 3 0 7 1;
#P pop;

best

yves

#124533
Mar 12, 2008 at 11:12am

max v2;
#N vpatcher 58 44 709 453;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 100 181 46 196617 select 0;
#P newex 194 174 58 196617 select 127;
#P toggle 166 252 15 0;
#P number 165 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 166 95 40 196617 ctlin a;
#P connect 1 0 4 0;
#P connect 0 0 1 0;
#P connect 4 0 2 0;
#P connect 3 0 2 0;
#P connect 1 0 3 0;
#P pop;

#124534
Mar 13, 2008 at 10:51pm

Some midi controllers, such as the M-audio Axiom line, have a function that allows you set the keys to trigger note ons and will not send note off until it is hit again. Check your manual if none of the patches above work for you (not that they won’t).

#124535

You must be logged in to reply to this topic.