max v2; #N vpatcher 447 133 927 475; #P window setfont "Fixedwidth Serif" 10.; #P window linecount 1; #P message 388 73 20 1441802 45; #P user number~ 156 241 229 256 10 22 2 2 0. 0. 128 0. 125 0. 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 364 241 52 1310730 Right Gain; #P comment 229 241 45 1310730 Left Gain; #P window setfont "Fixedwidth Serif" 10.; #P user number~ 291 241 364 256 10 22 2 2 0. 0. 128 0. 125 0. 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 12 239 27 1441802 *~; #P newex 110 187 32 1441802 == 0; #P newex 110 208 43 1441802 sig~ 1; #P window setfont Times 10.; #P comment 423 159 35 1310730 degrees; #P window setfont "Fixedwidth Serif" 10.; #P newex 93 239 27 1441802 *~; #P flonum 120 117 35 10 0. 1. 3 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 114 99 47 1310730 Amplitude; #P window setfont "Fixedwidth Serif" 10.; #P newex 12 141 118 1441802 *~; #P window setfont Times 10.; #P comment 27 99 62 1310730 Chirp On/Off; #P comment 3 297 62 1310730 Audio On/Off; #P toggle 12 98 15 0; #P window setfont "Fixedwidth Serif" 10.; #N vpatcher 92 111 304 380; #P window setfont "Fixedwidth Serif" 10.; #P newex 77 22 43 1441802 begin~; #P newex 77 48 50 1441802 sig~ 2.; #P window setfont Times 10.; #P comment 15 161 59 1310730 (1/0) On/Off; #N comlet (1/0) on/off; #P inlet 36 175 15 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 77 173 43 1441802 cycle~; #P newex 77 73 50 1441802 phasor~; #P newex 125 123 62 1441802 sig~ 200.; #P newex 77 123 44 1441802 +~ 10.; #P newex 77 148 58 1441802 *~; #P newex 77 98 44 1441802 *~ -9.; #N comlet (signal) chirp; #P outlet 36 222 15 0; #P window setfont Times 10.; #P comment 51 222 68 1310730 annoying chirp; #P window setfont "Fixedwidth Serif" 10.; #P newex 36 196 51 1441802 gate~; #P connect 9 0 0 0; #P connect 0 0 2 0; #P connect 12 0 11 0; #P connect 11 0 7 0; #P connect 7 0 3 0; #P connect 3 0 5 0; #P connect 5 0 4 0; #P connect 4 0 8 0; #P connect 8 0 0 1; #P fasten 12 0 6 0 82 43 130 43; #P connect 6 0 4 1; #P pop; #P newobj 12 116 103 1441802 p "sound source"; #P user umenu 177 29 188 1441833 1 64 45 0; #X add Panning Off; #X add Simple Linear Crossfade; #X add Equal Distance Crossfade; #X add Speaker-to-Speaker Crossfade; #P newex 177 91 84 1441802 gate 3; #P newex 291 208 73 1441802 selector~ 3; #P newex 156 208 73 1441802 selector~ 3; #P newex 251 48 68 1441802 ctlin a 10; #P window setfont Times 10.; #P comment 376 145 67 1310730 Speaker Angle; #P window setfont "Fixedwidth Serif" 10.; #P number 388 159 35 10 15 75 3 22 0 0 0 221 221 221 222 222 222 0 0 0; #N vpatcher 12 41 527 467; #P window setfont Times 10.; #P comment 163 346 278 1310730 Crossfade simulating the source moving in a straight line from speaker to speaker (which means it would be closer to the listener when it is in the center than when it is at one extreme or the other).; #P comment 58 386 36 1310730 R Gain; #P window setfont "Fixedwidth Serif" 10.; #P message 65 327 38 1441802 \$1 20; #P newex 65 346 55 1441802 line~ 1.; #N comlet (signal) right channel gain; #P outlet 65 371 15 0; #N comlet (signal) left channel gain; #P outlet 7 371 15 0; #P newex 7 346 55 1441802 line~ 1.; #P message 7 327 38 1441802 \$1 20; #P window setfont Times 10.; #P comment 207 21 112 1310730 Speaker Angle (in degrees); #N comlet (int) speaker angle; #P inlet 192 21 15 0; #P window setfont "Fixedwidth Serif" 10.; #P flonum 192 60 62 10 0 0 128 22 0 0 0 221 221 221 222 222 222 0 0 0; #N comlet (int) MIDI panning; #P inlet 65 39 15 0; #P window setfont Times 10.; #P comment 254 60 69 1310730 Speaker Angle; #P window setfont "Fixedwidth Serif" 10.; #P newex 192 39 43 1441802 / 360.; #P newex 192 82 140 1441802 expr 1/cos(6.2832*$f1); #P flonum 192 103 62 10 0 0 128 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 254 103 76 1310730 Speaker Distance; #P window setfont "Fixedwidth Serif" 10.; #P newex 65 57 32 1441802 - 64; #P newex 65 78 73 1441802 split -64 0; #P newex 65 196 128 1441802 expr sqrt($f1*$f1+1); #P newex 65 99 38 1441802 / 64.; #P newex 128 99 38 1441802 / 63.; #P window setfont Times 10.; #P comment 127 217 76 1310730 Source Distance; #P window setfont "Fixedwidth Serif" 10.; #P flonum 65 217 62 10 0 0 128 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 172 125 128 1441802 expr tan(6.2832*$f1); #P flonum 172 146 61 10 0 0 128 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 233 146 85 1310730 Speaker Offset L-R; #P window setfont "Fixedwidth Serif" 10.; #P newex 74 128 38 1441802 t b f; #P newex 65 153 47 1441802 * 1.; #P window setfont Times 10.; #P comment 80 39 67 1310730 MIDI Panning; #P comment 126 174 79 1310730 Source Offset L-R; #P window setfont "Fixedwidth Serif" 10.; #P flonum 65 174 61 10 0 0 128 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 268 217 76 1310730 Source Angle; #P window setfont "Fixedwidth Serif" 10.; #P flonum 206 217 62 10 0 0 128 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 206 196 134 1441802 expr atan($f1)/6.2832; #P newex 65 239 434 1441802 expr cos(($f2+$f4)*6.2832)*$f3/$f1*2/($f3+1); #P newex 65 285 434 1441802 expr cos(($f2-$f4)*6.2832)*$f3/$f1*2/($f3+1); #P window setfont Times 10.; #P comment 0 386 36 1310730 L Gain; #P window setfont "Fixedwidth Serif" 10.; #P newex 65 306 173 1441802 if $f1 > 0. then $f1 else 0.; #P newex 65 260 173 1441802 if $f1 > 0. then $f1 else 0.; #P fasten 0 0 32 0 70 281 12 281; #P connect 32 0 33 0; #P connect 33 0 34 0; #P connect 28 0 22 0; #P connect 22 0 21 0; #P connect 21 0 19 0; #P fasten 12 0 11 0 79 149 70 149; #P fasten 18 0 11 0 133 120 70 120; #P connect 19 0 11 0; #P connect 11 0 8 0; #P connect 8 0 20 0; #P connect 20 0 16 0; #P connect 16 0 4 0; #P connect 4 0 0 0; #P connect 16 0 3 0; #P connect 3 0 1 0; #P connect 1 0 37 0; #P connect 37 0 36 0; #P connect 36 0 35 0; #P fasten 14 0 12 0 177 164 116 164 116 124 79 124; #P connect 12 1 11 1; #P connect 21 1 18 0; #P fasten 29 0 15 0 197 78 177 78; #P connect 15 0 14 0; #P connect 30 0 26 0; #P connect 26 0 29 0; #P connect 29 0 25 0; #P connect 25 0 24 0; #P fasten 8 0 5 0 70 192 211 192; #P connect 5 0 6 0; #P connect 6 0 4 1; #P connect 6 0 3 1; #P fasten 24 0 4 2 197 121 352 121; #P fasten 24 0 3 2 197 121 352 121; #P fasten 29 0 4 3 197 78 493 78; #P fasten 29 0 3 3 197 78 493 78; #P pop; #P newobj 207 177 191 1441802 p "speaker-to-speaker xfade"; #N vpatcher 152 77 450 348; #P window setfont Times 10.; #P comment 177 140 103 1310730 Crossfade in which the intensity of the combined channels (and thus the impression of distance from the sound source) is kept constant \, as if the sound were travelling on an arc with the listener at the center.; #P comment 82 230 37 1310730 R Gain; #P comment 13 230 37 1310730 L Gain; #N comlet (signal) right channel gain; #P outlet 91 215 15 0; #N comlet (signal) left channel gain; #P outlet 21 215 15 0; #N comlet (int) MIDI panning; #P inlet 54 38 15 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 21 190 43 1441802 cycle~; #P flonum 54 102 67 10 0 0 128 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 54 56 68 1441802 split 0 64; #P newex 54 139 74 1441802 line~ 0.125; #P message 54 120 38 1441802 \$1 20; #P newex 54 77 43 1441802 / 512.; #P newex 124 165 50 1441802 +~ 0.75; #P newex 91 190 43 1441802 cycle~; #P newex 112 77 152 1441802 expr ($i1-64)/504.+0.125; #P window setfont Times 10.; #P comment 69 38 67 1310730 MIDI Panning; #P connect 9 0 11 0; #P connect 10 0 7 0; #P connect 7 0 4 0; #P fasten 1 0 8 0 117 98 59 98; #P connect 4 0 8 0; #P connect 8 0 5 0; #P connect 5 0 6 0; #P connect 6 0 9 1; #P connect 2 0 12 0; #P connect 7 1 1 0; #P fasten 6 0 3 0 59 160 129 160; #P connect 3 0 2 1; #P pop; #P newobj 192 145 170 1441802 p "constant distance xfade"; #N vpatcher 175 50 422 290; #P window setfont Times 10.; #P comment 5 29 93 1310730 Simple linear crossfade with amplitude tracking the MIDI panning value.; #P comment 89 178 35 1310730 R Gain; #P comment 36 178 35 1310730 L Gain; #N comlet (signal) right channel gain; #P outlet 99 163 15 0; #N comlet (signal) left channel gain; #P outlet 45 163 15 0; #N comlet (int) MIDI panning; #P inlet 99 29 15 0; #P comment 114 29 67 1310730 MIDI Panning; #P window setfont "Fixedwidth Serif" 10.; #P newex 99 47 68 1441802 split 0 64; #P newex 99 68 43 1441802 / 128.; #P newex 157 68 44 1441802 / 127.; #P newex 99 112 62 1441802 line~ 0.5; #P message 99 93 38 1441802 \$1 20; #P newex 45 112 50 1441802 sig~ 1.; #P newex 45 138 27 1441802 -~; #P connect 1 0 0 0; #P connect 0 0 9 0; #P fasten 3 0 0 1 104 133 67 133; #P connect 8 0 6 0; #P connect 6 0 5 0; #P fasten 4 0 2 0 162 89 104 89; #P connect 5 0 2 0; #P connect 2 0 3 0; #P connect 3 0 10 0; #P connect 6 1 4 0; #P pop; #P newobj 177 112 145 1441802 p "simple linear xfade"; #P window setfont Times 10.; #P comment 286 73 67 1310730 MIDI Panning; #P window setfont "Fixedwidth Serif" 10.; #P newex 323 48 55 1441802 bendin a; #P number 251 73 35 10 0 127 3 22 0 0 0 221 221 221 222 222 222 0 0 0; #P user ezdac~ 12 264 56 297 0; #P window setfont Times 10.; #P comment 32 29 111 1310730 Three panning algorithms; #P window setfont "Fixedwidth Serif" 10.; #P newex 388 48 58 1441802 loadbang; #P message 360 73 20 1441802 64; #P connect 18 0 17 0; #P connect 17 0 21 0; #P connect 21 0 28 0; #P connect 28 0 3 0; #P fasten 26 0 28 1 115 229 34 229; #P fasten 13 0 28 1 161 229 34 229; #P fasten 24 0 3 1 98 260 51 260; #P fasten 21 0 24 0 17 162 98 162; #P fasten 16 0 27 0 182 48 161 48 161 183 115 183; #P connect 27 0 26 0; #P fasten 14 0 24 1 296 234 115 234; #P connect 26 0 24 1; #P connect 23 0 21 1; #P fasten 16 0 13 0 182 48 161 48; #P fasten 26 0 32 0 115 229 161 229; #P connect 13 0 32 0; #P connect 16 0 15 0; #P connect 15 0 7 0; #P connect 7 0 13 1; #P fasten 15 1 8 0 219 141 197 141; #P fasten 8 0 13 2 197 203 203 203; #P fasten 15 2 9 0 256 173 212 173; #P fasten 9 0 13 3 212 198 224 198; #P fasten 0 0 4 0 365 93 356 93 356 69 256 69; #P fasten 5 0 4 0 328 69 256 69; #P connect 12 0 4 0; #P connect 4 0 15 1; #P fasten 16 0 14 0 182 48 173 48 173 198 296 198; #P connect 14 0 29 0; #P fasten 26 0 29 0 115 234 296 234; #P connect 7 1 14 1; #P fasten 8 1 14 2 357 198 338 198; #P fasten 9 1 14 3 393 203 359 203; #P fasten 1 0 0 0 393 69 365 69; #P connect 1 0 33 0; #P connect 33 0 10 0; #P connect 10 0 9 1; #P pop;