1
#N canvas 280 49 607 705 12;
2
#X text 336 665 updated for Pd version 0.39;
3
#X text 109 12 MORE ON MEASURING SPECTRA: HETERODYNING;
4
#X obj 46 289 phasor~ 100;
6
#X floatatom 99 320 5 0 999 0 - #0-freq -;
9
#X obj 148 370 +~ 0.25;
10
#X obj 47 547 snapshot~;
11
#N canvas 536 459 382 265 startup 0;
12
#X obj 22 24 loadbang;
13
#X obj 22 48 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
16
#X text 35 195 This subpatch loads initial;
17
#X text 31 219 values in number boxes.;
18
#X obj 223 132 metro 250;
19
#X obj 223 107 r \$0-metro;
20
#X obj 223 156 s \$0-tick;
21
#X msg 22 91 \; \$1-freq 100 \; \$1-lop 2 \; \$1-metro 1 \; pd dsp
28
#X restore 382 573 pd startup;
33
#X floatatom 153 435 3 0 100 0 - #0-lop -;
34
#X text 186 435 <-- responsiveness;
35
#X obj 136 547 snapshot~;
36
#X floatatom 47 575 5 0 0 0 - - -;
37
#X floatatom 136 575 5 0 0 0 - - -;
38
#X obj 161 496 r \$0-tick;
40
#X obj 47 643 expr sqrt($f1*$f1+$f2*$f2);
41
#X floatatom 47 669 5 0 0 0 - - -;
42
#X text 56 248 signal to;
43
#X text 58 268 analyze;
44
#X text 51 44 Another method for picking out the strengths of partials
45
in a sound is heterodyning. We guess the frequency of a partial (as
46
in the previous patch) but this time we multiply by a complex exponential
47
to frequency-shift the partial down to zero (DC).;
48
#X text 47 126 Then a low-pass filter (applied separately on the real
49
and imaginary parts) removes all but the DC component thus obtained.
50
The result is two audio signals (which we take snapshots of) holding
51
the real and imaginary parts of the complex amplitude of the partial
52
we want. Compared to the previous method \, this had the advantage
53
of reporting the phase of the partial as well as its frequency.;
54
#X text 240 358 modulate;
55
#X text 237 394 to DC;
56
#X text 154 321 <-- test frequency;
57
#X text 236 376 test frequency;
58
#X text 132 471 low-pass filter;
62
#X text 198 574 imaginary;
63
#X text 105 670 magnitude;