Forums > MaxMSP

Newbie Midi Envelope Question


ND
April 21, 2006 | 3:37 pm

hello,

I was wondering whether it would be possible to create a midi control enevelope. For example play a midi note and shape the volume using something like the envi object. Unfortunately I have no idea how to start – would using the function breakpoint editor with the line object be a good starting place ?


April 21, 2006 | 3:59 pm

yes ;)

but you should read the tutorials, since it is very well covered in there

here is an example

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 291 398 27 196617 *~;
#P newex 225 219 29 196617 t b f;
#P message 391 232 33 196617 clear;
#P user ezdac~ 117 437 161 470 0;
#P newex 103 238 31 196617 mtof;
#P message 133 207 31 196617 0 10;
#P newex 133 164 32 196617 sel 0;
#P newex 155 188 40 196617 / 127.;
#P newex 103 139 40 196617 unpack;
#P newex 103 113 92 196617 midiparse;
#P newex 103 89 37 196617 midiin;
#P newex 127 394 27 196617 *~;
#P newex 103 266 61 196617 cycle~ 880;
#P newex 288 370 32 196617 line~;
#P user function 225 257 425 357 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 37.234043 1. 0;
#X add 154.25531 0.653333 0;
#X add 1000. 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P connect 0 1 1 0;
#P fasten 9 0 1 0 208 345 208 368 293 368;
#P connect 1 0 14 0;
#P connect 13 1 14 1;
#P connect 14 0 3 1;
#P connect 13 0 0 0;
#P connect 7 0 13 0;
#P fasten 12 0 0 0 396 252 230 252;
#P connect 3 0 11 0;
#P connect 3 0 11 1;
#P connect 2 0 3 0;
#P connect 10 0 2 0;
#P connect 6 0 10 0;
#P connect 8 0 9 0;
#P connect 8 1 7 0;
#P connect 6 1 8 0;
#P connect 5 0 6 0;
#P connect 4 0 5 0;
#P window clipboard copycount 15;


April 21, 2006 | 4:02 pm

You got it just right :-)
You can also send messages and many other solution but the one you
mentioned is a good start.

S.T


April 21, 2006 | 4:48 pm

Try this

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 300 132 40 196617 10000;
#P newex 299 109 48 196617 loadbang;
#P number 299 158 71 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 184 198 84 196617 pack 1000 1000;
#P newex 272 249 21 196617 t 0;
#P newex 120 114 32 196617 sel 1;
#P toggle 58 80 15 0;
#P newex 58 113 58 196617 metro 125;
#P newex 58 172 31 196617 + 36;
#P newex 58 145 58 196617 random 37;
#P newex 231 392 45 196617 ctlout 7;
#P button 231 150 15 0;
#P newex 231 227 50 196617 line 0 50;
#P message 279 199 14 196617 0;
#P newex 58 210 88 196617 makenote 96 250;
#P newex 58 248 43 196617 noteout;
#P user function 231 281 431 381 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 20.32 0;
#X add 244.680847 74.506668 0;
#X add 393.617004 23.706667 0;
#X add 627.659546 127. 0;
#X add 702.127625 28.786667 0;
#X add 845.744629 118.533333 0;
#X add 999.999939 0. 0;
#X domain 1000.;
#X range 0. 127.;
#X done;
#P comment 172 116 100 196617 bang to start shape;
#P window linecount 2;
#P comment 443 315 100 196617 get info to see range has been set 0..127;
#P comment 303 179 72 196617 duration of gesture in ms;
#P window linecount 1;
#P comment 300 250 100 196617 off at end of gesture;
#P fasten 16 0 14 0 277 270 419 270 419 59 63 59;
#P connect 14 0 13 0;
#P connect 13 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 6 0;
#P connect 6 0 5 0;
#P connect 6 1 5 1;
#P fasten 14 0 15 0 63 104 125 104;
#P connect 9 0 17 0;
#P fasten 15 0 9 0 125 139 236 139;
#P connect 17 0 8 0;
#P connect 7 0 8 0;
#P connect 8 0 4 0;
#P connect 4 0 10 0;
#P connect 18 0 17 1;
#P connect 8 1 16 0;
#P connect 9 0 7 0;
#P connect 20 0 18 0;
#P connect 19 0 20 0;
#P window clipboard copycount 21;

Cheers,
Gary Lee Nelson
TIMARA Department
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


April 22, 2006 | 8:32 am


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