#N canvas 421 249 558 483 10;
#X declare -lib mrpeach;
#X obj 320 12 import mrpeach;
#X obj 155 164 midifile;
#X obj 200 340 /;
#X obj 200 366 / 1000;
#X obj 155 135 metro 2;
#X obj 200 394 s ms_tempo;
#X obj 194 108 r ms_tempo;
#X obj 155 109 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X floatatom 213 214 7 0 0 0 - - -;
#X floatatom 367 214 7 0 0 0 - - -;
#X floatatom 204 135 7 0 0 0 - - -;
#X msg 64 147 rewind;
#X obj 60 54 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 122 29 Read the midi file and bang it once to get the tempo
into the metro;
#X text 14 29 1>;
#X text 39 55 2>;
#X text 133 106 3>;
#X text 157 74 or just start the metro and it will adjust after the
first tick;
#X obj 39 0 openpanel;
#X msg 39 31 read \$1;
#X obj 39 -18 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 200 184 route microsec_per_quarternote ticks_per_quarternote
;
#X connect 1 2 21 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 1 0;
#X connect 6 0 4 1;
#X connect 6 0 10 0;
#X connect 7 0 4 0;
#X connect 11 0 1 0;
#X connect 12 0 1 0;
#X connect 18 0 19 0;
#X connect 19 0 1 0;
#X connect 20 0 18 0;
#X connect 21 0 8 0;
#X connect 21 0 2 0;
#X connect 21 1 9 0;
#X connect 21 1 2 1;
