Forums > MaxMSP

midside object…

February 16, 2006 | 9:53 am

Here’s a little object that does midside with stereo skew in a
CPU-efficient manner. (on G4 with Altivec)
Please e-mail me with questions or comments.

thanks,

Peter McCulloch

________________
PM.MidSide~
________________

max v2;
#N vpatcher 309 374 1042 661;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 531 189 105 196617 Stereo skew (-1 left , 0 center , 1
right);
#P window setfont "Arial Black" 12.;
#P window linecount 1;
#P comment 465 183 41 791478284 $2;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 531 149 162 196617 Width (-1 mono , 0 normal , 1 widest);
#P window setfont "Arial Black" 14.;
#P window linecount 1;
#P comment 460 107 96 791478286 Arguments:;
#P window setfont "Arial Black" 12.;
#P comment 465 143 41 791478284 $1;
#P user panel 460 130 68 90;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 460 130 239 90;
#X brgb 214 214 214;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P comment 566 226 133 196617 peter.mcculloch@gmail.com;
#P window linecount 2;
#P comment 468 69 221 196617 Perform mid-side adjustments on a stereo
signal.;
#P window setfont "Arial Black" 18.;
#P window linecount 1;
#P comment 466 30 135 791478290 PM.MidSide~;
#P user panel 460 61 239 40;
#X brgb 214 214 214;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 460 26 239 35;
#X brgb 162 168 201;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P newex 295 83 65 196617 loadmess $2;
#P newex 218 48 65 196617 loadmess $1;
#P comment 314 30 19 196617 1;
#P comment 276 30 19 196617 0;
#P comment 238 30 19 196617 -1;
#P comment 421 66 19 196617 1;
#P comment 383 66 19 196617 0;
#P comment 345 66 19 196617 -1;
#P comment 307 51 145 196617 Skew: Left__Center__Right;
#P comment 60 241 32 196617 Right;
#P comment 28 241 26 196617 Left;
#P comment 107 167 24 196617 Side;
#P comment 41 168 24 196617 Mid;
#P comment 159 21 32 196617 Right;
#P inlet 286 50 15 0;
#N comlet Width [-1 , 1];
#P inlet 211 16 15 0;
#N vpatcher 404 163 933 435;
#N comlet Stereo Skew [-1 , 1];
#P inlet 326 41 15 0;
#P objectname Stere;
#P window setfont "Sans Serif" 9.;
#N vpatcher 20 74 420 374;
#P window setfont "Sans Serif" 9.;
#P message 87 155 188 196617 ramp 50 , 0 0 1. , 1 0 1. , 0 1 1. , 1
1 -1.;
#P newex 87 119 45 196617 loadbang;
#P outlet 87 211 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 288 107 32 196617 p Init;
#N vpatcher 20 74 161 293;
#P window setfont "Sans Serif" 9.;
#P newex 22 159 40 196617 sqrt 1.;
#P newex 73 159 40 196617 sqrt 1.;
#P newex 22 132 29 196617 !- 1.;
#P newex 22 89 34 196617 * 0.5;
#P newex 22 63 27 196617 + 1.;
#P outlet 73 186 15 0;
#P outlet 22 186 15 0;
#P inlet 22 35 15 0;
#P connect 0 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 7 0;
#P connect 7 0 1 0;
#P connect 4 0 6 0;
#P connect 6 0 2 0;
#P pop;
#P newobj 326 78 65 196617 p Balance;
#N vpatcher 220 407 371 655;
#P window setfont "Sans Serif" 9.;
#P newex 28 57 40 196617 sqrt 0.;
#P newex 28 132 43 196617 pack f f;
#P newex 61 106 33 196617 * -1.;
#P newex 28 82 43 196617 t f f;
#P outlet 28 192 15 0;
#P message 28 159 75 196617 0 1 $1 , 1 1 $2;
#P inlet 28 37 15 0;
#P connect 0 0 6 0;
#P connect 6 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 3 1 4 0;
#P connect 4 0 5 1;
#P pop;
#P newobj 381 106 35 196617 p Side;
#N vpatcher 220 407 371 566;
#P outlet 28 104 15 0;
#P window setfont "Sans Serif" 9.;
#P message 28 80 75 196617 0 0 $1 , 1 0 $1;
#P inlet 28 37 15 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 326 107 45 196617 p Middle;
#P outlet 326 183 15 0;
#N vpatcher 20 74 161 293;
#P window setfont "Sans Serif" 9.;
#P newex 22 159 40 196617 sqrt 1.;
#P newex 73 159 40 196617 sqrt 1.;
#P newex 22 132 29 196617 !- 1.;
#P newex 22 89 34 196617 * 0.5;
#P newex 22 63 27 196617 + 1.;
#P outlet 73 186 15 0;
#P outlet 22 186 15 0;
#P inlet 22 35 15 0;
#P connect 0 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 7 0;
#P connect 7 0 1 0;
#P connect 4 0 6 0;
#P connect 6 0 2 0;
#P pop;
#P newobj 61 65 65 196617 p Balance;
#N comlet -1 , 1 Mono -> Stereo;
#P inlet 61 31 15 0;
#N vpatcher 220 407 371 655;
#P window setfont "Sans Serif" 9.;
#P newex 28 57 40 196617 sqrt 0.;
#P newex 28 132 43 196617 pack f f;
#P newex 61 106 33 196617 * -1.;
#P newex 28 82 43 196617 t f f;
#P outlet 28 192 15 0;
#P message 28 159 75 196617 0 1 $1 , 1 1 $2;
#P inlet 28 37 15 0;
#P connect 0 0 6 0;
#P connect 6 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 3 1 4 0;
#P connect 4 0 5 1;
#P pop;
#P newobj 116 93 35 196617 p Side;
#N vpatcher 220 407 371 566;
#P outlet 28 104 15 0;
#P window setfont "Sans Serif" 9.;
#P message 28 80 75 196617 0 0 $1 , 1 0 $1;
#P inlet 28 37 15 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 61 94 45 196617 p Middle;
#N vpatcher 20 74 420 374;
#P window setfont "Sans Serif" 9.;
#P message 87 155 188 196617 ramp 50 , 0 0 1. , 1 0 1. , 0 1 1. , 1
1 -1.;
#P newex 87 119 45 196617 loadbang;
#P outlet 87 211 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 20 92 32 196617 p Init;
#P outlet 20 154 15 0;
#P connect 1 0 0 0;
#P connect 2 0 0 0;
#P connect 3 0 0 0;
#P connect 4 0 5 0;
#P connect 5 0 2 0;
#P connect 5 1 3 0;
#P connect 11 0 9 0;
#P connect 9 0 7 0;
#P connect 10 0 6 0;
#P connect 7 0 6 0;
#P connect 8 0 6 0;
#P connect 9 1 8 0;
#P pop;
#P newobj 211 112 85 196617 p ControlMidSide;
#P outlet 64 222 15 0;
#P outlet 32 222 15 0;
#P newex 32 192 75 196617 matrix~ 2 2 0.;
#P newex 32 143 140 196617 matrix~ 2 2 0.;
#P inlet 162 42 15 0;
#P inlet 32 42 15 0;
#P comment 27 23 26 196617 Left;
#P comment 231 16 145 196617 Mono – Stereo – Widest Stereo;
#P fasten 8 0 4 0 216 137 37 137;
#P connect 2 0 4 0;
#P fasten 8 1 5 0 291 186 37 186;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 5 1 7 0;
#P connect 4 1 5 1;
#P connect 3 0 4 1;
#P fasten 23 0 8 0 223 70 216 70;
#P connect 9 0 8 0;
#P fasten 24 0 8 1 300 106 291 106;
#P connect 10 0 8 1;
#P pop;


Viewing 1 post (of 1 total)