Forums > MaxMSP

midi control via motormix

May 22, 2007 | 1:55 pm

Hello,
I want to control a plug in via fader. I have a motormix conected and have put midiin midiparse unpack ctlin numer box inside a patch.
When I push the fader, only one number is shown. When I add print MIDI, I have some numbers running up tp 127 in relation to the fader.
Why do I not get the control output right?


May 22, 2007 | 2:00 pm

Quote: hans.mittendorf@free.fr wrote on Tue, 22 May 2007 15:55
—————————————————-
> Hello,
> I want to control a plug in via fader. I have a motormix conected and have put midiin midiparse unpack ctlin numer box inside a patch.
> When I push the fader, only one number is shown. When I add print MIDI, I have some numbers running up tp 127 in relation to the fader.
> Why do I not get the control output right?
—————————————————-

Could you post the patch that you’re using?

Mattijs


May 22, 2007 | 2:11 pm

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 30 92 55 196617 print MIDI;
#P newex 176 98 40 196617 unpack;
#P newex 154 74 92 196617 midiparse;
#P newex 156 44 37 196617 midiin;
#P newex 164 138 40 196617 ctlin;
#P newex 164 288 53 196617 line 0. 1;
#P newex 185 269 27 196617 i 7;
#P newex 164 250 31 196617 t f b;
#P newex 164 199 105 196617 scale 0 127 0. 20.;
#P flonum 164 330 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 164 165 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P user com 273 199 159 196617 28;
#K set 0 29539 24940 25888 26990 28789 29728 29281 28263 25888 29807 8303 30068 28789 29728 29281 28263 25900 8291 28526 30309 29300 8297 28276 8308 28448 26220 28513 29696;
#K end;
#P window linecount 3;
#P user com 222 250 261 196617 73;
#K set 0 26990 29797 29296 28524 24948 25888 26990 28789 29728 28534 25970 8270 8301 29486 8232 26990 8308 26729 29472 25441 29541 11296 14112 28019 11808 11552 29810 31008 25448 24942 26473 28263 8308 26729 29472 28277 28002 25970 8308 28448 25185 27745 28259 25888 29285 29552 28526 29545 30309 28261 29555 8232 27749 29555 8308 26989 25897 8311 26996 26656 29549 28527 29800 28261 29555 8232 28015 29285 8308 26989 25897 10542 8192;
#K end;
#P window linecount 2;
#P user com 206 165 119 196617 13;
#K set 0 26990 29797 26469 29216 26990 28789 29728 26226 28525 8291 29804 26990 3328;
#K end;
#P window linecount 5;
#P user com 205 330 120 196617 51;
#K set 0 26220 28513 29728 28533 29808 30068 8308 28448 19526 20256 25455 25701 15136 26982 8313 28533 8302 25957 25632 29545 26478 24940 8303 30068 8306 24948 26725 29216 29800 24942 8294 27759 24948 11296 29559 24944 8303 30068 8308 26725 8283 27753 28261 23840 30569 29800 8289 8283 27753 28261 32349;
#K end;
#P connect 8 0 9 1;
#P connect 7 1 8 0;
#P connect 12 2 13 0;
#P connect 9 0 5 0;
#P connect 7 0 9 0;
#P connect 6 0 7 0;
#P connect 4 0 6 0;
#P connect 10 0 4 0;
#P connect 13 0 10 0;
#P connect 11 0 12 0;
#P connect 11 0 14 0;
#P window clipboard copycount 15;


May 22, 2007 | 2:25 pm

On 5/22/07, Hans Mittendorf wrote:
>
>
> Hello,
> I want to control a plug in via fader. I have a motormix conected and have
> put midiin midiparse unpack ctlin numer box inside a patch.
> When I push the fader, only one number is shown. When I add print MIDI, I
> have some numbers running up tp 127 in relation to the fader.
> Why do I not get the control output right?
> _

Darwin Grosse developed externals and patches for motormix i/o which work
great for total integration. That should get you started on whatever you
want to control with it.

http://www.cycling74.com/twiki/bin/view/Share/DarwinGrosse

cheers -thijs


May 22, 2007 | 2:28 pm

You have seriously misunderstood the idea of ctlin and midiparse. One look at the ctlin helpfile should solve your problem.

Mattijs


May 22, 2007 | 8:15 pm

Mattijs,
I had two looks at the helpfile took out ctlin but midiparse is still not clearer. should the patch be midiin midiparse unpack pack


May 22, 2007 | 8:44 pm

Since the midiparse object outputs a list of two values
(the controller number and its value), you’ll need to
unpack the list to get the values you need. You may find
the route object useful for being able to output a
specific controller.


May 22, 2007 | 9:46 pm

Also note that the Motormix faders are high resolution, they send TWO CC messages for each value, one MSB, one LSB. Refer to the Motormix developer documentation.

So ctlin is not the way to handle this, you’ll need to use midiin and match or perhaps midiin and midiparse.


May 23, 2007 | 8:21 am

Quote: johnpitcairn wrote on Tue, 22 May 2007 23:46
—————————————————-
> So ctlin is not the way to handle this, you’ll need to use midiin and match or perhaps midiin and midiparse.
>

That’s exactly what he was trying. Maybe have a look at the patch he posted ;)

Mattijs


May 23, 2007 | 1:10 pm

Hello everyone who has contributed to this subject.
As it stands at this point, I guess that midiparse is not reading the incoming raw midi from the motormix prperly. When I connect it to unpack and a number box, only 32 is shown and it does not move.
On the other hand, I have installed Darwin’s motormix objects and it is a cheerful moment when you see the faders moving up one after each other! I guess that Darwin should know how to plug the patch for incoming midi from the mm.
I still need to figure out how to route the individual faders, since they are meant to control different plug ins. If someone has done this already, I would be happy to learn from him.
cheers


May 23, 2007 | 6:35 pm

Hans Mittendorf schrieb:
> Hello everyone who has contributed to this subject. As it stands at
> this point, I guess that midiparse is not reading the incoming raw
> midi from the motormix prperly. When I connect it to unpack and a
> number box, only 32 is shown and it does not move.

10 or 14-bit Midi is composed of two controller messages, 32 appart. You
just see the last, which is the LSB. You need to use both and compose
the value you want out of it…

It should work with ctlin only (have no motormix here, can’t test it…):

#P window setfont "Sans Serif" 9.;
#P number 358 252 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 358 228 63 196617 +;
#P newex 358 201 50 196617 < < 7;
#P newex 411 174 50 196617 ctlin 34 1;
#P newex 358 174 50 196617 ctlin 2 1;
#P number 250 252 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 250 228 63 196617 +;
#P newex 250 201 50 196617 < < 7;
#P newex 303 174 50 196617 ctlin 33 1;
#P newex 250 174 50 196617 ctlin 1 1;
#P number 142 252 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 142 228 63 196617 +;
#P newex 142 201 50 196617 < < 7;
#P newex 195 174 50 196617 ctlin 32 1;
#P newex 142 174 50 196617 ctlin 0 1;
#P connect 11 0 13 1;
#P connect 10 0 12 0;
#P connect 6 0 8 1;
#P connect 5 0 7 0;
#P connect 13 0 14 0;
#P connect 12 0 13 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 3 0 4 0;
#P connect 1 0 3 1;
#P connect 2 0 3 0;
#P connect 0 0 2 0;
#P window clipboard copycount 15;


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


May 23, 2007 | 6:50 pm

Hi Stefan,

cool job done!! It works, I can send from three different faders. But, the numbers I want are 0 to 127 and I am not sure on how to make up the calculation for that in your patch.
Thanks for your help!


May 23, 2007 | 7:26 pm

O.K thanks to Stefan, I have this solution to use a motormix fader input
max v2;
#N vpatcher 38 59 638 459;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 159 240 27 196617 / 2;
#P newex 158 141 37 196617 midiin;
#P number 157 289 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 157 265 27 196617 +;
#P newex 156 215 29 196617 < < 1;
#P newex 156 188 50 196617 ctlin 0 1;
#P connect 4 0 0 0;
#P connect 0 0 1 0;
#P connect 5 0 2 0;
#P connect 2 0 3 0;
#P connect 1 0 5 0;
#P pop;
Thanks Stefan!


May 24, 2007 | 5:37 am

Hans Mittendorf schrieb:
> cool job done!! It works, I can send from three different faders.
> But, the numbers I want are 0 to 127 and I am not sure on how to make
> up the calculation for that in your patch. Thanks for your help!

just use ctlin 0, 1, 2, 3, 4, 5, 6, 7 and ignore the LSB part…


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


May 24, 2007 | 7:53 am

On 23 mai 07, at 20:35, Stefan Tiedje wrote:

> Hans Mittendorf schrieb:
>
> 10 or 14-bit Midi is composed of two controller messages, 32 appart.
> You just see the last, which is the LSB. You need to use both and
> compose the value you want out of it…
>
> It should work with ctlin only (have no motormix here, can’t test
> it…):

Nice to read it works for a motormix.
For my behringer bcf2000, it doesn’t if it’s connected thru USB but
does if I plug it on my Midi interface…
But it works with [midiin] in both cases!

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://users.skynet.be/crfmw/max


May 24, 2007 | 9:36 pm

Note that ctlin will not receive the LSB of an MSB/LSB pair anyway, so nothing is coming in on CC32 for the posted example. If you want the full resolution of the MotorMix faders, you MUST either use midiparse, or roll your own MSB/LSB recognition system connected directly from midiin.

See my reply to the other MotorMix (output) thread for an example.


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