~ubuntu-branches/ubuntu/precise/puredata/precise

« back to all changes in this revision

Viewing changes to doc/3.audio.examples/H08.heterodyning.pd

  • Committer: Bazaar Package Importer
  • Author(s): Paul Brossier
  • Date: 2009-12-22 21:29:31 UTC
  • mfrom: (1.2.6 upstream) (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091222212931-nhwkzapjwsmjao1l
Tags: 0.42.5-3
* debian/control:
  - add community site to homepage field
  - improve long description
  - remove Replaces and Conflicts fields
  - add Suggests on pd-csound, pd-pdp, pd-zexy, pd-aubio
* debian/rules: add per-arch configuration flags
* debian/patches/02_kfreebsd.diff:
  - also define pd_tilde_dllextent on FreeBSD
  - fix typo (really closing #414414 this time)
  - also add hurd glue
* debian/patches/04_hurd.diff:
  - add hurd glue and s_midi_dummy.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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;
 
5
#X obj 99 343 phasor~;
 
6
#X floatatom 99 320 5 0 999 0 - #0-freq -;
 
7
#X obj 99 395 cos~;
 
8
#X obj 148 395 cos~;
 
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
 
14
-1;
 
15
#X obj 22 67 f \$0;
 
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
 
22
1;
 
23
#X connect 0 0 1 0;
 
24
#X connect 1 0 2 0;
 
25
#X connect 2 0 8 0;
 
26
#X connect 5 0 7 0;
 
27
#X connect 6 0 5 0;
 
28
#X restore 382 573 pd startup;
 
29
#X obj 47 446 *~;
 
30
#X obj 91 446 *~;
 
31
#X obj 48 471 lop~;
 
32
#X obj 92 471 lop~;
 
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;
 
39
#X obj 161 517 t b b;
 
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;
 
59
#X text 55 596 real;
 
60
#X text 59 611 part;
 
61
#X text 207 589 part;
 
62
#X text 198 574 imaginary;
 
63
#X text 105 670 magnitude;
 
64
#X connect 2 0 10 0;
 
65
#X connect 2 0 11 0;
 
66
#X connect 3 0 5 0;
 
67
#X connect 3 0 7 0;
 
68
#X connect 4 0 3 0;
 
69
#X connect 5 0 10 1;
 
70
#X connect 6 0 11 1;
 
71
#X connect 7 0 6 0;
 
72
#X connect 8 0 17 0;
 
73
#X connect 10 0 12 0;
 
74
#X connect 11 0 13 0;
 
75
#X connect 12 0 8 0;
 
76
#X connect 13 0 16 0;
 
77
#X connect 14 0 13 1;
 
78
#X connect 14 0 12 1;
 
79
#X connect 16 0 18 0;
 
80
#X connect 17 0 21 0;
 
81
#X connect 18 0 21 1;
 
82
#X connect 19 0 20 0;
 
83
#X connect 20 0 8 0;
 
84
#X connect 20 1 16 0;
 
85
#X connect 21 0 22 0;