Forums > MaxMSP

SYSEX to MIDI cc question

July 3, 2007 | 8:28 am

Hello,
Im trying to use Max to hack the controls on my padKontrol… So i send some sysex to the padKontrol to envoke native mode…cool
When the PK is in native mode it sends out SYSEX from allknobs, buttons, pads, encoders… So i have max set up to recieve the SYSEX from the buttons and pads, and then convert it to a MIDI Note message…cool…
When i turn a knob on the pk it sends out the sysex to max, i use match, then unpack, and route the bytes nessesary to convert byte 7 to MIDI CC#, and byte 8 is just sent to a ctlout to preserve the changing CC value.
Problem is Max locks up on me all of the time when i start turning the knob, it will work for about 30 seconds or so then Max will lock up- and i have to do a hard reboot of windows. Can someone take a look at my simple patch and maybe tell me what im doing wrong, or let me know if there is another way to convert sysex to a cc. I have the latest version of Max, Ableton Live 6.07 ( latest version ) and win xp pro sp3. I also see that it has locked up on me even if i dont have Live open. I am also 99% sure that no MIDI is feeding back from Max or Live. Thanks!!

Patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 375 198 60 9109513 CC Number;
#P number 430 86 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 430 60 48 9109513 sysexin z;
#P newex 430 106 55 9109513 zl group 9;
#P newex 451 246 40 9109513 ctlout c;
#P newex 448 131 176 9109513 match 240 66 64 110 8 73 1 nn 247;
#P newex 269 133 176 9109513 match 240 66 64 110 8 73 0 nn 247;
#P comment 458 150 100 9109513 Knob 2;
#P comment 320 151 100 9109513 Knob 1;
#P number 539 186 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 572 166 60 9109513 CC Number;
#P newex 448 165 121 9109513 unpack 1 2 3 4 5 6 7 8 9;
#P newex 320 166 121 9109513 unpack 1 2 3 4 5 6 7 8 9;
#P number 319 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 10 0 7 0;
#P connect 1 7 0 0;
#P connect 7 0 1 0;
#P connect 11 0 12 0;
#P connect 12 0 10 0;
#P connect 10 0 8 0;
#P connect 8 0 2 0;
#P fasten 0 0 9 0 324 232 456 232;
#P fasten 4 0 9 0 544 232 456 232;
#P fasten 1 6 9 1 403 233 471 233;
#P fasten 2 6 9 1 531 232 471 232;
#P connect 2 7 4 0;
#P window clipboard copycount 14;


July 3, 2007 | 2:38 pm

Two things about your patch. First, whenever a sysex message would be sent with a length other then 9, the synchronization is lost. It might be better to use the designated 240 / 247 as separators. The other thing is that the patch chords going from unpack to ctlout cross, meaning that the order is reversed. Still this might not be contributing to the fact that max crashes on you. Did you try playing with the overdrive settings?

_
johan


July 3, 2007 | 11:22 pm

Thanks!!! Turning Overdrive on seemed to do the trick. I guess i can further play with the overdrive settings in the DSP status menu. Just wondering what the overdrive actually does?

Thanks,
Mike


July 4, 2007 | 12:34 am

At 5:22 PM -0600 7/3/07, !include wrote:
>Thanks!!! Turning Overdrive on seemed to do the trick. I guess i can further play with the overdrive settings in the DSP status menu. Just wondering what the overdrive actually does?

AFAIK, Overdrive means that the event-level scheduler operates at the CPU interrupt level.

-C


Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." – Brian Eno


July 4, 2007 | 7:10 am

!include schrieb:
> I also see that it has locked up on me even if i dont have Live open.
> I am also 99% sure that no MIDI is feeding back from Max or Live.

I don’t see why this should lock up, I am 100% sure its your 1%
uncertainty of feedback…

As jvkr already pointed out, the zl group will get you unsynced, just
imagine its playing a note in-between which will have 3 bytes…

simply skip the zl group, match is designed for listening to a stream,
and the reversed order could be corrected by two ctlouts.

Defining the Midi outport by a letter is pretty old style, have a look
at midiinfo, that way a changing Midi setup won’t be that difficult to
adapt…
(If you paste the patch double click the loadbangs, to fire them…)

#P window setfont "Sans Serif" 9.;
#P user umenu 42 113 100 196647 1 64 129 0;
#X add 1000PX;
#X add FZ-20M;
#X add M3r;
#X add MacInterface;
#X add MIDIboard;
#X add "PCM 70";
#X add Procussion;
#X add "Studio 5—Modem ";
#X add TX816;
#P window linecount 1;
#P newex 42 92 45 196617 midiinfo;
#B color 5;
#P newex 42 72 45 196617 loadbang;
#P user umenu 234 66 100 196647 1 64 82 0;
#X add 1000PX;
#X add FZ-20M;
#X add M3r;
#X add MacInterface;
#X add MIDIboard;
#X add "PCM 70";
#X add Procussion;
#X add "Studio 5—Modem ";
#X add TX816;
#P newex 234 45 45 196617 midiinfo;
#B color 5;
#P newex 269 24 49 196617 loadbang;
#P newex 324 178 50 196617 ctlout 1;
#P newex 324 150 50 196617 zl nth 8;
#P newex 324 87 48 196617 sysexin;
#P newex 146 178 50 196617 ctlout 0;
#P newex 324 114 176 196617 match 240 66 64 110 8 73 1 nn 247;
#P newex 146 114 176 196617 match 240 66 64 110 8 73 0 nn 247;
#P comment 334 133 100 196617 Knob 2;
#P comment 197 132 100 196617 Knob 1;
#P newex 146 149 50 196617 zl nth 8;
#P connect 12 0 13 0;
#P connect 9 0 10 1;
#P fasten 14 1 5 0 137 173 151 173;
#P fasten 14 1 8 0 137 173 329 173;
#P connect 13 0 14 0;
#P connect 11 1 6 0;
#P fasten 6 0 3 0 329 109 151 109;
#P connect 6 0 4 0;
#P connect 10 0 11 0;
#P connect 7 0 8 0;
#P connect 4 0 7 0;
#P connect 3 0 0 0;
#P connect 0 0 5 0;
#P window clipboard copycount 15;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


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