#N canvas 394 55 634 537 12;
#X obj 150 352 f;
#X obj 180 352 + 1;
#X obj 81 210 t b b;
#X msg 168 328 0;
#X obj 150 415 sel 1;
#X msg 103 318 0;
#X msg 81 241 1;
#X floatatom 484 330 7 0 0 0 - - - 0;
#X obj 484 393 phasor~;
#X obj 419 454 cos~;
#X obj 484 456 cos~;
#X obj 484 431 -~ 0.25;
#X obj 81 29 inlet;
#X obj 419 491 outlet~;
#X obj 484 491 outlet~;
#X obj 221 389 t f f;
#X obj 221 491 outlet;
#X msg 134 211 \; pd dsp 1;
#X obj 150 392 >= \$1;
#X msg 530 366 0;
#X obj 150 297 metro;
#X text 114 80 arg 1: number of steps - arg2: frequency range;
#X text 237 261 fudge to estimate settling time;
#X obj 502 109 loadbang;
#X obj 502 160 t b b, f 6;
#X obj 541 208 max 1;
#X obj 502 185 f \$2;
#X obj 541 185 f \$1;
#X obj 502 208 /;
#X obj 484 303 *;
#X floatatom 502 250 5 0 0 0 - - - 0;
#X floatatom 182 270 5 0 0 0 - - - 0;
#X obj 502 134 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 217 242 expr max(50 \, 40000/($f2*max($f1 \, 1)));
#X obj 221 427 pack f f;
#X text 112 58 [filter-graph1] -- generate sinusoids to test a filter;
#X text 114 106 This \, together with its companion [filter-graph2] \, measures a filter's frequency and phase response. Here we count from 0 to n-1 (where n is the table size) and output the index and a complex sinusoid at each frequency to test., f 50;
#X connect 0 0 1 0;
#X connect 0 0 15 0;
#X connect 0 0 18 0;
#X connect 1 0 0 1;
#X connect 2 0 6 0;
#X connect 2 1 3 0;
#X connect 2 1 17 0;
#X connect 3 0 0 1;
#X connect 4 0 5 0;
#X connect 5 0 20 0;
#X connect 6 0 20 0;
#X connect 7 0 8 0;
#X connect 8 0 11 0;
#X connect 8 0 9 0;
#X connect 9 0 13 0;
#X connect 10 0 14 0;
#X connect 11 0 10 0;
#X connect 12 0 2 0;
#X connect 15 0 34 0;
#X connect 15 1 29 0;
#X connect 15 1 33 0;
#X connect 18 0 4 0;
#X connect 19 0 8 1;
#X connect 20 0 0 0;
#X connect 20 0 19 0;
#X connect 23 0 32 0;
#X connect 24 0 26 0;
#X connect 24 1 27 0;
#X connect 25 0 28 1;
#X connect 26 0 28 0;
#X connect 27 0 25 0;
#X connect 28 0 30 0;
#X connect 28 0 33 1;
#X connect 29 0 7 0;
#X connect 29 0 34 1;
#X connect 30 0 29 1;
#X connect 31 0 20 1;
#X connect 32 0 24 0;
#X connect 33 0 31 0;
#X connect 33 0 34 1;
#X connect 34 0 16 0;
