#N canvas 370 23 611 541 10;
#X obj 220 181 line~;
#X obj 220 157 pack 0 50;
#X floatatom 220 56 0 0 0 0 - - -;
#X obj 70 118 *~;
#X obj 220 82 / 10;
#X obj 220 106 moses 0;
#X msg 220 130 0;
#X text 215 38 bandwidth;
#X obj 78 151 *~;
#X obj 18 151 sig~ 1;
#X obj 39 204 /~;
#X obj 54 178 +~;
#X text 111 151 X^2;
#X text 84 181 1+X^2;
#X text 71 206 1/(1+X^2);
#N canvas 0 0 450 300 (subpatch) 0;
#X array F04-signal 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 396 313 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array F04-spectrum 259 float 0;
#X coords 0 1.01 258 -0.008 256 200 1;
#X restore 307 48 graph;
#X text 426 446 ---- 0.02 seconds ----;
#X text 334 247 2;
#X text 365 247 4;
#X text 304 247 0;
#X text 372 262 -- partial number --;
#X text 397 247 6;
#X text 430 247 8;
#X text 458 247 10;
#X text 490 247 12;
#X text 522 247 14;
#X obj 40 287 output~;
#X obj 39 256 hip~;
#N canvas 122 211 558 609 fft 0;
#X obj 19 61 inlet~;
#X obj 224 210 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 264 434 samplerate~;
#X obj 251 255 metro 500;
#X obj 251 232 inlet;
#X text 301 232 toggle to graph repeatedly;
#X text 278 210 bang to graph once;
#X obj 29 205 /~ 4096;
#X obj 264 409 bang~;
#X obj 264 457 / 512;
#X obj 19 295 tabwrite~ F04-signal;
#X obj 250 291 tabwrite~ F04-spectrum;
#X obj 264 483 s freq/2;
#X msg 224 321 \; pd dsp 1;
#X connect 0 0 2 0;
#X connect 0 0 23 0;
#X connect 1 0 23 0;
#X connect 1 0 24 0;
#X connect 1 0 26 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 20 0;
#X connect 15 0 22 0;
#X connect 16 0 23 0;
#X connect 16 0 24 0;
#X connect 17 0 16 0;
#X connect 17 0 26 0;
#X connect 20 0 24 0;
#X connect 21 0 15 0;
#X connect 22 0 25 0;
#X restore 93 258 pd fft;
#X obj 153 237 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 153 258 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X text 174 257 <-- repeatedly;
#X text 175 237 <-- graph once;
#X obj 69 91 osc~;
#X text 19 464 NOTE: The PAF algorithm is protected by patents belonging
to IRCAM. Noncommercial use seems to be fine with them but contact
them first if you want to sell something using this.;
#X text 19 433 This is the form of pulse train used in the original
Phase Aligned Formant (PAF) algorithm.;
#X text 19 336 Here we use waveshaping to make another form of pulse
train. This one has a neat spectrum: the partials drop off exponentially
(with the "bandwidth" controlling the rate of dropoff.) In later patches
we'll use a wavetable to do the waveshaping but for simplicity \, it's
done algebraically here. The oscillator runs at half the fundamental
frequency. The symmetry of the waveshaping doubles the frequency of
the output.;
#X text 569 232 0;
#X text 566 45 1;
#X obj 69 66 r freq/2;
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header another_pulse_width_mod_algorithm
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X obj 1 519 cnv 15 445 20 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
#N canvas 44 246 494 284 META 0;
#X text 12 125 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 105 AUTHOR Miller Puckette;
#X text 12 85 LIBRARY PDDP;
#X text 12 5 GENRE tutorial;
#X text 12 45 LICENSE SIBSD;
#X text 12 145 HELP_PATCH_AUTHORS Updated for release 0.37. Jonathan
Wilkes revised the patch to conform to the PDDP template for Pd version
0.42.;
#X text 12 25 KEYWORDS signal;
#X text 12 65 DESCRIPTION another pulse width modulation algorithm
;
#X restore 392 521 pd META;
#N canvas 13 202 428 190 References 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 pulse width modulation- Related Help Documents;
#X text 19 37 links:;
#X restore 103 521 pd References;
#X obj 6 521 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#X connect 0 0 3 1;
#X connect 1 0 0 0;
#X connect 2 0 4 0;
#X connect 3 0 8 0;
#X connect 3 0 8 1;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 5 1 1 0;
#X connect 6 0 1 0;
#X connect 8 0 11 1;
#X connect 9 0 10 0;
#X connect 9 0 11 0;
#X connect 10 0 28 0;
#X connect 10 0 29 0;
#X connect 11 0 10 1;
#X connect 28 0 27 0;
#X connect 28 0 27 1;
#X connect 30 0 29 1;
#X connect 31 0 29 2;
#X connect 34 0 3 0;
#X connect 40 0 34 0;
