Forums > MaxMSP

MIDI learn

July 16, 2007 | 9:09 am

Hello,
Did a quick search, didnt find anything. Wondering if there is an object that would allow someone to MIDI learn to a fader or a Knob in a MAX patch? If not would anyone know where i could find info on this.

Peace,
Michael


July 16, 2007 | 9:29 am



FP
July 16, 2007 | 9:56 am

yes maybe it’s important to do tutorials at least to understand patches…

… here’s 3 examples (made by ??? (sorry…), j. lochard, k. toeplitz):

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 90 226 32 196617 print;
#P number 23 153 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname ctrl[3];
#P number 23 137 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname ctrl[2];
#P number 23 121 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname ctrl[1];
#P newex 191 253 53 196617 autopattr;
#X prestore ctrl[1] 1 0 0;
#X prestore ctrl[2] 1 0 0;
#X prestore ctrl[3] 1 0 0;
#P objectname u346000015;
#P newex 290 68 56 196617 +;
#P newex 336 50 38 196617 * 256;
#P newex 290 32 57 196617 notein;
#P newex 178 52 21 196617 t 0;
#P newex 206 86 33 196617 swap;
#P newex 206 220 224 196617 pack s f;
#P newex 206 200 69 196617 route symbol;
#P newex 178 86 27 196617 + 1;
#P toggle 178 70 15 0;
#P newex 178 104 38 196617 gate 2;
#P newex 206 162 44 196617 pack i s;
#P newex 240 144 48 196617 unpack s;
#N coll control_map 1;
#P newobj 206 182 94 196617 coll control_map 1;
#P newex 229 68 33 196617 +;
#P newex 252 50 38 196617 * 128;
#P newex 206 32 56 196617 ctlin;
#P newex 240 126 253 196617 pattrstorage le_centre @outputmode 1 @savemode 0;
#X client_rect 114 491 754 731;
#X storage_rect 0 0 640 240;
#P objectname le_centre;
#P comment 126 71 48 196617 listen ->;
#P connect 13 1 12 1;
#P connect 16 0 17 1;
#P connect 15 2 16 0;
#P connect 15 0 17 0;
#P connect 3 0 4 1;
#P connect 2 2 3 0;
#P connect 6 0 7 1;
#P connect 1 0 22 0;
#P connect 1 0 6 0;
#P fasten 12 0 1 0 211 239 495 239 495 124 245 124;
#P connect 17 0 13 1;
#P connect 4 0 13 1;
#P connect 2 1 4 0;
#P connect 11 0 12 0;
#P connect 5 0 11 0;
#P fasten 8 0 5 0 183 181 211 181;
#P connect 7 0 5 0;
#P fasten 8 1 14 0 211 123 175 123 175 50 183 50;
#P connect 8 1 7 0;
#P connect 13 0 8 1;
#P fasten 15 1 13 0 318 67 211 67;
#P connect 2 0 13 0;
#P connect 10 0 8 0;
#P connect 9 0 10 0;
#P connect 14 0 9 0;
#P window clipboard copycount 23;

————————————————–

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 12 307 322 542;
#P window setfont "Sans Serif" 9.;
#P newex 57 118 48 196617 loadbang;
#P message 57 140 14 196617 1;
#P message 72 140 43 196617 store 1;
#N vpreset 10;
#X append 1 2 14 145 246 number int 0 ; 15 145 207 number int 15 ;;
#P preset 57 164 18 17;
#P number 207 145 35 9 1 16 3 3 0 0 0 255 207 251 222 222 222 0 0 0;
#P number 246 145 35 9 0 127 3 3 0 0 0 255 207 251 222 222 222 0 0 0;
#N comlet Led in;
#P inlet 204 122 15 0;
#N comlet Commande;
#P outlet 114 173 15 0;
#N comlet Led out;
#P outlet 204 173 15 0;
#N comlet Ctrl;
#P inlet 114 39 15 0;
#N comlet Val;
#P inlet 51 39 15 0;
#N comlet Ch;
#P inlet 178 39 15 0;
#P newex 114 90 27 196617 gate;
#P newex 114 72 29 196617 == 0;
#P newex 148 91 27 196617 t 0 l;
#P newex 148 73 40 196617 pack i i;
#P newex 148 137 38 196617 unpack;
#P newex 148 119 30 196617 gate;
#P newex 33 90 27 196617 gate;
#P newex 33 72 29 196617 == 0;
#P connect 8 0 0 0;
#P connect 0 0 1 0;
#P connect 9 0 1 1;
#P connect 15 0 0 1;
#P connect 19 0 18 0;
#P connect 18 0 16 0;
#P connect 17 0 16 0;
#P fasten 7 0 17 0 119 137 77 137;
#P connect 10 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 12 0;
#P connect 1 0 7 1;
#P connect 14 0 6 1;
#P connect 10 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 2 0;
#P connect 13 0 2 0;
#P connect 2 0 3 0;
#P connect 5 1 2 1;
#P connect 8 0 4 1;
#P connect 5 0 11 0;
#P connect 3 1 15 0;
#P connect 3 0 14 0;
#P pop;
#P newobj 43 49 101 196617 p midictrl;
#P user uslider 43 68 18 128 128 1 0 0;
#P newex 43 30 70 196617 ctlin;
#P user led 134 67 17 17 3 150;
#P connect 3 1 0 0;
#P connect 0 0 3 3;
#P connect 1 2 3 2;
#P connect 1 1 3 1;
#P connect 3 0 2 0;
#P connect 1 0 3 0;
#P window clipboard copycount 4;

——————————————

#P user dial 10 51 26 26 128 1 0 0 191 270 1 0.625 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P toggle 36 52 13 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 253 44 722 593;
#P outlet 113 414 15 0;
#P outlet 166 414 15 0;
#P inlet 103 96 15 0;
#P window setfont "Sans Serif" 9.;
#P message 166 392 39 196617 set $1;
#P toggle 149 165 15 0;
#P newex 294 255 40 196617 change;
#P newex 149 182 24 196617 gate;
#P number 303 174 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 294 235 14 196617 1;
#P message 328 235 14 196617 0;
#P button 328 217 15 0;
#P button 294 217 15 0;
#P newex 341 197 38 196617 del 20;
#P newex 294 197 44 196617 sel 129;
#P newex 341 151 29 196617 gate;
#P newex 49 93 30 196617 t b b;
#P message 69 114 14 196617 1;
#P message 304 343 43 196617 store 1;
#N vpreset 10;
#X append 1 1 28 174 303 number int 15 ; 15 260 212 number int 1 ;;
#P preset 69 138 18 17;
#P newex 49 69 48 196617 loadbang;
#P number 212 260 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 113 375 15 0;
#P message 202 333 14 196617 1;
#P message 236 333 14 196617 0;
#P button 236 315 15 0;
#P newex 113 353 40 196617 change;
#P newex 113 392 46 196617 gate;
#P button 202 315 15 0;
#P newex 249 295 38 196617 del 20;
#P newex 202 295 44 196617 sel 129;
#P newex 222 221 29 196617 gate;
#P number 241 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 202 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 163 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 163 76 89 196617 ctlin;
#P toggle 103 127 15 0;
#P connect 16 0 20 0;
#P connect 20 1 19 0;
#P connect 19 0 17 0;
#P fasten 18 0 17 0 309 361 65 361 65 132 74 132;
#P fasten 7 0 0 0 254 314 275 314 275 124 108 124;
#P connect 33 0 0 0;
#P fasten 13 0 10 0 207 350 118 350;
#P fasten 12 0 10 0 241 350 118 350;
#P connect 10 0 14 0;
#P fasten 12 0 14 0 241 372 118 372;
#P connect 14 0 9 0;
#P connect 9 0 35 0;
#P fasten 30 0 31 0 299 277 266 277 266 154 154 154;
#P connect 31 0 29 0;
#P connect 29 0 9 1;
#P connect 1 0 2 0;
#P connect 2 0 29 1;
#P connect 0 0 32 0;
#P connect 32 0 34 0;
#P connect 1 1 3 0;
#P connect 3 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 13 0;
#P fasten 20 0 15 0 54 150 217 150;
#P fasten 5 0 15 0 227 249 217 249;
#P fasten 17 0 15 0 74 254 217 254;
#P fasten 0 0 5 0 108 207 227 207;
#P fasten 15 0 6 1 217 282 241 282;
#P connect 6 1 11 0;
#P connect 11 0 12 0;
#P connect 1 2 4 0;
#P fasten 3 0 5 1 207 193 246 193;
#P fasten 5 0 7 0 227 249 254 249;
#P fasten 4 0 22 0 246 118 299 118;
#P connect 22 0 24 0;
#P connect 24 0 27 0;
#P connect 27 0 30 0;
#P fasten 26 0 30 0 333 252 299 252;
#P fasten 21 0 28 0 346 171 308 171;
#P fasten 17 0 28 0 74 161 308 161;
#P fasten 20 0 28 0 54 150 308 150;
#P fasten 23 0 18 0 346 332 309 332;
#P fasten 7 0 18 0 254 332 309 332;
#P fasten 28 0 22 1 308 192 333 192;
#P connect 22 1 25 0;
#P connect 25 0 26 0;
#P fasten 0 0 21 0 108 146 346 146;
#P connect 21 0 23 0;
#P fasten 4 0 21 1 246 118 365 118;
#P pop;
#P newobj 10 29 30 196617 p CC;
#P hidden connect 0 1 1 0;
#P hidden connect 0 0 2 0;
#P hidden connect 1 0 0 0;
#P window clipboard copycount 3;


July 17, 2007 | 2:59 am

FP:
Thanks alot! Dissecting them now to figure out how the patches work.

Wen through some of the tutorials, but the app is so intuitive i just jumped right into making some patches tht i could use.

Peace,
Michael


August 7, 2007 | 9:25 am

I?d need someone to tell me what are all these numbers… as when anyone whants to show an example patch all these unfriendly numbers come insteap of the patch.

I am just starting on max/MSP (how to convert all these numbers into a max patch?).

Thank you.


August 7, 2007 | 9:44 am


August 7, 2007 | 9:44 am


August 7, 2007 | 11:27 am

OK. That?s it… understood… it is been only 7 days of working with Max, and hadn?t seen yet it?s "numerical" look.

Thanks, I hope within a couple of months my questions will be a little more interesant!

Best


August 7, 2007 | 2:20 pm

I’m working on an abstraction called "pattrmap" that does this pretty nicely using pattrstorage. I’ve included my work as an attachment and I just put together a help file to explain how it works.

If you are used to MIDI mapping in Ableton Live or something like that, it should make sense. Just name all the interface objects you want to map, and put it in "map mode" to do the mappings. It will remotely determine the range of the UI objects and do the communication through pattrstorage. You can also keep track of and edit your mappings in an editing window by double-clicking pattrmap.

It’s not 100% finished yet, but it’s working fine over here. Let me know if there’s any trouble…

Joe

————————–

http://www.greyfade.com/joe


August 7, 2007 | 3:23 pm

Very cool. I just tested it for a couple of minutes with a virtual
BCF2000, but it seemed to be working great. The multiple params
dialog appears twice, though, when it should only appear once, I
think. For instance, when you try to assign the rslider.

jb

Am 07.08.2007 um 16:20 schrieb Joe Branciforte:

> I’m working on an abstraction called "pattrmap" that does this
> pretty nicely using pattrstorage. I’ve included my work as an
> attachment and I just put together a help file to explain how it
> works.
>
> If you are used to MIDI mapping in Ableton Live or something like
> that, it should make sense. Just name all the interface objects
> you want to map, and put it in "map mode" to do the mappings. It
> will remotely determine the range of the UI objects and do the
> communication through pattrstorage. You can also keep track of and
> edit your mappings in an editing window by double-clicking pattrmap.
>
> It’s not 100% finished yet, but it’s working fine over here. Let me
> know if there’s any trouble…
>
> Joe
>
>
> ————————–
> http://www.greyfade.com/joe
>


August 7, 2007 | 4:07 pm

Thanks Jeremy, I’ll look into that. I probably shouldn’t have posted until I had all the kinks worked out – but I couldn’t resist.

Also, I just realized that there are a few embedded abstractions being used in there, primarily in the part of the patch managing controller out information. So that’s probably acting a little funny in the version I uploaded.

Another idea is to include support for incoming OSC messages… when I get some time, I’ll clean this up and repost.

Joe


August 7, 2007 | 4:18 pm

This is what I’ve been using for the same thing…it connects to a
pattrstorage as well.

I haven’t spent as much time on it, but it works and is simple…for
BCF mainly…

max v2;
#N vpatcher 14 59 614 459;
#P window setfont "Sans Serif" 9.;
#P number 80 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P hidden newex 198 332 40 196617 s $1to;
#P hidden newex 296 193 53 196617 r $1from;
#P hidden newex 198 311 37 196617 zl rev;
#P objectname u174000130[4];
#P hidden newex 198 290 44 196617 pack i s;
#P objectname u174000130[3];
#P hidden user gswitch 232 233 41 32 0 0;
#P toggle 14 109 27 0;
#P hidden newex 262 213 44 196617 pack i s;
#P objectname u174000130[2];
#N coll ;
#T flags 1 0;
#P hidden newobj 232 268 53 196617 coll;
#P objectname u174000130[1];
#P hidden message 14 48 14 196617 2;
#P hidden newex 14 28 48 196617 loadbang;
#P hidden number 296 156 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0
0 0;
#P hidden number 247 156 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0
0 0;
#P hidden number 198 156 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0
0 0;
#P hidden newex 198 135 109 196617 ctlin;
#P user umenu 14 90 107 196647 1 64 106 0;
#X add "AU DLS Synth 1";
#X add "from MaxMSP 1";
#X add "from MaxMSP 2";
#X add "BCF2000 Port 1";
#X add "BCF2000 Port 2";
#P hidden newex 14 67 46 196617 midiinfo;
#P window linecount 2;
#P comment 41 109 38 196617 Learn Mode;
#P hidden connect 7 0 8 0;
#P hidden connect 8 0 1 0;
#P hidden connect 1 0 2 0;
#P hidden connect 5 0 17 0;
#P hidden connect 2 1 3 0;
#P hidden connect 3 0 4 0;
#P hidden connect 4 0 13 0;
#P hidden connect 13 0 14 0;
#P hidden connect 14 0 16 0;
#P hidden fasten 11 0 12 0 19 204 237 204;
#P hidden connect 12 0 9 0;
#P hidden connect 9 0 13 1;
#P hidden connect 3 1 5 0;
#P hidden connect 5 0 12 1;
#P hidden connect 5 0 10 0;
#P hidden connect 10 0 12 2;
#P hidden connect 3 2 6 0;
#P hidden connect 15 0 10 1;
#P pop;

On Aug 7, 2007, at 7:20 AM, Joe Branciforte wrote:

> I’m working on an abstraction called "pattrmap" that does this
> pretty nicely using pattrstorage. I’ve included my work as an
> attachment and I just put together a help file to explain how it
> works.
>
> If you are used to MIDI mapping in Ableton Live or something like
> that, it should make sense. Just name all the interface objects
> you want to map, and put it in "map mode" to do the mappings. It
> will remotely determine the range of the UI objects and do the
> communication through pattrstorage. You can also keep track of and
> edit your mappings in an editing window by double-clicking pattrmap.
>
> It’s not 100% finished yet, but it’s working fine over here. Let me
> know if there’s any trouble…
>
> Joe
>
>
> ————————–
> http://www.greyfade.com/

Barry Threw
Media Art and Technology

San Francisco, CA Work: 857-544-3967
Email: bthrew@gmail.com
IM: captogreadmore (AIM)
http:/www.barrythrew.com


June 17, 2009 | 3:16 pm

hey there.. does the pattrmap object patch work in max 5? I’m trying to get it working, but i can’t get it to work at all.. Looks really excellent though!


June 17, 2009 | 11:01 pm

Cool thread, MIDI Learn is very useful and something we take for granted in other apps.

A couple thoughts for extending this in Max 5:

1. click into "Learn Mode"
2. hover over the control you want to map, it’s selected using [hover]
3. move controller you want mapped and map it (with whatever underlying system you’re using)
4. set UI object’s hint attribute: hint "Controller number 18"
5. click out of "Learn Mode"

Now it’s mapped, plus it’ll tell you which controller number it is with the hint popup.


June 17, 2009 | 11:38 pm

Thats very similar to a patch I posted in the other recent midi learning thread, although I’ve been using the mouse-over of tab objects rather than hover.

Setting the hint attribute is a really good idea! Less screen clutter than how I’ve done it.

I’ve used ctlin and gates for it. Are there any major advantages to setting it up using the pattr objects? I’m not at all familiar with them yet, need to experiment.

– Pasted Max Patch, click to expand. –

June 18, 2009 | 8:33 am

check the 1st example from July 2007. It is pattrstorage based, it was proposed by me at the time (and I sill use it in 5)

pa


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