aboutsummaryrefslogtreecommitdiff
path: root/desiredata/doc/3.audio.examples/E10.complex.FM.pd
diff options
context:
space:
mode:
Diffstat (limited to 'desiredata/doc/3.audio.examples/E10.complex.FM.pd')
-rw-r--r--desiredata/doc/3.audio.examples/E10.complex.FM.pd156
1 files changed, 156 insertions, 0 deletions
diff --git a/desiredata/doc/3.audio.examples/E10.complex.FM.pd b/desiredata/doc/3.audio.examples/E10.complex.FM.pd
new file mode 100644
index 00000000..094d68ed
--- /dev/null
+++ b/desiredata/doc/3.audio.examples/E10.complex.FM.pd
@@ -0,0 +1,156 @@
+#N canvas 165 123 695 505 12;
+#X obj 94 247 *~;
+#X obj 109 223 line~;
+#X obj 18 179 cos~;
+#X obj 18 154 +~;
+#X obj 109 200 pack 0 50;
+#X floatatom 109 152 0 0 300 0 - - -;
+#X obj 109 176 / 100;
+#X obj 18 129 phasor~;
+#X obj 20 340 output~;
+#X obj 19 309 hip~;
+#X text 437 472 updated for Pd version 0.37;
+#N canvas 62 299 558 609 fft 0;
+#X obj 19 61 inlet~;
+#X obj 208 212 inlet;
+#X obj 29 92 rfft~;
+#X obj 29 125 *~;
+#X obj 60 125 *~;
+#X obj 29 155 sqrt~;
+#X obj 332 109 block~ 4096 1;
+#X obj 29 181 biquad~ 0 0 0 0 1;
+#X text 93 93 Fourier series;
+#X text 98 146 magnitude;
+#X text 96 131 calculate;
+#X text 21 3 This subpatch computes the spectrum of the incoming signal
+with a (rectangular windowed) FFT. FFTs aren't properly introduced
+until much later.;
+#X text 83 61 signal to analyze;
+#X text 193 164 delay two samples;
+#X text 191 182 for better graphing;
+#X obj 16 425 samplerate~;
+#X obj 16 402 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X floatatom 16 472 5 0 0 0 - - -;
+#X obj 16 448 / 256;
+#X obj 16 378 loadbang;
+#X obj 72 494 s fundamental;
+#X text 14 319 At load time \, calculate a good choice of fundamental
+frequency for showing spectra: the 16th bin in a 4096-point spectrum
+\, so SR*16/4096 or SR/256.;
+#X obj 220 257 metro 500;
+#X obj 220 234 inlet;
+#X text 273 232 toggle to graph repeatedly;
+#X text 262 212 bang to graph once;
+#X obj 16 494 t b f;
+#X obj 19 295 tabwrite~ E10-signal;
+#X obj 208 295 tabwrite~ E10-spectrum;
+#X text 72 536 set carrier multiplier and modulation multipliers after
+fundamental;
+#X msg 16 516 \; cm 8 \; m1 2 \; m2 3;
+#X connect 0 0 2 0;
+#X connect 0 0 27 0;
+#X connect 1 0 27 0;
+#X connect 1 0 28 0;
+#X connect 2 0 3 0;
+#X connect 2 0 3 1;
+#X connect 2 1 4 0;
+#X connect 2 1 4 1;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 7 0;
+#X connect 7 0 28 0;
+#X connect 15 0 18 0;
+#X connect 16 0 15 0;
+#X connect 17 0 26 0;
+#X connect 18 0 17 0;
+#X connect 19 0 16 0;
+#X connect 22 0 27 0;
+#X connect 22 0 28 0;
+#X connect 23 0 22 0;
+#X connect 26 0 30 0;
+#X connect 26 1 20 0;
+#X restore 65 311 pd fft;
+#X obj 125 290 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 125 311 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X text 146 310 <-- repeatedly;
+#X text 147 290 <-- graph once;
+#N canvas 0 0 450 300 graph1 0;
+#X array E10-spectrum 259 float 0;
+#X coords 0 2100 258 -20 259 130 1;
+#X restore 396 122 graph;
+#X text 426 253 2;
+#X text 457 253 4;
+#X text 396 253 0;
+#X text 434 268 -- partial number --;
+#X text 490 104 SPECTRUM;
+#X text 656 238 0;
+#X text 657 120 0.5;
+#X obj 93 128 osc~;
+#X obj 267 79 r fundamental;
+#X text 489 253 6;
+#X text 522 253 8;
+#X text 550 253 10;
+#X text 582 253 12;
+#X text 614 253 14;
+#X floatatom 18 58 3 0 15 0 - - -;
+#X obj 18 105 *;
+#X obj 18 33 r cm;
+#X text 43 3 SPECTRUM OF COMPLEX PHASE MODULATION;
+#X text 23 73 carrier;
+#X obj 93 107 *;
+#X floatatom 93 60 3 0 15 0 - - -;
+#X text 99 74 mod 1;
+#X obj 93 35 r m1;
+#X text 138 154 index1;
+#X obj 197 249 *~;
+#X obj 212 225 line~;
+#X obj 212 202 pack 0 50;
+#X floatatom 212 154 0 0 300 0 - - -;
+#X obj 212 178 / 100;
+#X obj 196 130 osc~;
+#X obj 196 109 *;
+#X floatatom 196 62 3 0 15 0 - - -;
+#X text 202 76 mod 2;
+#X text 246 154 index2;
+#X obj 196 37 r m2;
+#X text 126 349 Now we introduce a second modulator oscillator. The
+carrier is on the 8th harmonic and the two modulators are at 2 and
+3 times the fundamental. When either index of modulation is zero \,
+changing the other index gives the familiar 2-operator FM result. But
+if index2 is nonzero (try around 10 \, for example) then sliding index1
+upward from 0 introduces sidebands around each of the sidebands.;
+#X connect 0 0 3 1;
+#X connect 1 0 0 1;
+#X connect 2 0 9 0;
+#X connect 2 0 11 0;
+#X connect 3 0 2 0;
+#X connect 4 0 1 0;
+#X connect 5 0 6 0;
+#X connect 6 0 4 0;
+#X connect 7 0 3 0;
+#X connect 9 0 8 0;
+#X connect 9 0 8 1;
+#X connect 12 0 11 1;
+#X connect 13 0 11 2;
+#X connect 24 0 0 0;
+#X connect 25 0 32 1;
+#X connect 25 0 36 1;
+#X connect 25 0 47 1;
+#X connect 31 0 32 0;
+#X connect 32 0 7 0;
+#X connect 33 0 31 0;
+#X connect 36 0 24 0;
+#X connect 37 0 36 0;
+#X connect 39 0 37 0;
+#X connect 41 0 3 1;
+#X connect 42 0 41 1;
+#X connect 43 0 42 0;
+#X connect 44 0 45 0;
+#X connect 45 0 43 0;
+#X connect 46 0 41 0;
+#X connect 47 0 46 0;
+#X connect 48 0 47 0;
+#X connect 51 0 48 0;