Commit 52dca0f9 authored by Miller Puckette's avatar Miller Puckette
Browse files

set up git repository

parents
#N canvas 104 78 1119 674 12;
#N canvas 0 0 600 392 samples 0;
#N canvas 0 0 450 300 graph1 0;
#X array sample1 176403 float 0;
#X coords 0 1.02 176403 -1.02 200 130 1;
#X restore 262 41 graph;
#X text 282 385 ------ 4 seconds ------;
#N canvas 0 0 450 300 graph1 0;
#X array sample2 176403 float 0;
#X coords 0 1.02 176403 -1.02 200 130 1;
#X restore 262 226 graph;
#X restore 785 563 pd samples;
#N canvas 52 219 971 512 recorder 0;
#X obj 174 304 adc~ 1;
#X obj 174 332 hip~ 5;
#X obj 243 362 line~;
#X obj 174 361 *~;
#X msg 243 334 1;
#X obj 302 299 del 3990;
#X msg 279 334 0 10;
#X obj 174 412 tabwrite~ sample1;
#X msg 26 247 set \$1 \, bang;
#X msg 348 270 stop;
#X msg 302 270 bang;
#X obj 220 180 route record stop reload browse;
#X obj 411 288 loadbang;
#X obj 514 243 openpanel;
#X msg 514 215 bang;
#X text 556 214 <-- browse for samples;
#X text 482 339 v-- re-read original samples;
#X obj 411 425 soundfiler;
#X msg 411 367 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav
sample2;
#X msg 514 270 read \$1 sample1;
#X obj 514 297 soundfiler;
#X msg 220 41 record 1;
#X msg 220 97 stop;
#X msg 220 69 record 2;
#X msg 220 124 reload;
#X msg 220 152 browse;
#X text 218 19 record \, etc.;
#X obj 26 218 makefilename sample%d;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 2 0 3 1;
#X connect 3 0 7 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 2 0;
#X connect 8 0 7 0;
#X connect 9 0 5 0;
#X connect 10 0 5 0;
#X connect 11 0 10 0;
#X connect 11 0 4 0;
#X connect 11 0 27 0;
#X connect 11 1 6 0;
#X connect 11 1 9 0;
#X connect 11 2 18 0;
#X connect 11 3 14 0;
#X connect 12 0 18 0;
#X connect 13 0 19 0;
#X connect 14 0 13 0;
#X connect 18 0 17 0;
#X connect 19 0 20 0;
#X connect 21 0 11 0;
#X connect 22 0 11 0;
#X connect 23 0 11 0;
#X connect 24 0 11 0;
#X connect 25 0 11 0;
#X connect 27 0 8 0;
#X restore 785 586 pd recorder;
#X text 782 458 sample number;
#X obj 619 96 unpack 0 0 0 0 0 0 0;
#X obj 563 124 poly 8 1;
#X obj 654 270 route 1 2 3 4 5 6 7 8;
#X obj 558 487 output~;
#X obj 563 149 swap;
#X obj 563 196 route 0;
#X obj 563 173 pack;
#X obj 605 221 unpack;
#X obj 557 289 sampvoice2;
#X obj 563 221 pack;
#X text 933 411 amplitude;
#X text 932 435 pitch;
#X text 851 344 ARGUMENTS FOR:;
#X text 784 386 pitch;
#X text 784 410 amplitude;
#X text 784 434 duration;
#X text 13 4 POLY SAMPLER \, VERSION 2 FOR SEPARATE NOTE-ON/OFF MESSAGES
;
#X obj 619 71 r onoff;
#X text 932 368 ON/OFF TRANSITIONS:;
#X text 785 367 ENTIRE NOTES:;
#X text 932 390 tag;
#X text 782 485 sample onset;
#X text 782 511 rise time;
#X text 783 535 decay time;
#X text 929 460 (same other 4);
#X obj 836 159 f;
#X obj 872 159 + 1;
#X obj 836 185 mod 1e+06;
#X obj 654 245 pack 0 0 0 0 0 0 0;
#X obj 918 74 r note;
#X obj 918 100 unpack 0 0 0 0 0 0 0;
#X text 860 641 updated for Pd version 0.37;
#X obj 895 127 t b f;
#X obj 936 237 pack 0 0 0 0 0 0 0;
#X obj 889 285 s onoff;
#X obj 870 230 pipe;
#X obj 870 253 pack;
#X msg 103 528 \; onoff 1 90 60 1 0 0 100;
#X msg 323 528 \; onoff 1 0;
#X msg 104 570 \; onoff 2 90 48 1 0 0 100;
#X msg 324 570 \; onoff 2 0;
#X msg 104 627 \; note 51 90 1000 1 0 0 100;
#X obj 557 312 sampvoice2;
#X obj 557 336 sampvoice2;
#X obj 557 360 sampvoice2;
#X obj 557 383 sampvoice2;
#X obj 557 407 sampvoice2;
#X obj 557 430 sampvoice2;
#X obj 557 454 sampvoice2;
#X text 14 35 Here is a variation on the polyphonic sampler \, which
can take separate messages to start and stop notes (so that you can
attach it to a MIDI keyboard \, for example.) "Note" messages act as
before \, but in an intermediate step they are split onto note-on and
note-off messages \, sent to "onoff". You can alternatively send messages
straight to onoff if you don't know the duration in advance.;
#X text 12 150 Messages to "onoff" require a tag \, which is a number
shared between the note-on and note-off message so that we can track
down the voice to turn it off. If you're using MIDI input \, you can
just re-use the pitch as a tag.;
#X text 102 508 separate messages for not on and off:;
#X text 101 608 single messages to do both as before:;
#X text 10 221 Messages to "onoff" whose amplitude is zero are note-off
messages (the other parameters of note-off messages are ignored). The
"sampvoice2" abstraction is a modification of "sampvoice" which looks
at the amplitude field to decide whether to begin or end a note.;
#X text 10 301 To convert "note" messages to pairs of "onoff" messages
\, first a counter generates a tag. The the "pipe" object delays a
copy of the tag \, which the following "pack" object converts into
a note-off message (a pair of numbers \, the tag and a zero.);
#X text 9 382 Under "r onoff" \, the poly object allocates a voice
number \, putting it out paired with velocity. After swapping the two
and packing them into a single message \, the amplitude is checked
against zero by the "route 0" object \; if zero \, the "pack" confects
a 2-argument message (voice number and zero). Otherwise \, the "unpack"
retrieves the nonzero amplitude for a note-on message \, to which we
add all the other parameters and route to the appropriate voice.;
#X connect 3 0 4 0;
#X connect 3 1 31 1;
#X connect 3 1 4 1;
#X connect 3 2 31 2;
#X connect 3 3 31 3;
#X connect 3 4 31 4;
#X connect 3 5 31 5;
#X connect 3 6 31 6;
#X connect 4 0 7 0;
#X connect 4 2 7 1;
#X connect 5 0 11 1;
#X connect 5 1 45 1;
#X connect 5 2 46 1;
#X connect 5 3 47 1;
#X connect 5 4 48 1;
#X connect 5 5 49 1;
#X connect 5 6 50 1;
#X connect 5 7 51 1;
#X connect 7 0 9 0;
#X connect 7 1 9 1;
#X connect 8 0 12 0;
#X connect 8 1 10 0;
#X connect 9 0 8 0;
#X connect 10 1 31 0;
#X connect 11 0 45 0;
#X connect 12 0 5 0;
#X connect 20 0 3 0;
#X connect 28 0 29 0;
#X connect 29 0 30 0;
#X connect 30 0 28 1;
#X connect 30 0 38 0;
#X connect 30 0 36 0;
#X connect 31 0 5 0;
#X connect 32 0 33 0;
#X connect 33 0 35 0;
#X connect 33 1 36 1;
#X connect 33 2 38 1;
#X connect 33 3 36 3;
#X connect 33 4 36 4;
#X connect 33 5 36 5;
#X connect 33 6 36 6;
#X connect 35 0 28 0;
#X connect 35 1 36 2;
#X connect 36 0 37 0;
#X connect 38 0 39 0;
#X connect 39 0 37 0;
#X connect 45 0 46 0;
#X connect 46 0 47 0;
#X connect 47 0 48 0;
#X connect 48 0 49 0;
#X connect 49 0 50 0;
#X connect 50 0 51 0;
#X connect 51 0 6 0;
#X connect 51 0 6 1;
#N canvas 233 179 667 449 12;
#X obj 16 182 osc-voice amp1 pit1;
#X obj 16 206 osc-voice amp2 pit2;
#X obj 16 230 osc-voice amp3 pit3;
#X obj 16 254 osc-voice amp4 pit4;
#X obj 16 278 osc-voice amp5 pit5;
#X obj 16 302 osc-voice amp6 pit6;
#X obj 16 326 osc-voice amp7 pit7;
#X obj 16 350 osc-voice amp8 pit8;
#X obj 464 343 qlist;
#X msg 394 185 stop;
#X msg 524 300 read qlist.txt;
#X obj 524 255 loadbang;
#X text 258 164 start;
#X text 395 161 stop;
#X text 534 279 reread file;
#X msg 467 199 rewind;
#X msg 535 199 next;
#X msg 251 212 tempo 100 \, bang;
#X msg 250 188 tempo 1 \, bang;
#X text 82 11 USING QLIST TO SEQUENCE AN OSCILLATOR BANK;
#X text 479 178 single step;
#X obj 532 392 r #;
#X text 28 49 Here is an eight voice additive synthesis patch controlled
by a qlist. Open a text editor on the file \, "qlist.txt" \, to see
how the oscillators' amplitudes and frequencies are specified. The
abstraction \, "osc-voice" \, shows an effective way to make patches
react to qlists but also to mousing.;
#X text 234 391 this is where qlist comments go:;
#X obj 16 380 output~;
#X text 394 423 updatged for Pd version 0.39;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 24 0;
#X connect 7 0 24 1;
#X connect 9 0 8 0;
#X connect 10 0 8 0;
#X connect 11 0 10 0;
#X connect 15 0 8 0;
#X connect 16 0 8 0;
#X connect 17 0 8 0;
#X connect 18 0 8 0;
#N canvas 80 10 709 653 12;
#X obj 28 258 r trigger;
#X obj 28 454 *~;
#X obj 28 482 *~;
#X floatatom 63 304 3 0 100 0 - - -;
#X msg 460 493 \; trigger 0;
#X obj 28 281 unpack;
#X floatatom 28 304 1 0 100 0 - - -;
#X obj 27 533 +~ 0.3;
#X obj 27 559 cos~;
#X obj 27 507 osc~;
#X obj 63 323 mtof;
#X obj 63 345 sqrt;
#X obj 63 367 sqrt;
#X text 572 461 <-- octave up;
#X msg 460 416 \; trigger 1 60;
#X msg 460 453 \; trigger 1 72;
#X text 550 494 <-- release;
#X text 556 512 is optional;
#X obj 28 424 *~;
#X obj 237 404 +~ 1;
#N canvas 0 0 450 300 graph1 0;
#X array array62 131 float 1;
#A 0 0.970031 1 0.970031 0.881921 0.740952 0.555571 0.336891 0.0980184
-0.146729 -0.382682 -0.595698 -0.773009 -0.88 -0.9 -0.92 -0.92 -0.85773
-0.707109 -0.514106 -0.290288 -0.0490716 0.195086 0.427551 0.63439
0.803205 0.86 0.88 0.88 0.88 0.84 0.82 0.471402 0.242986 6.63397e-06
-0.242974 -0.471391 -0.671554 -0.831465 -0.941541 -0.995184 -0.989178
-0.923883 -0.803213 -0.68 -0.42 -0.24 0.1 0.4 0.6 0.7071 0.857723 0.956937
0.998795 0.980787 0.903994 0.773018 0.595708 0.382694 0.146742 -0.0980052
-0.336878 -0.55556 -0.7 -0.8 -0.88 -0.88 -0.88 -0.84 -0.82 -0.555582
-0.336903 -0.0980316 0.146716 0.38267 0.595687 0.773001 0.903983 0.980782
0.998796 0.956945 0.857737 0.707119 0.514117 0.290301 0.0490849 -0.195073
-0.427539 -0.63438 -0.803197 -0.923873 -0.989174 -0.995187 -0.94155
-0.83148 -0.671573 -0.471414 -0.242999 -1.99019e-05 0.242961 0.471379
0.671544 0.831458 0.88 0.9 0.9 0.88 0.803221 0.63441 0.08 -0.14 -0.28
-0.48 -0.64 -0.72 -0.857717 -0.956933 -0.998794 -0.98079 -0.904 -0.773026
-0.595719 -0.382706 -0.146755 0.097992 0.336866 0.555549 0.740934 0.881909
0.970025 1 0.970038;
#X coords 0 1 130 -1 200 100 1;
#X restore 246 508 graph;
#X obj 237 356 tabosc4~ array62;
#X floatatom 237 312 3 0 0 0 - - -;
#X obj 237 333 / 6;
#X obj 237 380 *~;
#X floatatom 391 333 3 0 0 0 - - -;
#X text 236 438 since we'll multiply \,;
#X text 235 453 vibrato output should;
#X text 235 470 be centered at 1 \, not 0;
#X text 273 384 multiply by vib depth;
#X obj 391 361 / 6923;
#X text 62 425 apply vibrato;
#X text 66 453 fourth;
#X text 69 469 power;
#X text 97 537 waveform;
#X text 96 517 simple;
#X text 457 354 4/(exp(log(2)/1200)-1);
#X text 461 335 conversion factor is;
#X text 384 295 vibrato depth;
#X text 383 312 in cents;
#X text 228 274 vibrato speed;
#X text 227 291 in Hertz;
#X obj 28 392 adsr 0 100 200 100 300;
#X obj 26 587 output~;
#X text 88 9 USING ADSRS FOR PORTAMENTO AND ADDING VIBRATO TOO;
#X text 43 30 Portamento can be treated as a special case of an ADSR
envelope \, with 100 percent sustain. Vibrato is properly computed
in units of pitch \, but it's also possible to do the job without having
to convert from pitch to frequency units at the audio rate. To do this
we just raise the "pitch" to the fourth power \, so that it acts pseudo-exponentially.
Rather than add vibrato to the ADSR output \, we multiply a signal
which controls relative frequency. The relative frequency change is
one plus an oscillator.;
#X text 439 626 updated for Pd version 0.39;
#X text 45 185 The table below holds 6 cycles of vibrato with small
variations to get a not-exactly-repeating vibrato. We thus have to
divide vibrato frequency by six. You can just use a sine or triangle
wave if you prefer.;
#X text 573 426 <-- middle C;
#X connect 0 0 5 0;
#X connect 1 0 2 0;
#X connect 1 0 2 1;
#X connect 2 0 9 0;
#X connect 3 0 10 0;
#X connect 5 0 6 0;
#X connect 5 1 3 0;
#X connect 6 0 42 0;
#X connect 7 0 8 0;
#X connect 8 0 43 0;
#X connect 8 0 43 1;
#X connect 9 0 7 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 12 0 42 1;
#X connect 18 0 1 0;
#X connect 18 0 1 1;
#X connect 19 0 18 1;
#X connect 21 0 24 0;
#X connect 22 0 23 0;
#X connect 23 0 21 0;
#X connect 24 0 19 0;
#X connect 25 0 30 0;
#X connect 30 0 24 1;
#X connect 42 0 18 0;
#N canvas 190 29 773 821 12;
#N canvas 0 0 450 300 graph1 0;
#X array E01-signal 882 float 0;
#X coords 0 5 882 -5 200 130 1;
#X restore 531 41 graph;
#X obj 40 304 hip~ 5;
#N canvas 0 0 450 300 graph1 0;
#X array E01-spectrum 128 float 0;
#X coords 0 4300 127 -40 257 130 1;
#X restore 485 226 graph;
#X text 134 243 <-- click to graph;
#N canvas 45 83 558 569 fft 0;
#X obj 19 62 inlet~;
#X obj 85 214 inlet;
#X obj 19 92 rfft~;
#X obj 19 125 *~;
#X obj 50 125 *~;
#X obj 19 155 sqrt~;
#X obj 85 248 tabwrite~ E01-spectrum;
#X obj 332 109 block~ 4096 1;
#X obj 19 181 biquad~ 0 0 0 0 1;
#X text 83 93 Fourier series;
#X text 88 146 magnitude;
#X text 86 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 62 signal to analyze;
#X text 182 166 delay two samples;
#X text 181 182 for better graphing;
#X obj 90 425 samplerate~;
#X obj 90 402 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X floatatom 90 472 5 0 0 0 - - -;
#X obj 90 448 / 256;
#X obj 90 378 loadbang;
#X floatatom 90 541 5 0 0 0 - - -;
#X obj 98 494 s fundamental;
#X obj 90 517 ftom;
#X text 146 540 <-just out of curiosity \, here's the pitch;
#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 text 135 216 "bang" into this inlet to graph it;
#X connect 0 0 2 0;
#X connect 1 0 6 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 8 0;
#X connect 8 0 6 0;
#X connect 16 0 19 0;
#X connect 17 0 16 0;
#X connect 18 0 22 0;
#X connect 18 0 23 0;
#X connect 19 0 18 0;
#X connect 20 0 17 0;
#X connect 23 0 21 0;
#X restore 51 279 pd fft;
#X text 531 173 ---- 0.02 seconds ----;
#X obj 111 244 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 40 332 output~;
#X obj 111 279 tabwrite~ E01-signal;
#X text 523 800 updated for Pd version 0.37;
#X text 516 359 1;
#X text 550 359 2;
#X text 582 359 3;
#X text 614 359 4;
#X text 647 359 5;
#X text 677 359 6;
#X text 708 359 7;
#X text 484 359 0;
#X text 520 378 -- partial number --;
#X text 733 97 0;
#X obj 42 42 r fundamental;
#X obj 42 111 osc~;
#X obj 63 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 41 161 *~;
#X obj 85 111 osc~;
#X obj 106 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 84 161 *~;
#X obj 128 111 osc~;
#X obj 149 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 127 161 *~;
#X obj 128 88 * 2;
#X obj 171 111 osc~;
#X obj 192 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 170 161 *~;
#X obj 214 111 osc~;
#X obj 235 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 213 161 *~;
#X obj 257 111 osc~;
#X obj 278 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 256 161 *~;
#X obj 42 88 * 0;
#X obj 85 88 * 1;
#X obj 171 88 * 3;
#X obj 214 88 * 4;
#X obj 257 88 * 5;
#X text 303 136 <-- On/Off;
#X text 337 152 for each;
#X text 339 168 partial;
#X text 595 11 WAVEFORM;
#X text 578 204 SPECTRUM;
#X text 25 415 The next series of patches demonstrates various kinds
of modulation: AM \, waveshaping \, and FM. We will need a tool for
graphing spectra which is introduced here. In this patch the signal
to be analyzed is a simple sum of up to six partials of a fundamental
frequency (which is 172 Hz \, close to F below middle C \, if your
sample rate happens to be 44100 Hz. The fundamental is chosen to agree
with the analysis patch ("pd FFT") and is computed within it).;
#X text 25 546 The partials are numbered 0 through 5 \, where 0 means
DC \, or zero frequency \, 1 is the fundamental \, and so on. The toggle
switches allow you to turn them on and off separately. You have to
press the "click to graph" button to update the two graphs.;
#X text 745 344 0;
#X text 743 223 1;
#X text 744 282 0.5;
#X text 26 631 The upper graph is just the (time domain) waveform \,
about four periods long. The lower graph is the magnitude spectrum.
Its peaks are the magnitudes of the partials. Note that a DC signal
of amplitude one is considered a partial of magnitude 1 \, but the
other partials \, which have peak amplitudes of 1 (and RMS 0.707) \,
have peak magnitudes of only 0.5 in the spectrum.;
#X obj 41 222 *~ 1;
#X text 733 37 5;
#X text 734 157 -5;
#X text 81 221 sum;
#X text 96 5 GRAPHING SPECTRA OF AUDIO SIGNALS;
#X text 24 742 Here we're introducing a new feature: multiple signals
connected to a signal inlet (as in the "*~ 1") are added. This is the
most convenient way to sum the six partials.;
#X connect 1 0 7 0;
#X connect 1 0 7 1;
#X connect 6 0 4 1;
#X connect 6 0 8 0;
#X connect 20 0 40 0;
#X connect 20 0 41 0;
#X connect 20 0 30 0;
#X connect 20 0 42 0;
#X connect 20 0 43 0;
#X connect 20 0 44 0;
#X connect 21 0 23 0;
#X connect 22 0 23 1;
#X connect 23 0 56 0;
#X connect 24 0 26 0;
#X connect 25 0 26 1;
#X connect 26 0 56 0;
#X connect 27 0 29 0;
#X connect 28 0 29 1;
#X connect 29 0 56 0;
#X connect 30 0 27 0;
#X connect 31 0 33 0;
#X connect 32 0 33 1;
#X connect 33 0 56 0;
#X connect 34 0 36 0;
#X connect 35 0 36 1;
#X connect 36 0 56 0;
#X connect 37 0 39 0;
#X connect 38 0 39 1;
#X connect 39 0 56 0;
#X connect 40 0 21 0;
#X connect 41 0 24 0;
#X connect 42 0 31 0;
#X connect 43 0 34 0;
#X connect 44 0 37 0;
#X connect 56 0 4 0;
#X connect 56 0 1 0;
#X connect 56 0 8 0;
#N canvas 269 43 755 746 12;
#N canvas 0 0 450 300 graph1 0;
#X array E02-signal 882 float 0;
#X coords 0 5 882 -5 200 130 1;
#X restore 501 66 graph;
#X obj 15 370 hip~ 5;
#N canvas 0 0 450 300 graph1 0;
#X array E02-spectrum 128 float 0;
#X coords 0 4300 127 -40 257 130 1;
#X restore 455 251 graph;
#N canvas 45 83 558 569 fft 0;
#X obj 19 61 inlet~;
#X obj 95 214 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 192 166 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 floatatom 16 541 5 0 0 0 - - -;
#X obj 24 494 s fundamental;
#X obj 16 517 ftom;
#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 text 145 216 "bang" into this inlet to graph it;
#X floatatom 191 480 5 0 0 0 - - -;
#X obj 191 456 / 4096;
#X text 187 425 One bin is SR/4096:;
#X text 72 540 <-just out of curiosity \, here's the fundamental pitch
;
#X obj 191 502 s freq-step;
#X obj 95 248 tabwrite~ E02-spectrum;
#X obj 20 281 tabwrite~ E02-signal;
#X connect 0 0 2 0;
#X connect 0 0 31 0;
#X connect 1 0 30 0;
#X connect 1 0 31 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 30 0;
#X connect 15 0 18 0;
#X connect 15 0 26 0;
#X connect 16 0 15 0;
#X connect 17 0 21 0;
#X connect 17 0 22 0;
#X connect 18 0 17 0;
#X connect 19 0 16 0;
#X connect 22 0 20 0;
#X connect 25 0 29 0;
#X connect 26 0 25 0;
#X restore 23 343 pd fft;
#X text 501 198 ---- 0.02 seconds ----;
#X obj 84 344 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 15 398 output~;
#X text 501 720 updated for Pd version 0.37;
#X text 486 384 1;
#X text 520 384 2;
#X text 552 384 3;
#X text 584 384 4;
#X text 617 384 5;
#X text 647 384 6;
#X text 678 384 7;
#X text 454 384 0;
#X text 490 403 -- partial number --;
#X text 703 120 0;
#X obj 18 32 r fundamental;
#X obj 18 94 osc~;
#X obj 39 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 17 144 *~;
#X obj 61 94 osc~;
#X obj 82 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 60 144 *~;
#X obj 104 94 osc~;
#X obj 125 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;