-
Notifications
You must be signed in to change notification settings - Fork 1
/
dkcomppan~.pd
77 lines (77 loc) · 1.98 KB
/
dkcomppan~.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#N canvas 583 182 1285 635 12;
#X text 9 2 dkcomppan~;
#X text 9 22 -4.5 dB pan law;
#X text 4 64 center gain is 0.59;
#X text 5 91 per channel attenuation is -4.5 dB;
#X obj 368 99 inlet~;
#X obj 707 98 inlet;
#X obj 583 125 f \$1;
#X obj 389 376 cos~;
#X obj 613 372 cos~;
#X msg 646 275 \$1 5;
#X obj 649 191 + 1;
#X obj 646 306 line~;
#X obj 641 332 +~ 0.75;
#X obj 234 514 *~;
#X obj 550 92 loadbang;
#X obj 471 499 *~;
#X obj 205 585 outlet~;
#X obj 449 572 outlet~;
#X text 721 213 -1 1 to 0 2;
#X text 727 278 to 0 0.25;
#X text 723 301 (into cos~ is x*2pi = 0 to pi/2);
#X text 383 336 cos theta;
#X text 661 365 sin theta;
#X obj 648 160 clip -1 1;
#X obj 642 236 * 0.125;
#X text 626 494 L(theta) = sqrt((pi/2-theta)*(2/pi)*cos(theta));
#X text 625 519 R(theta) = sqrt(theta*(2/pi)*sin(theta));
#X text 621 572 basically we want the coeff to go from 1 to 0 on the
left;
#X text 620 597 and 0 to 1 on the right as in linear panning;
#X obj 447 277 line~;
#X obj 449 225 * 0.5;
#X obj 449 250 - 0.5;
#X obj 329 347 *~ -1;
#X obj 521 349 +~ 1;
#X text 566 354 0 to 1;
#X text 460 171 -1 \, 1 input;
#X text 465 192 to -1 0;
#X text 312 319 1 to 0;
#X obj 338 411 *~;
#X obj 278 461 q8_sqrt~;
#X obj 592 429 *~;
#X obj 592 454 q8_sqrt~;
#X text 18 172 args: panning (-1 to 1);
#X text 17 201 inlets:sig \, panning;
#X text 11 223 outlets: left sig \, right sig;
#X text 960 21 derek kwan;
#X text 965 45 pdkvabs;
#X text 966 69 gpl v 3;
#X connect 4 0 13 0;
#X connect 4 0 15 0;
#X connect 5 0 23 0;
#X connect 6 0 23 0;
#X connect 7 0 38 1;
#X connect 8 0 40 1;
#X connect 9 0 11 0;
#X connect 10 0 24 0;
#X connect 11 0 7 0;
#X connect 11 0 12 0;
#X connect 12 0 8 0;
#X connect 13 0 16 0;
#X connect 14 0 6 0;
#X connect 15 0 17 0;
#X connect 23 0 10 0;
#X connect 23 0 30 0;
#X connect 24 0 9 0;
#X connect 29 0 32 0;
#X connect 29 0 33 0;
#X connect 30 0 31 0;
#X connect 31 0 29 0;
#X connect 32 0 38 0;
#X connect 33 0 40 0;
#X connect 38 0 39 0;
#X connect 39 0 13 1;
#X connect 40 0 41 0;
#X connect 41 0 15 1;