a modified pan4S abstraction, and questions

Sep 3, 2007 at 8:47pm

a modified pan4S abstraction, and questions

Hello everyone,

I’ve attached a modified version of the pan4S abstraction that allows you to change the minimum amplitude of the panned sound (that is, control how quiet the sound is on the opposite side from which it is located – a kind of ambient level of the sound), and the width of the sound as it pans. To do this I’m updating the waveform stored in the buffer~ and accessed via the cycle~s.

The strange thing is that even though the waveform visually updates (i.e. after making a change, if I double-click on a cycle~ inside I see a new waveform), the sound output isn’t affected until I turn the dac off and back on again. Does someone know why this is happening? I can’t figure out any other way to get the new waveform to be recognized, again, even though buffer~ does show that the change has registered.

Here’s the abstraction, named pan4Sz:

max v2;
#N vpatcher 376 158 906 409;
#P window setfont Geneva 9.;
#P window linecount 2;
#P comment 422 156 93 196617 minimum amplitude (0.- 1.);
#N comlet minimum amplitude (0.- 1.);
#P inlet 455 183 15 0;
#P comment 360 129 95 196617 Width of waveform (0. – 1.);
#N comlet width of sound (0. – 1.);
#P inlet 380 183 15 0;
#P window linecount 1;
#N vpatcher 909 157 1169 516;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 127 220 27 131137545 t b f;
#P newex 17 58 27 131137545 f;
#P window linecount 2;
#P comment 144 196 83 131137545 minimum amplitude (0. – 1.);
#P window linecount 1;
#P newex 34 28 69 131137545 loadmess 0.5;
#N comlet minimum amplitude (0.- 1.);
#P inlet 127 196 15 0;
#P newex 17 80 29 131137545 t b f;
#P inlet 17 28 15 0;
#P newex 131 104 41 131137545 * 512.;
#P newex 131 171 98 131137545 expr (512-$i1) + 1;
#P window linecount 0;
#P newex 131 127 98 131137545 expr (512-$i1) / 2;
#P newex 17 316 113 131137545 buffer~ pan4.aif 11.61;
#P newex 17 293 75 131137545 peek~ pan4.aif;
#N counter 0 0 512;
#X flags 0 0;
#P newobj 17 171 108 131137545 counter 0 0 512;
#P newex 17 128 107 131137545 t 513 b clear;
#P newex 17 149 40 131137545 Uzi 10;
#P newex 17 194 56 131137545 t i i;
#P newex 17 270 56 131137545 pack 0 0.;
#N vpatcher 337 144 748 548;
#N comlet minimum amplitude (0. – 1.);
#P inlet 227 33 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 227 94 67 131137545 expr 512 – $i1;
#P newex 227 68 87 131137545 scale 0. 1. 0 256;
#P newex 299 94 86 131137545 expr sqrt($i1/256.);
#P newex 22 333 47 131137545 * 0.001;
#P newex 208 196 27 131137545 0.;
#P newex 208 116 20 131137545 t b;
#P newex 22 94 196 131137545 if $i1>=$i2 && $i1< =$i3 then $i1 else out2 $i1;
#P inlet 47 33 15 0;
#P newex 22 165 136 131137545 scale 128 384 0 512;
#P inlet 72 33 15 0;
#P newex 72 211 36 131137545 – 256;
#P newex 72 276 27 131137545 -;
#P newex 72 253 27 131137545 256;
#P newex 72 232 27 131137545 t b i;
#P newex 22 189 60 131137545 split 0 256;
#P newex 22 309 125 131137545 expr (sqrt($i1/256.)) * 1000.;
#P outlet 22 362 15 0;
#P inlet 22 33 15 0;
#P comment 244 33 136 131137545 minimum amplitude (0. – 1.);
#P connect 1 0 12 0;
#P connect 12 0 10 0;
#P connect 10 0 4 0;
#P connect 4 0 3 0;
#P fasten 7 0 3 0 77 301 27 301;
#P connect 3 0 15 0;
#P connect 15 0 2 0;
#P fasten 14 0 2 0 213 356 27 356;
#P connect 11 0 10 1;
#P connect 9 0 10 2;
#P connect 4 1 8 0;
#P connect 8 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 5 1 7 1;
#P connect 17 0 10 3;
#P connect 11 0 12 1;
#P connect 18 0 10 4;
#P connect 9 0 12 2;
#P connect 12 1 13 0;
#P connect 13 0 14 0;
#P fasten 16 0 14 1 304 153 230 153;
#P connect 19 0 17 0;
#P connect 17 0 18 0;
#P fasten 17 0 16 0 232 89 304 89;
#P pop;
#P newobj 63 247 93 131137545 p pan_curve;
#B color 12;
#P connect 14 0 16 0;
#P connect 11 0 16 0;
#P connect 17 0 16 0;
#P connect 16 0 12 0;
#P connect 12 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 6 0;
#P connect 4 2 7 0;
#P lcolor 8;
#P connect 2 1 0 0;
#P connect 0 0 1 1;
#P connect 4 1 5 2;
#P connect 8 0 0 1;
#P connect 9 0 0 2;
#P connect 13 0 17 0;
#P fasten 12 1 10 0 41 100 136 100;
#P connect 10 0 8 0;
#P connect 8 0 9 0;
#P connect 17 1 0 3;
#P pop;
#P newobj 380 209 85 196617 patcher panCurve;
#B color 12;
#P window setfont “Sans Serif” 9.;
#N vpatcher 10 59 389 309;
#P window setfont “Sans Serif” 9.;
#P comment 164 182 157 131137545 < - it's the way her panpots work;
#P comment 30 203 114 131137545 speaker 4 = right rear;
#P comment 30 188 114 131137545 speaker 3 = left rear;
#P comment 30 173 114 131137545 speaker 2 = right front;
#P comment 30 158 114 131137545 speaker 1 = left front;
#P comment 30 128 244 131137545 but when you explain that to the sound engineer , she’ll give you one of those looks…so make it easy:;
#P comment 30 109 114 131137545 speaker 4 = left rear;
#P comment 30 94 114 131137545 speaker 3 = right rear;
#P comment 30 79 114 131137545 speaker 2 = right front;
#P comment 30 33 262 131137545 when you build a patch to move sounds in a circle or spiral around you , this numbering system makes sense:;
#P comment 30 64 114 131137545 speaker 1 = left front;
#P comment 176 89 73 131137545 < - it's a circle;
#P pop;
#P newobj 14 209 54 131137545 p friends;
#B color 12;
#P newex 380 73 44 131137545 +~ 0.;
#P newex 206 73 48 131137545 +~ 0.25;
#P newex 294 73 44 131137545 +~ 0.75;
#P newex 288 135 31 131137545 *~;
#P newex 309 104 81 131137545 cycle~ pan4.aif;
#N comlet LeftRear Signal Out;
#P outlet 202 160 15 0;
#P comment 175 178 92 131137545 LeftRear Signal Out;
#P newex 223 104 81 131137545 cycle~ pan4.aif;
#P comment 270 178 102 131137545 RightRear Signal Out;
#N comlet RightRear Signal Out;
#P outlet 288 160 15 0;
#P newex 202 135 31 131137545 *~;
#P newex 120 73 44 131137545 +~ 0.5;
#P newex 114 135 31 131137545 *~;
#P newex 135 104 81 131137545 cycle~ pan4.aif;
#N comlet Right Signal Out;
#P outlet 114 160 15 0;
#P comment 88 178 76 131137545 Right Signal Out;
#P newex 49 104 81 131137545 cycle~ pan4.aif;
#P comment 8 178 76 131137545 Left Signal Out;
#N comlet Left Signal Out;
#P outlet 28 160 15 0;
#P newex 28 135 31 131137545 *~;
#N comlet Signal In;
#P inlet 28 29 15 0;
#P comment 53 29 42 131137545 Signal In;
#N comlet (SIgnal) Quad Pan (0. – 1.);
#P inlet 120 29 15 0;
#P comment 136 29 129 131137545 (SIgnal) Quad Pan (0. – 1.);
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 7 0 4 1;
#P fasten 3 0 11 0 33 128 119 128;
#P connect 11 0 9 0;
#P fasten 1 0 12 0 125 64 125 64;
#P connect 12 0 7 1;
#P connect 10 0 11 1;
#P fasten 3 0 13 0 33 128 207 128;
#P connect 13 0 18 0;
#P fasten 1 0 22 0 125 63 211 63;
#P connect 22 0 10 1;
#P connect 16 0 13 1;
#P fasten 3 0 20 0 33 128 293 128;
#P connect 20 0 14 0;
#P fasten 1 0 21 0 125 63 299 63;
#P connect 21 0 16 1;
#P connect 19 0 20 1;
#P fasten 1 0 23 0 125 63 385 63;
#P connect 23 0 19 1;
#P connect 26 0 25 0;
#P connect 28 0 25 1;
#P pop;

————————-

And here’s the parent patch, named whatever:

max v2;
#N vpatcher 474 96 760 400;
#P window setfont Geneva 9.;
#P window linecount 4;
#P comment 26 24 245 196617 NOTE ON WIDTH ; 0.5 is the minimum recommended width ; (resulting in panning between two channels at time) ; For wider presence increase the value.;
#P window linecount 1;
#P comment 92 107 43 196617 panning;
#P user meter~ 219 219 232 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 164 219 177 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 107 219 120 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 50 219 63 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P hidden newex 151 99 48 196617 loadbang;
#P hidden message 151 116 42 196617 set 0.5;
#P flonum 207 142 35 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 95 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 95 142 29 196617 sig~;
#P toggle 20 167 15 0;
#P flonum 151 142 35 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 39 198 180 196617 dac~ 1 2 3 4;
#P newex 39 167 179 196617 pan4Sz;
#P user gain~ 39 103 34 28 158 0 1.071519 7.94321 10.;
#P newex 39 77 61 196617 cycle~ 300;
#P window linecount 2;
#P comment 147 116 48 196617 width of sound;
#P comment 204 116 48 196617 minimum amp;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P fasten 7 0 5 0 25 189 44 189;
#P connect 4 0 13 0;
#P connect 9 0 8 0;
#P connect 8 0 4 1;
#P connect 4 1 5 1;
#P connect 4 1 14 0;
#P hidden connect 12 0 11 0;
#P hidden connect 11 0 6 0;
#P connect 6 0 4 2;
#P connect 4 2 5 2;
#P connect 4 2 15 0;
#P connect 10 0 4 3;
#P connect 4 3 5 3;
#P connect 4 3 16 0;
#P pop;

#33518
Sep 4, 2007 at 10:08am

save this as pan4Szx and use in place of pan4Sz:

#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P message 292 98 82 1441802 set pan4.aif;
#B color 1;
#P window setfont “Sans Serif” 9.;
#P comment 472 34 133 196617 minimum amplitude (0.- 1.);
#N comlet minimum amplitude (0.- 1.);
#P inlet 455 34 15 0;
#P comment 308 34 136 196617 Width of waveform (0. – 1.);
#N comlet width of sound (0. – 1.);
#P inlet 292 34 15 0;
#N vpatcher 909 157 1169 516;
#P outlet 32 229 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 127 220 27 196617 t b f;
#P newex 17 58 27 196617 f;
#P window linecount 2;
#P comment 144 196 97 196617 minimum amplitude (0. – 1.);
#P window linecount 1;
#P newex 34 28 69 196617 loadmess 0.5;
#N comlet minimum amplitude (0.- 1.);
#P inlet 127 196 15 0;
#P newex 17 80 29 196617 t b f;
#P inlet 17 28 15 0;
#P newex 131 104 41 196617 * 512.;
#P newex 131 171 98 196617 expr (512-$i1) + 1;
#P window linecount 0;
#P newex 131 127 98 196617 expr (512-$i1) / 2;
#P newex 17 316 113 196617 buffer~ pan4.aif 11.61;
#P newex 17 293 75 196617 peek~ pan4.aif;
#N counter 0 0 512;
#X flags 0 0;
#P newobj 17 171 108 196617 counter 0 0 512;
#P newex 17 128 107 196617 t 513 b clear;
#P newex 17 149 40 196617 Uzi 10;
#P newex 17 194 56 196617 t i i;
#P newex 17 270 56 196617 pack 0 0.;
#N vpatcher 337 144 748 548;
#N comlet minimum amplitude (0. – 1.);
#P inlet 227 33 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 227 94 67 196617 expr 512 – $i1;
#P newex 227 68 87 196617 scale 0. 1. 0 256;
#P newex 299 94 86 196617 expr sqrt($i1/256.);
#P newex 22 333 47 196617 * 0.001;
#P newex 208 196 27 196617 0.;
#P newex 208 116 20 196617 t b;
#P newex 22 94 196 196617 if $i1>=$i2 && $i1< =$i3 then $i1 else out2 $i1;
#P inlet 47 33 15 0;
#P newex 22 165 136 196617 scale 128 384 0 512;
#P inlet 72 33 15 0;
#P newex 72 211 36 196617 – 256;
#P newex 72 276 27 196617 -;
#P newex 72 253 27 196617 256;
#P newex 72 232 27 196617 t b i;
#P newex 22 189 60 196617 split 0 256;
#P newex 22 309 125 196617 expr (sqrt($i1/256.)) * 1000.;
#P outlet 22 362 15 0;
#P inlet 22 33 15 0;
#P comment 244 33 136 196617 minimum amplitude (0. – 1.);
#P connect 1 0 12 0;
#P connect 12 0 10 0;
#P connect 10 0 4 0;
#P fasten 7 0 3 0 77 301 27 301;
#P connect 4 0 3 0;
#P connect 3 0 15 0;
#P fasten 14 0 2 0 213 356 27 356;
#P connect 15 0 2 0;
#P connect 11 0 10 1;
#P connect 9 0 10 2;
#P connect 4 1 8 0;
#P connect 8 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 5 1 7 1;
#P connect 17 0 10 3;
#P connect 11 0 12 1;
#P connect 18 0 10 4;
#P connect 9 0 12 2;
#P connect 12 1 13 0;
#P connect 13 0 14 0;
#P fasten 16 0 14 1 304 153 230 153;
#P connect 19 0 17 0;
#P connect 17 0 18 0;
#P fasten 17 0 16 0 232 89 304 89;
#P pop;
#P newobj 63 247 93 196617 p pan_curve;
#B color 12;
#P connect 17 0 16 0;
#P connect 11 0 16 0;
#P connect 14 0 16 0;
#P connect 16 0 12 0;
#P connect 12 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 6 0;
#P connect 4 2 7 0;
#P lcolor 8;
#P connect 3 1 18 0;
#P lcolor 2;
#P connect 2 1 0 0;
#P connect 0 0 1 1;
#P connect 4 1 5 2;
#P connect 8 0 0 1;
#P connect 9 0 0 2;
#P connect 13 0 17 0;
#P fasten 12 1 10 0 41 100 136 100;
#P connect 10 0 8 0;
#P connect 8 0 9 0;
#P connect 17 1 0 3;
#P pop;
#P newobj 292 75 85 196617 patcher panCurve;
#B color 12;
#N vpatcher 10 59 389 309;
#P window setfont “Sans Serif” 9.;
#P comment 164 182 157 196617 < - it's the way her panpots work;
#P comment 30 203 114 196617 speaker 4 = right rear;
#P comment 30 188 114 196617 speaker 3 = left rear;
#P comment 30 173 114 196617 speaker 2 = right front;
#P comment 30 158 114 196617 speaker 1 = left front;
#P comment 30 128 244 196617 but when you explain that to the sound
engineer , she’ll give you one of those looks…so make it easy:;
#P comment 30 109 114 196617 speaker 4 = left rear;
#P comment 30 94 114 196617 speaker 3 = right rear;
#P comment 30 79 114 196617 speaker 2 = right front;
#P comment 30 33 262 196617 when you build a patch to move sounds in a
circle or spiral around you , this numbering system makes sense:;
#P comment 30 64 114 196617 speaker 1 = left front;
#P comment 176 89 73 196617 < - it's a circle;
#P pop;
#P newobj 12 293 54 196617 p friends;
#B color 12;
#P newex 378 157 44 196617 +~ 0.;
#P newex 204 157 48 196617 +~ 0.25;
#P newex 292 157 44 196617 +~ 0.75;
#P newex 286 219 31 196617 *~;
#P newex 307 188 79 196617 cycle~ pan4.aif;
#N comlet LeftRear Signal Out;
#P outlet 200 244 15 0;
#P comment 173 262 92 196617 LeftRear Signal Out;
#P newex 221 188 81 196617 cycle~ pan4.aif;
#P comment 268 262 102 196617 RightRear Signal Out;
#N comlet RightRear Signal Out;
#P outlet 286 244 15 0;
#P newex 200 219 31 196617 *~;
#P newex 118 157 44 196617 +~ 0.5;
#P newex 112 219 31 196617 *~;
#P newex 133 188 81 196617 cycle~ pan4.aif;
#N comlet Right Signal Out;
#P outlet 112 244 15 0;
#P comment 86 262 76 196617 Right Signal Out;
#P newex 47 188 81 196617 cycle~ pan4.aif;
#P comment 6 262 76 196617 Left Signal Out;
#N comlet Left Signal Out;
#P outlet 26 244 15 0;
#P newex 26 219 31 196617 *~;
#N comlet Signal In;
#P inlet 26 34 15 0;
#P comment 51 34 48 196617 Signal In;
#N comlet (SIgnal) Quad Pan (0. – 1.);
#P inlet 118 34 15 0;
#P comment 134 34 128 196617 (SIgnal) Quad Pan (0. – 1.);
#P fasten 1 0 12 0 123 148 123 148;
#P fasten 1 0 22 0 123 147 209 147;
#P fasten 1 0 21 0 123 147 297 147;
#P fasten 1 0 23 0 123 147 383 147;
#P connect 23 0 19 1;
#P connect 28 0 25 1;
#P connect 19 0 20 1;
#P connect 30 0 7 0;
#P lcolor 2;
#P connect 30 0 10 0;
#P lcolor 2;
#P connect 30 0 16 0;
#P lcolor 2;
#P connect 30 0 19 0;
#P lcolor 2;
#P connect 21 0 16 1;
#P connect 25 0 30 0;
#P lcolor 2;
#P connect 26 0 25 0;
#P connect 20 0 14 0;
#P connect 3 0 4 0;
#P fasten 3 0 11 0 31 212 117 212;
#P fasten 3 0 13 0 31 212 205 212;
#P fasten 3 0 20 0 31 212 291 212;
#P connect 16 0 13 1;
#P connect 22 0 10 1;
#P connect 13 0 18 0;
#P connect 10 0 11 1;
#P connect 12 0 7 1;
#P connect 11 0 9 0;
#P connect 7 0 4 1;
#P connect 4 0 5 0;
#P window clipboard copycount 31;

it sends a set message to cycle~s when waveform is remade

On 03/09/07, Zachary Seldess wrote:
>
> Hello everyone,
>
> I’ve attached a modified version of the pan4S abstraction that allows you to change the minimum amplitude of the panned sound (that is, control how quiet the sound is on the opposite side from which it is located – a kind of ambient level of the sound), and the width of the sound as it pans. To do this I’m updating the waveform stored in the buffer~ and accessed via the cycle~s.
>
> The strange thing is that even though the waveform visually updates (i.e. after making a change, if I double-click on a cycle~ inside I see a new waveform), the sound output isn’t affected until I turn the dac off and back on again. Does someone know why this is happening? I can’t figure out any other way to get the new waveform to be recognized, again, even though buffer~ does show that the change has registered.
>
> Here’s the abstraction, named pan4Sz:
>
> max v2;
> #N vpatcher 376 158 906 409;
> #P window setfont Geneva 9.;
> #P window linecount 2;
> #P comment 422 156 93 196617 minimum amplitude (0.- 1.);
> #N comlet minimum amplitude (0.- 1.);
> #P inlet 455 183 15 0;
> #P comment 360 129 95 196617 Width of waveform (0. – 1.);
> #N comlet width of sound (0. – 1.);
> #P inlet 380 183 15 0;
> #P window linecount 1;
> #N vpatcher 909 157 1169 516;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 127 220 27 131137545 t b f;
> #P newex 17 58 27 131137545 f;
> #P window linecount 2;
> #P comment 144 196 83 131137545 minimum amplitude (0. – 1.);
> #P window linecount 1;
> #P newex 34 28 69 131137545 loadmess 0.5;
> #N comlet minimum amplitude (0.- 1.);
> #P inlet 127 196 15 0;
> #P newex 17 80 29 131137545 t b f;
> #P inlet 17 28 15 0;
> #P newex 131 104 41 131137545 * 512.;
> #P newex 131 171 98 131137545 expr (512-$i1) + 1;
> #P window linecount 0;
> #P newex 131 127 98 131137545 expr (512-$i1) / 2;
> #P newex 17 316 113 131137545 buffer~ pan4.aif 11.61;
> #P newex 17 293 75 131137545 peek~ pan4.aif;
> #N counter 0 0 512;
> #X flags 0 0;
> #P newobj 17 171 108 131137545 counter 0 0 512;
> #P newex 17 128 107 131137545 t 513 b clear;
> #P newex 17 149 40 131137545 Uzi 10;
> #P newex 17 194 56 131137545 t i i;
> #P newex 17 270 56 131137545 pack 0 0.;
> #N vpatcher 337 144 748 548;
> #N comlet minimum amplitude (0. – 1.);
> #P inlet 227 33 15 0;
> #P window setfont “Sans Serif” 9.;
> #P newex 227 94 67 131137545 expr 512 – $i1;
> #P newex 227 68 87 131137545 scale 0. 1. 0 256;
> #P newex 299 94 86 131137545 expr sqrt($i1/256.);
> #P newex 22 333 47 131137545 * 0.001;
> #P newex 208 196 27 131137545 0.;
> #P newex 208 116 20 131137545 t b;
> #P newex 22 94 196 131137545 if $i1>=$i2 && $i1< =$i3 then $i1 else out2 $i1;
> #P inlet 47 33 15 0;
> #P newex 22 165 136 131137545 scale 128 384 0 512;
> #P inlet 72 33 15 0;
> #P newex 72 211 36 131137545 – 256;
> #P newex 72 276 27 131137545 -;
> #P newex 72 253 27 131137545 256;
> #P newex 72 232 27 131137545 t b i;
> #P newex 22 189 60 131137545 split 0 256;
> #P newex 22 309 125 131137545 expr (sqrt($i1/256.)) * 1000.;
> #P outlet 22 362 15 0;
> #P inlet 22 33 15 0;
> #P comment 244 33 136 131137545 minimum amplitude (0. – 1.);
> #P connect 1 0 12 0;
> #P connect 12 0 10 0;
> #P connect 10 0 4 0;
> #P connect 4 0 3 0;
> #P fasten 7 0 3 0 77 301 27 301;
> #P connect 3 0 15 0;
> #P connect 15 0 2 0;
> #P fasten 14 0 2 0 213 356 27 356;
> #P connect 11 0 10 1;
> #P connect 9 0 10 2;
> #P connect 4 1 8 0;
> #P connect 8 0 5 0;
> #P connect 5 0 6 0;
> #P connect 6 0 7 0;
> #P connect 5 1 7 1;
> #P connect 17 0 10 3;
> #P connect 11 0 12 1;
> #P connect 18 0 10 4;
> #P connect 9 0 12 2;
> #P connect 12 1 13 0;
> #P connect 13 0 14 0;
> #P fasten 16 0 14 1 304 153 230 153;
> #P connect 19 0 17 0;
> #P connect 17 0 18 0;
> #P fasten 17 0 16 0 232 89 304 89;
> #P pop;
> #P newobj 63 247 93 131137545 p pan_curve;
> #B color 12;
> #P connect 14 0 16 0;
> #P connect 11 0 16 0;
> #P connect 17 0 16 0;
> #P connect 16 0 12 0;
> #P connect 12 0 4 0;
> #P connect 4 0 3 0;
> #P connect 3 0 5 0;
> #P connect 5 0 2 0;
> #P connect 2 0 1 0;
> #P connect 1 0 6 0;
> #P connect 4 2 7 0;
> #P lcolor 8;
> #P connect 2 1 0 0;
> #P connect 0 0 1 1;
> #P connect 4 1 5 2;
> #P connect 8 0 0 1;
> #P connect 9 0 0 2;
> #P connect 13 0 17 0;
> #P fasten 12 1 10 0 41 100 136 100;
> #P connect 10 0 8 0;
> #P connect 8 0 9 0;
> #P connect 17 1 0 3;
> #P pop;
> #P newobj 380 209 85 196617 patcher panCurve;
> #B color 12;
> #P window setfont “Sans Serif” 9.;
> #N vpatcher 10 59 389 309;
> #P window setfont “Sans Serif” 9.;
> #P comment 164 182 157 131137545 < - it's the way her panpots work;
> #P comment 30 203 114 131137545 speaker 4 = right rear;
> #P comment 30 188 114 131137545 speaker 3 = left rear;
> #P comment 30 173 114 131137545 speaker 2 = right front;
> #P comment 30 158 114 131137545 speaker 1 = left front;
> #P comment 30 128 244 131137545 but when you explain that to the sound engineer , she’ll give you one of those looks…so make it easy:;
> #P comment 30 109 114 131137545 speaker 4 = left rear;
> #P comment 30 94 114 131137545 speaker 3 = right rear;
> #P comment 30 79 114 131137545 speaker 2 = right front;
> #P comment 30 33 262 131137545 when you build a patch to move sounds in a circle or spiral around you , this numbering system makes sense:;
> #P comment 30 64 114 131137545 speaker 1 = left front;
> #P comment 176 89 73 131137545 < - it's a circle;
> #P pop;
> #P newobj 14 209 54 131137545 p friends;
> #B color 12;
> #P newex 380 73 44 131137545 +~ 0.;
> #P newex 206 73 48 131137545 +~ 0.25;
> #P newex 294 73 44 131137545 +~ 0.75;
> #P newex 288 135 31 131137545 *~;
> #P newex 309 104 81 131137545 cycle~ pan4.aif;
> #N comlet LeftRear Signal Out;
> #P outlet 202 160 15 0;
> #P comment 175 178 92 131137545 LeftRear Signal Out;
> #P newex 223 104 81 131137545 cycle~ pan4.aif;
> #P comment 270 178 102 131137545 RightRear Signal Out;
> #N comlet RightRear Signal Out;
> #P outlet 288 160 15 0;
> #P newex 202 135 31 131137545 *~;
> #P newex 120 73 44 131137545 +~ 0.5;
> #P newex 114 135 31 131137545 *~;
> #P newex 135 104 81 131137545 cycle~ pan4.aif;
> #N comlet Right Signal Out;
> #P outlet 114 160 15 0;
> #P comment 88 178 76 131137545 Right Signal Out;
> #P newex 49 104 81 131137545 cycle~ pan4.aif;
> #P comment 8 178 76 131137545 Left Signal Out;
> #N comlet Left Signal Out;
> #P outlet 28 160 15 0;
> #P newex 28 135 31 131137545 *~;
> #N comlet Signal In;
> #P inlet 28 29 15 0;
> #P comment 53 29 42 131137545 Signal In;
> #N comlet (SIgnal) Quad Pan (0. – 1.);
> #P inlet 120 29 15 0;
> #P comment 136 29 129 131137545 (SIgnal) Quad Pan (0. – 1.);
> #P connect 3 0 4 0;
> #P connect 4 0 5 0;
> #P connect 7 0 4 1;
> #P fasten 3 0 11 0 33 128 119 128;
> #P connect 11 0 9 0;
> #P fasten 1 0 12 0 125 64 125 64;
> #P connect 12 0 7 1;
> #P connect 10 0 11 1;
> #P fasten 3 0 13 0 33 128 207 128;
> #P connect 13 0 18 0;
> #P fasten 1 0 22 0 125 63 211 63;
> #P connect 22 0 10 1;
> #P connect 16 0 13 1;
> #P fasten 3 0 20 0 33 128 293 128;
> #P connect 20 0 14 0;
> #P fasten 1 0 21 0 125 63 299 63;
> #P connect 21 0 16 1;
> #P connect 19 0 20 1;
> #P fasten 1 0 23 0 125 63 385 63;
> #P connect 23 0 19 1;
> #P connect 26 0 25 0;
> #P connect 28 0 25 1;
> #P pop;
>
> ————————-
>
> And here’s the parent patch, named whatever:
>
> max v2;
> #N vpatcher 474 96 760 400;
> #P window setfont Geneva 9.;
> #P window linecount 4;
> #P comment 26 24 245 196617 NOTE ON WIDTH ; 0.5 is the minimum recommended width ; (resulting in panning between two channels at time) ; For wider presence increase the value.;
> #P window linecount 1;
> #P comment 92 107 43 196617 panning;
> #P user meter~ 219 219 232 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
> #P user meter~ 164 219 177 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
> #P user meter~ 107 219 120 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
> #P user meter~ 50 219 63 277 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
> #P hidden newex 151 99 48 196617 loadbang;
> #P hidden message 151 116 42 196617 set 0.5;
> #P flonum 207 142 35 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 95 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 95 142 29 196617 sig~;
> #P toggle 20 167 15 0;
> #P flonum 151 142 35 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 39 198 180 196617 dac~ 1 2 3 4;
> #P newex 39 167 179 196617 pan4Sz;
> #P user gain~ 39 103 34 28 158 0 1.071519 7.94321 10.;
> #P newex 39 77 61 196617 cycle~ 300;
> #P window linecount 2;
> #P comment 147 116 48 196617 width of sound;
> #P comment 204 116 48 196617 minimum amp;
> #P connect 2 0 3 0;
> #P connect 3 0 4 0;
> #P connect 4 0 5 0;
> #P fasten 7 0 5 0 25 189 44 189;
> #P connect 4 0 13 0;
> #P connect 9 0 8 0;
> #P connect 8 0 4 1;
> #P connect 4 1 5 1;
> #P connect 4 1 14 0;
> #P hidden connect 12 0 11 0;
> #P hidden connect 11 0 6 0;
> #P connect 6 0 4 2;
> #P connect 4 2 5 2;
> #P connect 4 2 15 0;
> #P connect 10 0 4 3;
> #P connect 4 3 5 3;
> #P connect 4 3 16 0;
> #P pop;
>
> –
> http://www.zacharyseldess.com
>
>

#111739
Sep 4, 2007 at 2:58pm

Thanks Samuel, I figured something quite simple was alluding me, and there it is! Now that that is fixed, here is the pan4Sz abstraction again along with a sample patch that uses lcd to control the position and loudness of the sound, and another parent/abstraction pair that does the same thing but with 8 channels. The distance/fading behavior is very simple – I’ll try to post more realistic fading at some other time. Any comments/suggestions would be great.

Zachary

save this abstraction as pan4Sz.pat:

max v2;
#N vpatcher 10 59 532 401;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P message 290 98 82 1441802 set pan4.aif;
#B color 1;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 413 34 88 131137545 minimum amplitude (0.- 1.);
#N comlet minimum amplitude (0.- 1.);
#P inlet 396 34 15 0;
#P comment 306 34 89 131137545 Width of waveform (0. – 1.);
#N comlet width of sound (0. – 1.);
#P inlet 290 34 15 0;
#P window linecount 1;
#N vpatcher 909 157 1169 516;
#P outlet 32 229 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 127 220 27 131137545 t b f;
#P newex 17 58 27 131137545 f;
#P window linecount 2;
#P comment 144 196 87 131137545 minimum amplitude (0. – 1.);
#P window linecount 1;
#P newex 34 28 69 131137545 loadmess 0.5;
#N comlet minimum amplitude (0.- 1.);
#P inlet 127 196 15 0;
#P newex 17 80 29 131137545 t b f;
#P inlet 17 28 15 0;
#P newex 131 104 41 131137545 * 512.;
#P newex 131 171 98 131137545 expr (512-$i1) + 1;
#P window linecount 0;
#P newex 131 127 98 131137545 expr (512-$i1) / 2;
#P newex 17 316 113 131137545 buffer~ pan4.aif 11.61;
#P newex 17 293 75 131137545 peek~ pan4.aif;
#N counter 0 0 512;
#X flags 0 0;
#P newobj 17 171 108 131137545 counter 0 0 512;
#P newex 17 128 107 131137545 t 513 b clear;
#P newex 17 149 40 131137545 Uzi 10;
#P newex 17 194 56 131137545 t i i;
#P newex 17 270 56 131137545 pack 0 0.;
#N vpatcher 337 144 748 548;
#N comlet minimum amplitude (0. – 1.);
#P inlet 227 33 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 227 94 67 131137545 expr 512 – $i1;
#P newex 227 68 87 131137545 scale 0. 1. 0 256;
#P newex 299 94 86 131137545 expr sqrt($i1/256.);
#P newex 22 333 47 131137545 * 0.001;
#P newex 208 196 27 131137545 0.;
#P newex 208 116 20 131137545 t b;
#P newex 22 94 196 131137545 if $i1>=$i2 && $i1< =$i3 then $i1 else out2 $i1;
#P inlet 47 33 15 0;
#P newex 22 165 136 131137545 scale 128 384 0 512;
#P inlet 72 33 15 0;
#P newex 72 211 36 131137545 – 256;
#P newex 72 276 27 131137545 -;
#P newex 72 253 27 131137545 256;
#P newex 72 232 27 131137545 t b i;
#P newex 22 189 60 131137545 split 0 256;
#P newex 22 309 125 131137545 expr (sqrt($i1/256.)) * 1000.;
#P outlet 22 362 15 0;
#P inlet 22 33 15 0;
#P comment 244 33 136 131137545 minimum amplitude (0. – 1.);
#P connect 1 0 12 0;
#P connect 12 0 10 0;
#P connect 10 0 4 0;
#P fasten 7 0 3 0 77 301 27 301;
#P connect 4 0 3 0;
#P connect 3 0 15 0;
#P fasten 14 0 2 0 213 356 27 356;
#P connect 15 0 2 0;
#P connect 11 0 10 1;
#P connect 9 0 10 2;
#P connect 4 1 8 0;
#P connect 8 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 5 1 7 1;
#P connect 17 0 10 3;
#P connect 11 0 12 1;
#P connect 18 0 10 4;
#P connect 9 0 12 2;
#P connect 12 1 13 0;
#P connect 13 0 14 0;
#P fasten 16 0 14 1 304 153 230 153;
#P connect 19 0 17 0;
#P connect 17 0 18 0;
#P fasten 17 0 16 0 232 89 304 89;
#P pop;
#P newobj 63 247 93 131137545 p pan_curve;
#B color 12;
#P connect 17 0 16 0;
#P connect 11 0 16 0;
#P connect 14 0 16 0;
#P connect 16 0 12 0;
#P connect 12 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 6 0;
#P connect 4 2 7 0;
#P lcolor 8;
#P connect 3 1 18 0;
#P lcolor 2;
#P connect 2 1 0 0;
#P connect 0 0 1 1;
#P connect 4 1 5 2;
#P connect 8 0 0 1;
#P connect 9 0 0 2;
#P connect 13 0 17 0;
#P fasten 12 1 10 0 41 100 136 100;
#P connect 10 0 8 0;
#P connect 8 0 9 0;
#P connect 17 1 0 3;
#P pop;
#P newobj 290 75 85 131137545 patcher panCurve;
#B color 12;
#N vpatcher 10 59 389 309;
#P window setfont “Sans Serif” 9.;
#P comment 164 182 157 131137545 < - it's the way her panpots work;
#P comment 30 203 114 131137545 speaker 4 = right rear;
#P comment 30 188 114 131137545 speaker 3 = left rear;
#P comment 30 173 114 131137545 speaker 2 = right front;
#P comment 30 158 114 131137545 speaker 1 = left front;
#P comment 30 128 244 131137545 but when you explain that to the sound engineer , she’ll give you one of those looks…so make it easy:;
#P comment 30 109 114 131137545 speaker 4 = left rear;
#P comment 30 94 114 131137545 speaker 3 = right rear;
#P comment 30 79 114 131137545 speaker 2 = right front;
#P comment 30 33 262 131137545 when you build a patch to move sounds in a circle or spiral around you , this numbering system makes sense:;
#P comment 30 64 114 131137545 speaker 1 = left front;
#P comment 176 89 73 131137545 < - it's a circle;
#P pop;
#P newobj 10 293 54 131137545 p friends;
#B color 12;
#P newex 374 157 44 131137545 +~ 0.;
#P newex 202 157 48 131137545 +~ 0.25;
#P newex 290 157 44 131137545 +~ 0.75;
#P newex 284 219 31 131137545 *~;
#P newex 305 188 79 131137545 cycle~ pan4.aif;
#N comlet LeftRear Signal Out;
#P outlet 198 244 15 0;
#P comment 171 262 92 131137545 LeftRear Signal Out;
#P newex 219 188 81 131137545 cycle~ pan4.aif;
#P comment 266 262 102 131137545 RightRear Signal Out;
#N comlet RightRear Signal Out;
#P outlet 284 244 15 0;
#P newex 198 219 31 131137545 *~;
#P newex 116 157 44 131137545 +~ 0.5;
#P newex 110 219 31 131137545 *~;
#P newex 131 188 81 131137545 cycle~ pan4.aif;
#N comlet Right Signal Out;
#P outlet 110 244 15 0;
#P comment 84 262 76 131137545 Right Signal Out;
#P newex 45 188 81 131137545 cycle~ pan4.aif;
#P comment 4 262 76 131137545 Left Signal Out;
#N comlet Left Signal Out;
#P outlet 24 244 15 0;
#P newex 24 219 31 131137545 *~;
#N comlet Signal In;
#P inlet 24 34 15 0;
#P comment 49 34 48 131137545 Signal In;
#N comlet (SIgnal) Quad Pan (0. – 1.);
#P inlet 116 34 15 0;
#P comment 132 34 128 131137545 (SIgnal) Quad Pan (0. – 1.);
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 30 0 7 0;
#P lcolor 2;
#P connect 7 0 4 1;
#P fasten 3 0 11 0 29 212 115 212;
#P connect 11 0 9 0;
#P fasten 1 0 12 0 121 148 121 148;
#P connect 12 0 7 1;
#P connect 30 0 10 0;
#P lcolor 2;
#P connect 10 0 11 1;
#P fasten 3 0 13 0 29 212 203 212;
#P connect 13 0 18 0;
#P fasten 1 0 22 0 121 147 207 147;
#P connect 22 0 10 1;
#P connect 30 0 16 0;
#P lcolor 2;
#P connect 16 0 13 1;
#P fasten 3 0 20 0 29 212 289 212;
#P connect 20 0 14 0;
#P connect 26 0 25 0;
#P connect 25 0 30 0;
#P lcolor 2;
#P fasten 1 0 21 0 121 147 295 147;
#P connect 21 0 16 1;
#P connect 30 0 19 0;
#P lcolor 2;
#P connect 19 0 20 1;
#P fasten 28 0 25 1 401 62 370 62;
#P fasten 1 0 23 0 121 147 379 147;
#P connect 23 0 19 1;
#P pop;

——————–

save the parent patch as whatever:

max v2;
#N vpatcher 474 96 775 524;
#P window setfont Geneva 9.;
#P window linecount 1;
#N vpatcher 779 96 998 272;
#P window setfont “Sans Serif” 9.;
#P window linecount 7;
#P hidden comment 186 108 169 131137545 For some reason pan4Sz is passing a signal of 0. when a given cycle~’s phase is set to 1. (that is , when the rotation divides any of the four quadrants into equal 45 degree angles. I’ve filtered out these 45 degree angles with the if object below.;
#P window linecount 1;
#P hidden newex 32 162 42 131137545 t l l;
#P hidden newex 13 210 29 131137545 gate;
#P hidden newex 64 183 224 131137545 if ( abs($i1) == abs($i2) ) && ($i1 != 0) then 0 else 1;
#P hidden newex 2 331 40 131137545 * 180.;
#P hidden newex 2 310 63 131137545 / 3.141593;
#P hidden flonum 2 352 53 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden comment 39 353 44 131137545 degrees;
#P hidden flonum 76 412 50 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 13 276 53 131137545 s distance;
#P hidden newex 76 431 49 131137545 s rotation;
#P hidden comment 128 413 194 131137545 scale between 0. and 1. for use with pan4Sz;
#P window linecount 3;
#P hidden comment 165 280 169 131137545 convert numbers so that upper right corner is 0. with numbers increasing to 6.283186 during clock-wise rotation;
#P window linecount 1;
#P hidden newex 76 389 54 131137545 / 6.283186;
#P hidden newex 148 319 96 131137545 expr -6.283186 + $f1;
#P hidden newex 76 298 82 131137545 split -6.283186 0.;
#P hidden newex 76 276 54 131137545 – 2.356194;
#P hidden newex 76 347 36 131137545 abs 0.;
#P hidden flonum 76 369 50 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 79 4 23 131137545 0 0;
#P hidden message 1 5 35 131137545 70 55;
#P user lcd 32 25 140 110 0 1 0 0 0;
#N vpatcher 335 423 1127 832;
#P button 407 262 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 407 283 354 131137545 linesegment 70 0 70 110 246 , linesegment 0 55 140 55 246 , pensize 10 10;
#P message 146 308 60 131137545 pensize 1 1;
#P button 146 200 15 0;
#P message 208 308 60 131137545 pensize 2 2;
#P button 208 200 15 0;
#P newex 475 308 84 131137545 prepend paintarc;
#P message 475 262 105 131137545 $1 $2 $3 $4 $5 $6 7;
#P message 234 200 172 131137545 $1 $2 70 $2 248 , $1 $2 $1 55 248;
#P button 317 262 15 0;
#P message 317 308 60 131137545 pensize 1 1;
#P newex 467 205 35 131137545 – 180;
#P newex 467 185 40 131137545 * 180.;
#P newex 467 165 63 131137545 / 3.141594;
#P newex 467 145 63 131137545 + 3.141594;
#P newex 382 225 115 131137545 pack 0 0 0 0 90 360 28;
#P newex 382 308 89 131137545 prepend framearc;
#P newex 321 99 29 131137545 – 55;
#P newex 286 99 29 131137545 – 70;
#P button 586 65 15 0;
#P message 586 308 32 131137545 clear;
#P newex 286 121 45 131137545 cartopol;
#P newex 391 154 30 131137545 + 55;
#P newex 356 154 30 131137545 + 70;
#P newex 321 154 32 131137545 !- 55;
#P newex 286 154 32 131137545 !- 70;
#P newex 286 176 153 131137545 pack 0 0 0 0 255;
#P newex 180 154 98 131137545 pack 0 0 70 55 212;
#P newex 180 225 100 131137545 prepend linesegment;
#P newex 51 65 39 131137545 unpack;
#P outlet 51 358 15 0;
#P inlet 51 31 15 0;
#P window linecount 1;
#P newex 138 154 27 131137545 + 3;
#P newex 109 154 27 131137545 + 3;
#P newex 80 154 27 131137545 – 3;
#P newex 51 154 27 131137545 – 3;
#P newex 51 176 127 131137545 pack 0 0 0 0 255;
#P newex 51 225 88 131137545 prepend paintoval;
#P newex 286 225 93 131137545 prepend frameoval;
#P connect 7 0 9 0;
#P connect 9 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 10 0 8 0;
#P connect 18 0 8 0;
#P connect 28 0 8 0;
#P connect 36 0 8 0;
#P connect 34 0 8 0;
#P connect 37 0 8 0;
#P connect 1 0 8 0;
#P connect 0 0 8 0;
#P connect 9 1 4 0;
#P connect 4 0 2 1;
#P connect 9 0 5 0;
#P connect 5 0 2 2;
#P connect 9 1 6 0;
#P connect 6 0 2 3;
#P connect 11 0 35 0;
#P connect 35 0 36 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 30 0 10 0;
#P connect 9 1 11 1;
#P connect 11 0 33 0;
#P connect 33 0 34 0;
#P connect 11 0 30 0;
#P connect 9 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 13 0;
#P connect 13 0 12 0;
#P connect 12 0 0 0;
#P connect 23 0 29 0;
#P connect 29 0 28 0;
#P connect 9 1 21 0;
#P connect 21 0 17 1;
#P connect 17 0 14 0;
#P connect 14 0 12 1;
#P connect 17 0 15 0;
#P connect 15 0 12 2;
#P connect 13 0 23 0;
#P connect 23 0 22 0;
#P connect 17 0 16 0;
#P connect 16 0 12 3;
#P connect 14 0 23 1;
#P connect 23 0 38 0;
#P connect 38 0 37 0;
#P connect 15 0 23 2;
#P connect 16 0 23 3;
#P connect 17 1 24 0;
#P connect 24 0 25 0;
#P connect 25 0 26 0;
#P connect 26 0 27 0;
#P connect 27 0 23 5;
#P connect 23 0 31 0;
#P connect 31 0 32 0;
#P connect 7 0 19 0;
#P connect 19 0 18 0;
#P pop;
#P hidden newobj 1 74 30 131137545 p lcd;
#P hidden flonum 76 257 49 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden flonum 13 257 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 10 59 410 359;
#P window setfont “Sans Serif” 9.;
#P newex 141 132 30 131137545 * -1;
#P newex 141 109 29 131137545 – 55;
#P newex 109 109 29 131137545 – 70;
#P newex 109 163 42 131137545 pack;
#P newex 109 84 42 131137545 unpack;
#P outlet 109 191 15 0;
#P inlet 109 58 15 0;
#P connect 0 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 1 0;
#P connect 2 1 5 0;
#P connect 5 0 6 0;
#P connect 6 0 3 1;
#P pop;
#P hidden newobj 32 140 44 131137545 p offset;
#P hidden comment 127 258 87 131137545 amplitude/angle;
#P hidden newex 13 234 73 131137545 cartopol;
#B color 5;
#P hidden newex 1 -22 45 131137545 loadbang;
#P hidden message 37 4 39 131137545 local 0;
#P hidden connect 1 0 9 0;
#P hidden connect 8 0 7 0;
#P hidden connect 9 0 7 0;
#P hidden connect 6 0 24 0;
#P hidden connect 24 0 25 0;
#P hidden connect 25 0 23 0;
#P hidden connect 26 0 27 0;
#P hidden connect 10 0 2 0;
#P hidden connect 27 0 2 0;
#P hidden connect 2 0 5 0;
#P hidden connect 5 0 20 0;
#P hidden connect 7 0 8 0;
#P hidden connect 0 0 8 0;
#P hidden connect 8 0 4 0;
#P hidden connect 4 0 28 0;
#P hidden connect 28 0 27 1;
#P hidden fasten 1 0 0 0 6 -4 42 -4;
#P hidden connect 28 1 26 0;
#P hidden connect 2 1 6 0;
#P hidden connect 6 0 13 0;
#P hidden connect 13 0 14 0;
#P hidden fasten 15 0 12 0 153 341 81 341;
#P hidden connect 14 0 12 0;
#P hidden connect 12 0 11 0;
#P hidden connect 11 0 16 0;
#P hidden connect 16 0 21 0;
#P hidden connect 21 0 19 0;
#P hidden fasten 1 0 10 0 6 -4 84 -4;
#P hidden connect 14 1 15 0;
#P pop 1;
#P hidden newobj 77 22 57 196617 p lcd;
#B color 12;
#N vpatcher 547 335 783 484;
#P outlet 16 96 15 0;
#P outlet 61 96 15 0;
#P outlet 112 96 15 0;
#P outlet 156 96 15 0;
#P window setfont Geneva 9.;
#P newex 78 31 48 196617 loadbang;
#P window linecount 1;
#P message 112 72 39 196617 set 40;
#P message 61 72 45 196617 set 127;
#P message 16 72 39 196617 set 70;
#P window linecount 0;
#P message 156 72 42 196617 set 0.5;
#P connect 4 0 1 0;
#P connect 1 0 8 0;
#P connect 4 0 2 0;
#P connect 2 0 7 0;
#P connect 4 0 3 0;
#P connect 3 0 6 0;
#P connect 4 0 0 0;
#P connect 0 0 5 0;
#P pop;
#P hidden newobj 151 22 61 196617 p loadbangs;
#B color 12;
#P hidden newex 21 22 55 196617 r distance;
#P comment 213 35 54 196617 min level;
#P comment 163 35 54 196617 max level;
#P comment 115 35 46 196617 max dist;
#P comment 67 35 46 196617 min dist;
#P flonum 217 50 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 168 50 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 119 50 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 70 50 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 18 36 47 196617 distance;
#P flonum 21 50 35 9 0 0 160 3 0 0 0 255 189 156 222 222 222 0 0 0;
#P hidden newex 21 74 258 196617 scale 0 70. 127 40;
#P user panel 63 34 205 36;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 92 182 43 196617 panning;
#N vpatcher 10 59 304 215;
#P window setfont Geneva 9.;
#P newex 11 79 57 196617 pack 0. 10;
#P inlet 11 28 15 0;
#P outlet 11 110 15 0;
#P newex 11 55 258 196617 if ($f1 > 0.02) && ($f1 < 0.98) then $f1 else out2 $f1;
#P connect 2 0 0 0;
#P connect 0 0 3 0;
#P fasten 0 1 1 0 264 103 16 103;
#P connect 3 0 1 0;
#P pop;
#P hidden newobj 95 177 41 196617 p ramp;
#B color 12;
#P user gain~ 207 319 29 23 158 0 1.071519 7.94321 10.;
#P user gain~ 151 319 29 23 158 0 1.071519 7.94321 10.;
#P user gain~ 95 319 29 23 158 0 1.071519 7.94321 10.;
#P user gain~ 39 319 29 23 158 0 1.071519 7.94321 10.;
#P hidden newex 95 151 54 196617 r rotation;
#P window linecount 4;
#P comment 29 87 245 196617 NOTE ON WIDTH ; 0.5 is the minimum recommended width ; (resulting in panning between two channels at time) ; For wider presence increase the value.;
#P user meter~ 242 255 255 313 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 187 255 200 313 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 130 255 143 313 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 73 255 86 313 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P flonum 207 205 35 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 95 200 32 196617 line~;
#P toggle 21 351 15 0;
#P flonum 151 205 35 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 39 379 180 196617 dac~ 1 2 3 4;
#P newex 39 230 179 196617 pan4Sz;
#P user gain~ 39 166 34 28 158 0 1.071519 7.94321 10.;
#P newex 39 140 61 196617 cycle~ 300;
#P window linecount 2;
#P comment 147 179 48 196617 width of sound;
#P comment 204 179 48 196617 minimum amp;
#P hidden connect 34 0 24 0;
#P hidden connect 24 0 23 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P hidden connect 23 0 16 0;
#P connect 4 0 16 0;
#P fasten 7 0 5 0 26 372 44 372;
#P connect 16 0 5 0;
#P hidden connect 26 0 23 1;
#P connect 4 0 10 0;
#P hidden connect 15 0 20 0;
#P hidden connect 20 0 8 0;
#P connect 8 0 4 1;
#P hidden connect 23 0 17 0;
#P connect 4 1 17 0;
#P connect 17 0 5 1;
#P hidden connect 35 0 27 0;
#P hidden connect 27 0 23 2;
#P connect 4 1 11 0;
#P hidden connect 35 3 6 0;
#P connect 6 0 4 2;
#P hidden connect 23 0 18 0;
#P connect 4 2 18 0;
#P connect 18 0 5 2;
#P hidden connect 35 1 28 0;
#P hidden connect 28 0 23 3;
#P connect 4 2 12 0;
#P connect 9 0 4 3;
#P hidden connect 23 0 19 0;
#P connect 4 3 19 0;
#P connect 19 0 5 3;
#P hidden connect 35 2 29 0;
#P hidden connect 29 0 23 4;
#P connect 4 3 13 0;
#P pop;

————————-
————————-

save this abstraction as pan8Sz.pat:

max v2;
#N vpatcher 213 244 1014 568;
#P window setfont “Fixedwidth Serif” 10.;
#P message 464 107 82 1441802 set pan8.aif;
#B color 1;
#P window setfont Geneva 9.;
#P window linecount 2;
#P comment 99 82 182 196617 panning from 0. – 1. essentially moves the audio from channel 1 to channel 8.;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 635 278 26 131137545 ch 8;
#P comment 548 278 26 131137545 ch 7;
#P comment 460 278 26 131137545 ch 6;
#P comment 373 278 26 131137545 ch 5;
#P comment 285 278 26 131137545 ch 4;
#P comment 198 278 26 131137545 ch 3;
#P newex 719 173 46 131137545 +~ 0.625;
#P newex 545 173 46 131137545 +~ 0.875;
#P newex 633 173 44 131137545 +~ 0.75;
#P newex 635 235 31 131137545 *~;
#P newex 656 204 73 131137545 cycle~ pan8.aif;
#N comlet LeftRear Signal Out;
#P outlet 549 260 15 0;
#P newex 570 204 73 131137545 cycle~ pan8.aif;
#N comlet RightRear Signal Out;
#P outlet 635 260 15 0;
#P newex 549 235 31 131137545 *~;
#P newex 459 173 31 131137545 +~ 0.;
#P newex 461 235 31 131137545 *~;
#P newex 482 204 73 131137545 cycle~ pan8.aif;
#N comlet Right Signal Out;
#P outlet 461 260 15 0;
#P newex 396 204 73 131137545 cycle~ pan8.aif;
#N comlet Left Signal Out;
#P outlet 375 260 15 0;
#P newex 375 235 31 131137545 *~;
#P window setfont Geneva 9.;
#P window linecount 2;
#P comment 540 31 93 196617 minimum amplitude (0.- 1.);
#N comlet minimum amplitude (0.- 1.);
#P inlet 539 59 15 0;
#P comment 442 31 95 196617 Width of waveform (0. – 1.);
#N comlet width of sound (0. – 1.);
#P inlet 464 59 15 0;
#P window linecount 1;
#N vpatcher 909 157 1169 516;
#P outlet 32 218 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 127 220 27 131137545 t b f;
#P newex 17 58 27 131137545 f;
#P window linecount 2;
#P comment 144 196 83 131137545 minimum amplitude (0. – 1.);
#P window linecount 1;
#P newex 34 28 70 131137545 loadmess 0.25;
#N comlet minimum amplitude (0.- 1.);
#P inlet 127 196 15 0;
#P newex 17 80 29 131137545 t b f;
#P inlet 17 28 15 0;
#P newex 131 104 41 131137545 * 512.;
#P newex 131 171 98 131137545 expr (512-$i1) + 1;
#P window linecount 0;
#P newex 131 127 98 131137545 expr (512-$i1) / 2;
#P newex 17 316 101 131137545 buffer~ pan8.aif 11.61;
#P newex 17 293 71 131137545 peek~ pan8.aif;
#N counter 0 0 512;
#X flags 0 0;
#P newobj 17 171 108 131137545 counter 0 0 512;
#P newex 17 128 107 131137545 t 513 b clear;
#P newex 17 149 40 131137545 Uzi 10;
#P newex 17 194 56 131137545 t i i;
#P newex 17 270 56 131137545 pack 0 0.;
#N vpatcher 337 144 748 548;
#N comlet minimum amplitude (0. – 1.);
#P inlet 227 33 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 227 94 67 131137545 expr 512 – $i1;
#P newex 227 68 87 131137545 scale 0. 1. 0 256;
#P newex 299 94 86 131137545 expr sqrt($i1/256.);
#P newex 22 333 47 131137545 * 0.001;
#P newex 208 196 27 131137545 0.;
#P newex 208 116 20 131137545 t b;
#P newex 22 94 196 131137545 if $i1>=$i2 && $i1< =$i3 then $i1 else out2 $i1;
#P inlet 47 33 15 0;
#P newex 22 165 136 131137545 scale 192 321 0 512;
#P inlet 72 33 15 0;
#P newex 72 211 36 131137545 – 256;
#P newex 72 276 27 131137545 -;
#P newex 72 253 27 131137545 256;
#P newex 72 232 27 131137545 t b i;
#P newex 22 189 60 131137545 split 0 256;
#P newex 22 309 125 131137545 expr (sqrt($i1/256.)) * 1000.;
#P outlet 22 362 15 0;
#P inlet 22 33 15 0;
#P comment 244 33 136 131137545 minimum amplitude (0. – 1.);
#P connect 1 0 12 0;
#P connect 12 0 10 0;
#P connect 10 0 4 0;
#P connect 4 0 3 0;
#P fasten 7 0 3 0 77 301 27 301;
#P connect 3 0 15 0;
#P connect 15 0 2 0;
#P fasten 14 0 2 0 213 356 27 356;
#P connect 11 0 10 1;
#P connect 9 0 10 2;
#P connect 4 1 8 0;
#P connect 8 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 5 1 7 1;
#P connect 17 0 10 3;
#P connect 11 0 12 1;
#P connect 18 0 10 4;
#P connect 9 0 12 2;
#P connect 12 1 13 0;
#P connect 13 0 14 0;
#P fasten 16 0 14 1 304 153 230 153;
#P connect 19 0 17 0;
#P connect 17 0 18 0;
#P fasten 17 0 16 0 232 89 304 89;
#P pop;
#P newobj 63 247 93 131137545 p pan_curve;
#B color 12;
#P connect 11 0 16 0;
#P connect 17 0 16 0;
#P connect 14 0 16 0;
#P connect 16 0 12 0;
#P connect 12 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 6 0;
#P connect 4 2 7 0;
#P lcolor 8;
#P connect 3 1 18 0;
#P connect 2 1 0 0;
#P connect 0 0 1 1;
#P connect 4 1 5 2;
#P connect 8 0 0 1;
#P connect 9 0 0 2;
#P connect 13 0 17 0;
#P fasten 12 1 10 0 41 100 136 100;
#P connect 10 0 8 0;
#P connect 8 0 9 0;
#P connect 17 1 0 3;
#P pop;
#P newobj 464 83 85 196617 patcher panCurve;
#B color 12;
#P window setfont “Sans Serif” 9.;
#P newex 372 173 46 131137545 +~ 0.125;
#P newex 198 173 46 131137545 +~ 0.375;
#P newex 286 173 41 131137545 +~ 0.25;
#P newex 288 235 31 131137545 *~;
#P newex 309 204 73 131137545 cycle~ pan8.aif;
#N comlet LeftRear Signal Out;
#P outlet 202 260 15 0;
#P newex 223 204 73 131137545 cycle~ pan8.aif;
#N comlet RightRear Signal Out;
#P outlet 288 260 15 0;
#P newex 202 235 31 131137545 *~;
#P newex 112 173 44 131137545 +~ 0.5;
#P newex 114 235 31 131137545 *~;
#P newex 135 204 73 131137545 cycle~ pan8.aif;
#N comlet Right Signal Out;
#P outlet 114 260 15 0;
#P comment 110 278 26 131137545 ch 2;
#P newex 49 204 73 131137545 cycle~ pan8.aif;
#P comment 23 278 26 131137545 ch 1;
#N comlet Left Signal Out;
#P outlet 28 260 15 0;
#P newex 28 235 31 131137545 *~;
#N comlet Signal In;
#P inlet 28 129 15 0;
#P comment 53 129 42 131137545 Signal In;
#N comlet (SIgnal) Quad Pan (0. – 1.);
#P inlet 112 129 15 0;
#P comment 128 129 129 131137545 (SIgnal) Quad Pan (0. – 1.);
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 50 0 7 0;
#P lcolor 2;
#P connect 7 0 4 1;
#P connect 1 0 12 0;
#P connect 12 0 7 1;
#P fasten 3 0 11 0 33 228 119 228;
#P connect 11 0 9 0;
#P connect 50 0 10 0;
#P lcolor 2;
#P connect 10 0 11 1;
#P fasten 1 0 20 0 117 158 203 158;
#P connect 20 0 10 1;
#P fasten 3 0 13 0 33 228 207 228;
#P connect 13 0 16 0;
#P connect 50 0 15 0;
#P lcolor 2;
#P connect 15 0 13 1;
#P fasten 1 0 19 0 117 158 291 158;
#P connect 19 0 15 1;
#P fasten 3 0 18 0 33 228 293 228;
#P connect 18 0 14 0;
#P connect 50 0 17 0;
#P lcolor 2;
#P connect 17 0 18 1;
#P fasten 1 0 21 0 117 158 377 158;
#P connect 21 0 17 1;
#P fasten 3 0 27 0 33 228 380 228;
#P connect 27 0 28 0;
#P connect 50 0 29 0;
#P lcolor 2;
#P connect 29 0 27 1;
#P fasten 1 0 33 0 117 158 464 158;
#P connect 33 0 29 1;
#P fasten 3 0 32 0 33 228 466 228;
#P connect 32 0 30 0;
#P connect 23 0 22 0;
#P connect 22 0 50 0;
#P lcolor 2;
#P connect 50 0 31 0;
#P lcolor 2;
#P connect 31 0 32 1;
#P connect 25 0 22 1;
#P fasten 1 0 41 0 117 158 550 158;
#P connect 41 0 31 1;
#P fasten 3 0 34 0 33 228 554 228;
#P connect 34 0 37 0;
#P connect 50 0 36 0;
#P lcolor 2;
#P connect 36 0 34 1;
#P fasten 1 0 40 0 117 158 638 158;
#P connect 40 0 36 1;
#P fasten 3 0 39 0 33 228 640 228;
#P connect 39 0 35 0;
#P connect 50 0 38 0;
#P lcolor 2;
#P connect 38 0 39 1;
#P fasten 1 0 42 0 117 158 724 158;
#P connect 42 0 38 1;
#P pop;

—————–

save the parent patch as whatever:

max v2;
#N vpatcher 79 95 468 512;
#P window setfont Geneva 9.;
#N vpatcher 547 335 783 484;
#P outlet 16 96 15 0;
#P outlet 61 96 15 0;
#P outlet 112 96 15 0;
#P outlet 156 96 15 0;
#P window setfont Geneva 9.;
#P newex 78 31 48 196617 loadbang;
#P window linecount 1;
#P message 112 72 39 196617 set 40;
#P message 61 72 45 196617 set 127;
#P message 16 72 39 196617 set 70;
#P window linecount 0;
#P message 156 72 48 196617 set 0.25;
#P connect 4 0 1 0;
#P connect 1 0 8 0;
#P connect 4 0 2 0;
#P connect 2 0 7 0;
#P connect 4 0 3 0;
#P connect 3 0 6 0;
#P connect 4 0 0 0;
#P connect 0 0 5 0;
#P pop;
#P hidden newobj 195 21 61 196617 p loadbangs;
#B color 12;
#N vpatcher 476 96 695 272;
#P window setfont “Sans Serif” 9.;
#P window linecount 6;
#P hidden comment 182 115 204 131137545 For some reason pan4Sz is passing a signal of 0. when a given cycle~’s phase is set to 1. (that is , when the rotation divides any of the four quadrants into equal 45 degree angles or is aligned with one of the axes). I’ve filtered out these angles with the if object below.;
#P window linecount 1;
#P hidden newex 32 162 42 131137545 t l l;
#P hidden newex 13 219 29 131137545 gate;
#P window linecount 2;
#P hidden newex 64 183 213 131137545 if ((abs($i1) == abs($i2)) && ($i1 != 0)) || ($i1 == 0 && $i2 != 0) || ($i1 !=0 && $i2 == 0) then 0 else 1;
#P hidden flonum 76 421 50 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P hidden newex 13 285 53 131137545 s distance;
#P hidden newex 76 440 49 131137545 s rotation;
#P hidden comment 128 422 194 131137545 scale between 0. and 1. for use with pan8Sz;
#P window linecount 3;
#P hidden comment 165 289 169 131137545 convert numbers so that upper left corner is 0. with numbers increasing to 6.283186 during clock-wise rotation;
#P window linecount 1;
#P hidden newex 76 398 54 131137545 / 6.283186;
#P hidden newex 148 328 96 131137545 expr -6.283186 + $f1;
#P hidden newex 76 307 82 131137545 split -6.283186 0.;
#P hidden newex 76 285 54 131137545 – 2.356194;
#P hidden newex 76 356 36 131137545 abs 0.;
#P hidden flonum 76 378 50 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 79 4 23 131137545 0 0;
#P hidden message 1 5 35 131137545 70 55;
#P user lcd 32 25 140 110 0 1 0 0 0;
#N vpatcher 335 423 1127 832;
#P button 407 262 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 407 283 354 131137545 linesegment 70 0 70 110 246 , linesegment 0 55 140 55 246 , pensize 10 10;
#P message 146 308 60 131137545 pensize 1 1;
#P button 146 200 15 0;
#P message 208 308 60 131137545 pensize 2 2;
#P button 208 200 15 0;
#P newex 475 308 84 131137545 prepend paintarc;
#P message 475 262 105 131137545 $1 $2 $3 $4 $5 $6 7;
#P message 234 200 172 131137545 $1 $2 70 $2 248 , $1 $2 $1 55 248;
#P button 317 262 15 0;
#P message 317 308 60 131137545 pensize 1 1;
#P newex 467 205 35 131137545 – 180;
#P newex 467 185 40 131137545 * 180.;
#P newex 467 165 63 131137545 / 3.141594;
#P newex 467 145 63 131137545 + 3.141594;
#P newex 382 225 115 131137545 pack 0 0 0 0 90 360 28;
#P newex 382 308 89 131137545 prepend framearc;
#P newex 321 99 29 131137545 – 55;
#P newex 286 99 29 131137545 – 70;
#P button 586 65 15 0;
#P message 586 308 32 131137545 clear;
#P newex 286 121 45 131137545 cartopol;
#P newex 391 154 30 131137545 + 55;
#P newex 356 154 30 131137545 + 70;
#P newex 321 154 32 131137545 !- 55;
#P newex 286 154 32 131137545 !- 70;
#P newex 286 176 153 131137545 pack 0 0 0 0 255;
#P newex 180 154 98 131137545 pack 0 0 70 55 212;
#P newex 180 225 100 131137545 prepend linesegment;
#P newex 51 65 39 131137545 unpack;
#P outlet 51 358 15 0;
#P inlet 51 31 15 0;
#P window linecount 1;
#P newex 138 154 27 131137545 + 3;
#P newex 109 154 27 131137545 + 3;
#P newex 80 154 27 131137545 – 3;
#P newex 51 154 27 131137545 – 3;
#P newex 51 176 127 131137545 pack 0 0 0 0 255;
#P newex 51 225 88 131137545 prepend paintoval;
#P newex 286 225 93 131137545 prepend frameoval;
#P connect 7 0 9 0;
#P connect 9 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 10 0 8 0;
#P connect 18 0 8 0;
#P connect 28 0 8 0;
#P connect 36 0 8 0;
#P connect 34 0 8 0;
#P connect 37 0 8 0;
#P connect 1 0 8 0;
#P connect 0 0 8 0;
#P connect 9 1 4 0;
#P connect 4 0 2 1;
#P connect 9 0 5 0;
#P connect 5 0 2 2;
#P connect 9 1 6 0;
#P connect 6 0 2 3;
#P connect 11 0 35 0;
#P connect 35 0 36 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 30 0 10 0;
#P connect 9 1 11 1;
#P connect 11 0 33 0;
#P connect 33 0 34 0;
#P connect 11 0 30 0;
#P connect 9 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 13 0;
#P connect 13 0 12 0;
#P connect 12 0 0 0;
#P connect 23 0 29 0;
#P connect 29 0 28 0;
#P connect 9 1 21 0;
#P connect 21 0 17 1;
#P connect 17 0 14 0;
#P connect 14 0 12 1;
#P connect 17 0 15 0;
#P connect 15 0 12 2;
#P connect 13 0 23 0;
#P connect 23 0 22 0;
#P connect 17 0 16 0;
#P connect 16 0 12 3;
#P connect 14 0 23 1;
#P connect 23 0 38 0;
#P connect 38 0 37 0;
#P connect 15 0 23 2;
#P connect 16 0 23 3;
#P connect 17 1 24 0;
#P connect 24 0 25 0;
#P connect 25 0 26 0;
#P connect 26 0 27 0;
#P connect 27 0 23 5;
#P connect 23 0 31 0;
#P connect 31 0 32 0;
#P connect 7 0 19 0;
#P connect 19 0 18 0;
#P pop;
#P hidden newobj 1 74 30 131137545 p lcd;
#P hidden flonum 76 266 49 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden flonum 13 266 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 10 59 410 359;
#P window setfont “Sans Serif” 9.;
#P newex 141 132 30 131137545 * -1;
#P newex 141 109 29 131137545 – 55;
#P newex 109 109 29 131137545 – 70;
#P newex 109 163 42 131137545 pack;
#P newex 109 84 42 131137545 unpack;
#P outlet 109 191 15 0;
#P inlet 109 58 15 0;
#P connect 0 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 1 0;
#P connect 2 1 5 0;
#P connect 5 0 6 0;
#P connect 6 0 3 1;
#P pop;
#P hidden newobj 32 140 44 131137545 p offset;
#P hidden comment 127 267 87 131137545 amplitude/angle;
#P hidden newex 13 243 73 131137545 cartopol;
#B color 5;
#P hidden newex 1 -22 45 131137545 loadbang;
#P hidden message 37 4 39 131137545 local 0;
#P hidden connect 1 0 9 0;
#P hidden connect 8 0 7 0;
#P hidden connect 9 0 7 0;
#P hidden connect 22 0 23 0;
#P hidden connect 10 0 2 0;
#P hidden connect 23 0 2 0;
#P hidden connect 2 0 5 0;
#P hidden connect 5 0 20 0;
#P hidden connect 7 0 8 0;
#P hidden connect 0 0 8 0;
#P hidden connect 8 0 4 0;
#P hidden connect 4 0 24 0;
#P hidden connect 24 0 23 1;
#P hidden fasten 1 0 0 0 6 -4 42 -4;
#P hidden connect 24 1 22 0;
#P hidden connect 2 1 6 0;
#P hidden connect 6 0 13 0;
#P hidden connect 13 0 14 0;
#P hidden fasten 15 0 12 0 153 350 81 350;
#P hidden connect 14 0 12 0;
#P hidden connect 12 0 11 0;
#P hidden connect 11 0 16 0;
#P hidden connect 16 0 21 0;
#P hidden connect 21 0 19 0;
#P hidden fasten 1 0 10 0 6 -4 84 -4;
#P hidden connect 14 1 15 0;
#P pop 1;
#P hidden newobj 121 21 57 196617 p lcd;
#B color 12;
#P hidden newex 65 21 55 196617 r distance;
#P comment 257 34 54 196617 min level;
#P comment 207 34 54 196617 max level;
#P comment 159 34 46 196617 max dist;
#P comment 111 34 46 196617 min dist;
#P flonum 261 49 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 212 49 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 163 49 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 114 49 35 9 0. 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 62 35 47 196617 distance;
#P flonum 65 49 35 9 0 0 160 3 0 0 0 255 189 156 222 222 222 0 0 0;
#P hidden newex 65 73 258 196617 scale 0 70. 127 40;
#P user gain~ 302 286 25 38 158 0 1.071519 7.94321 10.;
#P user gain~ 265 286 25 38 158 0 1.071519 7.94321 10.;
#P user gain~ 228 286 25 38 158 0 1.071519 7.94321 10.;
#P user gain~ 191 286 25 38 158 0 1.071519 7.94321 10.;
#P user gain~ 154 286 25 38 158 0 1.071519 7.94321 10.;
#P user gain~ 117 286 25 38 158 0 1.071519 7.94321 10.;
#P user gain~ 80 286 25 38 158 0 1.071519 7.94321 10.;
#P user gain~ 43 286 25 38 158 0 1.071519 7.94321 10.;
#N vpatcher 10 59 304 215;
#P window setfont Geneva 9.;
#P newex 11 79 57 196617 pack 0. 10;
#P inlet 11 28 15 0;
#P outlet 11 110 15 0;
#P newex 11 55 258 196617 if ($f1 > 0.02) && ($f1 < 0.98) then $f1 else out2 $f1;
#P connect 2 0 0 0;
#P connect 0 0 3 0;
#P fasten 0 1 1 0 264 103 16 103;
#P connect 3 0 1 0;
#P pop;
#P hidden newobj 130 141 41 196617 p ramp;
#B color 12;
#P hidden newex 130 115 54 196617 r rotation;
#P newex 130 164 32 196617 line~;
#P user meter~ 320 221 333 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 282 221 295 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 245 221 258 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 208 221 221 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 171 221 184 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 132 221 145 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 93 221 106 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 54 221 67 279 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P flonum 304 165 35 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 22 334 15 0;
#P flonum 217 165 49 9 0. 1. 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 43 361 269 196617 dac~ 1 2 3 4 5 6 7 8;
#P newex 43 190 271 196617 pan8Sz;
#P user gain~ 43 130 34 28 158 0 1.071519 7.94321 10.;
#P newex 43 105 61 196617 cycle~ 300;
#P window linecount 4;
#P comment 117 91 245 196617 NOTE ON WIDTH ; 0.25 is the minimum recommended width ; (resulting in panning between two channels at time) ; For wider presence increase the value.;
#P window linecount 1;
#P comment 290 150 71 196617 minimum amp;
#P comment 205 150 75 196617 width of sound;
#P comment 127 146 43 196617 panning;
#P user panel 107 33 205 36;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P hidden connect 31 0 23 0;
#P connect 7 0 23 0;
#P connect 23 0 8 0;
#P fasten 10 0 8 0 27 355 48 355;
#P connect 7 0 12 0;
#P hidden connect 42 0 32 0;
#P hidden connect 32 0 31 0;
#P hidden connect 31 0 24 0;
#P connect 7 1 24 0;
#P connect 24 0 8 1;
#P connect 7 1 13 0;
#P hidden connect 34 0 31 1;
#P hidden connect 31 0 25 0;
#P connect 7 2 25 0;
#P connect 25 0 8 2;
#P hidden connect 21 0 22 0;
#P hidden connect 22 0 20 0;
#P connect 20 0 7 1;
#P connect 7 2 14 0;
#P hidden connect 31 0 26 0;
#P connect 7 3 26 0;
#P connect 26 0 8 3;
#P hidden connect 44 0 35 0;
#P hidden connect 35 0 31 2;
#P connect 7 3 15 0;
#P hidden connect 31 0 27 0;
#P connect 7 4 27 0;
#P connect 27 0 8 4;
#P connect 7 4 16 0;
#P hidden connect 44 1 36 0;
#P hidden connect 36 0 31 3;
#P hidden connect 44 3 9 0;
#P connect 9 0 7 2;
#P hidden connect 31 0 28 0;
#P connect 7 5 28 0;
#P connect 28 0 8 5;
#P connect 7 5 17 0;
#P hidden connect 44 2 37 0;
#P hidden connect 37 0 31 4;
#P connect 7 6 29 0;
#P hidden connect 31 0 29 0;
#P connect 29 0 8 6;
#P connect 7 6 18 0;
#P connect 7 7 30 0;
#P hidden connect 31 0 30 0;
#P connect 30 0 8 7;
#P connect 11 0 7 3;
#P connect 7 7 19 0;
#P pop;

#111740
Sep 4, 2007 at 8:51pm

Samuel Freeman schrieb:
> save this as pan4Szx and use in place of pan4Sz:

doesn’t really explain the behaviour though it works. I guess cycle~ is
creating a local copy of the buffer when the audio chain is created.
Might be a design flaw and would eat uneccescaryly resources, but who
knows, it might be the only way to do it…

Only the code maintainers at C74 can tell…

Stefan


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

#111741

You must be logged in to reply to this topic.