[chuck-users] getting the current srate

Atte André Jensen atte.jensen at gmail.com
Sun Jun 18 18:27:32 EDT 2006


Hi

I'm in the process of making a small bpm calculator, as part of a bigger 
whole. It detects taps on a midikey and calculates the bpm from the 
distance between the taps. What it boils down to is that I end up with a 
duration, which at 60 bpm (and tight tapping) is 47904.000000 and if I 
run with --srate44100 is 44096.000000. Looks to me like time is counted 
in samples, right?

Anyways, if my algorithm should work at all sample rates, I need to ask 
from within chuck what sample rate we're running at. How is this done?

-- 
peace, love & harmony
Atte

http://www.atte.dk      | quartet:      http://www.anagrammer.dk
http://www.atte.dk/gps  | compositions: http://www.atte.dk/compositions


More information about the chuck-users mailing list