Forums > MaxMSP

midi dial problem

February 26, 2008 | 2:11 am

I know there is a simple solution to this out there I just don’t know it. I have an axiom controller with knobs and such and I am getting the numbers from a midiparse object and trying to seperate out each knob in order to get their numbers individually using a select object and a gate. I can get the number 72 knob to open the gate and let its numbers through but when i turn another knob it lets the first number from that knob through as well. I have attached my patch so feel free to take a look.

thanks,

mark


February 26, 2008 | 2:21 am

if you turn off MSP
then do a trace
you will find the cart before the horse

try this

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 263 312 27 196617 i;
#P number 263 349 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 231 238 52 196617 select 71;
#P newex 210 99 45 196617 midiinfo;
#P user umenu 210 122 96 196647 1 64 138 0;
#X add "USB Axiom 25 Port 1";
#X add "USB Axiom 25 Port 2";
#X add "to MaxMSP 1";
#X add "to MaxMSP 2";
#P window linecount 3;
#P comment 146 100 60 196617 Select an input port for midiin;
#P window linecount 1;
#P message 245 80 20 196617 0;
#P newex 210 55 52 196617 loadbang;
#P newex 144 55 41 196617 midiin;
#B color 5;
#P newex 127 196 40 196617 unpack;
#P number 127 218 27 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 157 218 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 250 196 40 196617 unpack;
#P newex 127 170 340 196617 midiparse;
#B color 5;
#P window linecount 2;
#P comment 143 235 38 196617 Note On/Off;
#P comment 301 351 44 196617 Control Change;
#P window setfont "Sans Serif" 14.;
#P window linecount 9;
#P comment 411 198 322 196622 < -------- So this is where I am looking to get my midi knobs through. The one on the left comes up with the number of the knob like "71" the one on the right is the 1 to 127 number. Everything is smooth and groovy until I reach for another knob and then it sends the first number from that knob through! So thanks again for taken a look. mark;
#P connect 16 0 15 0;
#P connect 14 0 16 0;
#P connect 4 0 14 0;
#P connect 4 1 16 1;
#P fasten 3 2 4 0 242 192 255 192;
#P connect 10 0 13 1;
#P fasten 9 0 10 0 215 75 250 75;
#P connect 13 0 12 0;
#P connect 7 1 5 0;
#P fasten 12 1 8 0 301 143 312 143 312 48 149 48;
#P connect 7 0 6 0;
#P connect 3 0 7 0;
#P connect 8 0 3 0;
#P window clipboard copycount 17;


February 26, 2008 | 3:06 am

perfect, many many thanks.


February 26, 2008 | 4:47 am

On Feb 25, 2008, at 6:11 PM, mark wrote:

> I can get the number 72 knob to open the gate and let its numbers
> through but when i turn another knob it lets the first number from
> that knob through as well.

I might approach this more like this:

#P window setfont "Sans Serif" 9.;
#P number 427 96 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 427 73 45 196617 ctlin 71;
#B color 5;
#P number 244 303 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 244 271 49 196617 int;
#P newex 244 251 38 196617 sel 72;
#P number 184 303 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 184 271 49 196617 int;
#P newex 184 251 38 196617 sel 71;
#P newex 133 89 45 196617 midiinfo;
#P user umenu 133 112 96 196647 1 64 128 0;
#X add "IAC Driver Bus 1";
#X add "from MaxMSP 1";
#X add "from MaxMSP 2";
#X add "to MaxMSP 1";
#X add "to MaxMSP 2";
#P window linecount 3;
#P comment 76 93 60 196617 Select an input port for midiin;
#P window linecount 1;
#P message 168 70 20 196617 0;
#P newex 133 45 52 196617 loadbang;
#P newex 67 45 41 196617 midiin;
#B color 5;
#P newex 67 186 40 196617 unpack;
#P number 67 208 27 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 97 208 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 223 207 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 184 207 27 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 184 186 49 196617 unpack;
#P newex 67 160 340 196617 midiparse;
#B color 5;
#P window linecount 2;
#P comment 83 225 38 196617 Note On/Off;
#P window linecount 4;
#P comment 298 252 128 196617 If you have other reasons to stick with
midiparse , perhaps an approach like this would work better?;
#P window setfont "Sans Serif" 14.;
#P window linecount 9;
#P comment 446 188 322 196622 < -------- So this is where I am looking
to get my midi knobs through. The one on the left comes up with the
number of the knob like "71" the one on the right is the 1 to 127
number. Everything is smooth and groovy until I reach for another knob
and then it sends the first number from that knob through! So thanks
again for taken a look. mark;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 476 75 139 196617 Why not something like this?;
#P user panel 420 66 194 53;
#X brgb 240 236 189;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 180 241 252 88;
#X brgb 240 236 189;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P fasten 17 1 13 0 224 133 235 133 235 38 72 38;
#P connect 17 1 25 0;
#P connect 25 0 26 0;
#P connect 13 0 6 0;
#P connect 6 0 12 0;
#P connect 12 0 11 0;
#P connect 12 1 10 0;
#P connect 18 0 17 0;
#P connect 7 0 8 0;
#P fasten 14 0 15 0 138 65 173 65;
#P connect 15 0 18 1;
#P fasten 6 2 7 0 182 182 189 182;
#P connect 7 1 9 0;
#P connect 19 0 20 0;
#P connect 20 0 21 0;
#P connect 23 0 24 0;
#P connect 22 0 23 0;
#P fasten 8 0 22 0 189 236 249 236;
#P lcolor 15;
#P connect 8 0 19 0;
#P lcolor 15;
#P fasten 9 0 23 1 228 227 288 227;
#P connect 9 0 20 1;
#P window clipboard copycount 27;

Chris Muir
cbm@well.com


February 26, 2008 | 7:58 am

ah, that is very useful. Thanks chris


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