Forums > MaxMSP

system exclusive question..

June 19, 2009 | 1:46 am

hey there max geniuses..

I’ve been using Max to convert program change information sent form a midi foot controller to note information so that I can use it to control the looper device in the new Abelton 8.. So far this has been working awesomely, except that when i change banks (so up 10 i think it is), by pressing the bank up button, it sends the value of the last pedal pressed.. i.e. say I’m on bank 1, and the last button i hit was #5, and i press bank up, it immediately sends out bank 2, button #5..

I had a look at the miditester, and saw that the bank buttons send out system exclusive information.. Is it possible to tell max to ignore the first input after a sys ex message?

thanks!!

Kris


June 19, 2009 | 11:42 pm

I’m not clear which midi tools in max you are using to detect the data you want. Are you using midiin? pgmin? ctlin to receive bank change messages? If you just use pgmin and ctlin to grab program changes and cc lsb/msb for bank change data.
If there’s particular sysex data you need, you can use match to grab patterns of data: see the help file on using "nn" as a wild card. So if you are looking for a sysex stream like
240 87 64 01 00 247
where the "00" is the part you are interested in, you can attach
[match 240 87 64 01 nn 247]
to midiin, and use [zl nth 5] to grab the desired data.
Here’s a general strategy for dropping a value from a stream of data:
#P window setfont "Sans Serif" 9.;
#P number 242 350 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 288 79 98 196617 start a data stream;
#P toggle 249 78 38 0;
#N counter 200;
#X flags 0 0;
#P newobj 250 147 66 196617 counter 200;
#P newex 250 122 58 196617 metro 200;
#P comment 290 208 210 196617 press to skip one output of your data stream;
#P newex 197 246 42 196617 t 1 0;
#P button 221 350 15 0;
#P button 263 202 26 0;
#P newex 197 295 32 196617 t 0 1;
#P newex 197 272 29 196617 gate;
#P number 250 173 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 223 324 47 196617 gate 1 1;
#P comment 285 173 100 196617 your data;
#P fasten 2 0 3 1 255 266 221 266;
#P fasten 2 0 1 1 255 256 265 256;
#P fasten 4 0 3 0 202 324 187 324 187 268 202 268;
#P connect 1 0 6 0;
#P connect 1 0 13 0;
#P connect 11 0 9 0;
#P connect 10 0 2 0;
#P connect 9 0 10 0;
#P connect 7 0 3 0;
#P fasten 7 1 1 0 234 315 228 315;
#P connect 5 0 7 0;
#P fasten 4 1 1 0 224 318 228 318;
#P connect 3 0 4 0;
#P window clipboard copycount 14;

hope that is helpful,

Peter


June 20, 2009 | 4:42 am

I think that makes sense..

This is what I’m using. I think i hacked it out of a help file somewhere

– Pasted Max Patch, click to expand. –

The reason I thought of the sysex, was because the footpedal sends a sysex message when I change banks.. So if I could get it to ignore the first program change message after the sysex, that’d be perfect..


June 20, 2009 | 4:55 am

If the pgm change is the same # as the pgm you used before, you could just use a [change] object on the pgmin value. This will mean that it ignores repeated values of the pgm, so if you sent "5" as your program, then change bank and then happen to want "5", you are hosed.
Otherwise, this should work ok:

– Pasted Max Patch, click to expand. –

Viewing 4 posts - 1 through 4 (of 4 total)