1
#N canvas 83 89 793 595 12;
2
#N canvas 0 0 450 300 graph1 0;
3
#X array F05-signal 882 float 0;
4
#X coords 0 1 882 -1 200 130 1;
5
#X restore 554 218 graph;
6
#N canvas 0 0 450 300 graph1 0;
7
#X array F05-spectrum 256 float 0;
8
#X coords 0 0.51 255 -0.008 256 130 1;
9
#X restore 499 22 graph;
10
#X text 552 349 ---- 0.02 seconds ----;
11
#X text 507 563 updated for Pd version 0.37;
13
#X text 534 174 -- partial number --;
16
#X floatatom 51 61 0 0 100 0 - - -;
17
#N canvas 329 22 680 421 pulse-train 0;
20
#X obj 184 324 pack 0 50;
24
#X obj 184 276 moses 0;
26
#X obj 39 293 clip~ -0.5 0.5;
30
#X obj 39 389 outlet~;
32
#X text 53 5 This is a modified version of the pulse train generator
33
from two examples back.;
34
#X text 107 140 We have to add 1/2 and wrap so that the center of the
35
pulse comes at phase zero (previously it was 1/2 cycle out of phase).
36
This wasn't a problem before but now we have to be in phase with the
37
oscillator we're multpplying with.;
38
#X text 276 262 otherwise it's the same as before.;
57
#X restore 51 86 pd pulse-train;
58
#X text 83 61 <-- bandwidth;
60
#X text 113 123 <-- modulation frequency as;
61
#X text 152 137 multiple of fundamental;
62
#X obj 51 277 output~;
64
#N canvas 122 211 563 534 fft 0;
71
#X obj 332 109 block~ 4096 1;
72
#X obj 29 181 biquad~ 0 0 0 0 1;
73
#X text 93 93 Fourier series;
74
#X text 98 146 magnitude;
75
#X text 96 131 calculate;
76
#X text 21 3 This subpatch computes the spectrum of the incoming signal
77
with a (rectangular windowed) FFT. FFTs aren't properly introduced
79
#X text 83 61 signal to analyze;
80
#X text 193 164 delay two samples;
81
#X text 191 182 for better graphing;
82
#X obj 264 434 samplerate~;
83
#X obj 245 262 metro 500;
85
#X text 298 231 toggle to graph repeatedly;
86
#X text 262 212 bang to graph once;
87
#X obj 29 205 /~ 4096;
89
#X obj 264 483 s freq;
91
#X obj 19 295 tabwrite~ F05-signal;
92
#X obj 245 294 tabwrite~ F05-spectrum;
93
#X msg 224 321 \; pd dsp 1;
107
#X connect 15 0 23 0;
108
#X connect 16 0 24 0;
109
#X connect 16 0 25 0;
110
#X connect 17 0 16 0;
111
#X connect 17 0 26 0;
112
#X connect 20 0 25 0;
113
#X connect 21 0 15 0;
114
#X connect 23 0 22 0;
115
#X restore 98 245 pd fft;
116
#X obj 158 224 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
118
#X obj 158 245 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
120
#X text 179 244 <-- repeatedly;
121
#X text 180 224 <-- graph once;
131
#X text 122 185 modulating oscillator;
132
#X text 153 6 RING MODULATED PULSE TRAINS;
133
#X text 23 357 Now we take a pulse train and ring modulate it \, which
134
effectively aliases the spectrum so that it is centered at any desired
135
partial number. The "bandwidth" control still affects the shape of
136
the peak \, independently of where it is centered. This generates a
137
formant centered at the given partial.;
138
#X floatatom 73 123 0 0 100 0 - - -;
141
#X obj 107 157 r freq;
142
#X text 23 457 This patch is limited to making formants centered on
143
harmonics. The center frequency thus can't be moved smoothly up and
144
down at will (try shift-clicking on modulation frequency to make fractions).
145
Next we'll look at two techniques for sliding a formant frequency without
147
#X text 184 85 <-- pulse train;
148
#X text 220 101 generator from before;
151
#X connect 11 0 15 0;
152
#X connect 11 0 16 0;
153
#X connect 15 0 14 0;
154
#X connect 15 0 14 1;
155
#X connect 17 0 16 1;
156
#X connect 18 0 16 2;
157
#X connect 33 0 35 0;
158
#X connect 34 0 11 1;
159
#X connect 35 0 34 0;
160
#X connect 36 0 35 1;