[PD] tap tempo

Michal Seta mis at creazone.32k.org
Wed Dec 3 06:54:10 CET 2003


Maybe I'm not understanding your problem properly but assuming that
[metro] is driving your patch, you can have [realtime] listening to the
tap like so:

[x]   -- this is 'toggle'
 |
 |
[sel 0 1]
|   |         -- every '0' resets, '1' reports the time elapsed
|   |
[realtime]


 and the output of it can feed directly the [metro] (if [metro] is
supposed to be driving at the tap unit duration; if not, multiply/divide
at will).  For that you don't need to know about bpm conversions.

I attach a patch that may help you in bpm<->ms conversions.
Keep in mind that some bpm values will not yield exact tempos (i.e. 110
bpm = 545.4 ms for a quarter) because [metro] has a resolution of 1 ms. 
Hopefully you don't mind this imprecision.

./MiS

On Tue, 2003-12-02 at 13:27, Antonios Galanopoulos wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi
> I want to create an abstraction that will enable me to tap the tempo of an 
> external source and have pd changing to that tempo.
> Is there an abstraction or object that could help me ?
> 
> I am not very familiar with the way BPM works, some pointers to documentation 
> would be also appreciated.
> - -- 
> anton
> \/\/\/\
> stereocilia.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE/zNmLxdQr4si4Zq4RAsZWAKCkrj5O7eDE8ZIv50Wwfyv53e+Q7wCggk9y
> vPrW7adeDJA3Sermt/BNGTQ=
> =dh/q
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> PD-list mailing list
> PD-list at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-list
-- 
	      _
      __  __ (_)___   Michal Seta
     / 	\/  \ _/^ _|
    /  	     V |_  \ @creazone.32k.org
   (___/V\___|_|___/
http://www.[creazone]|[noonereceiving].32k.org







-------------- next part --------------
#N canvas 63 38 716 572 10;
#X text 176 192 assuming 4 beats / bar;
#X floatatom 167 133 5 0 0 0 - - -;
#X obj 88 230 expr $f2/$f1;
#X msg 33 195 4;
#X msg 68 195 8;
#X msg 106 195 12;
#X msg 139 195 16;
#X text 32 173 Q;
#X text 69 172 E;
#X text 105 173 ET;
#X text 138 173 16;
#X floatatom 108 262 5 0 0 0 - - -;
#X obj 29 268 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 31 341 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 30 291 metro 200;
#X obj 167 173 expr 60 * 1000 * 4 / $f1;
#X text 163 100 1 set this first;
#X text 27 145 2 then this;
#X text 106 275 the duration of the note value in ms;
#X text 31 68 BPM -> ms;
#X text 38 307 metro takes ms as arg;
#X text 508 452 assuming 4 beats / bar;
#X floatatom 499 393 5 0 0 0 - - -;
#X msg 365 455 4;
#X msg 400 455 8;
#X msg 438 455 12;
#X msg 471 455 16;
#X text 364 433 Q;
#X text 401 432 E;
#X text 437 433 ET;
#X text 470 433 16;
#X floatatom 440 522 5 0 0 0 - - -;
#X obj 499 433 expr 60 * 1000 * 4 / $f1;
#X floatatom 33 232 5 0 0 0 - - -;
#X obj 421 489 expr $f2/$f1;
#X text 438 535 bpm;
#X text 363 317 ms->BPM;
#X text 331 304 ---------------------------------------------;
#X text 543 394 ms;
#X text 359 405 2 then this;
#X text 41 443 Q = quarter;
#X text 40 463 E = eight;
#X text 40 481 ET = eight triplet;
#X text 25 12 BPM thingies;
#X text 19 555 ./MiS;
#X connect 1 0 15 0;
#X connect 2 0 11 0;
#X connect 2 0 14 1;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 2 0;
#X connect 6 0 2 0;
#X connect 12 0 14 0;
#X connect 14 0 13 0;
#X connect 15 0 2 1;
#X connect 22 0 32 0;
#X connect 23 0 34 0;
#X connect 24 0 34 0;
#X connect 25 0 34 0;
#X connect 26 0 34 0;
#X connect 32 0 34 1;
#X connect 33 0 2 0;
#X connect 34 0 31 0;


More information about the Pd-list mailing list