[chuck-users] getting the current srate

eduard aylon eduard.aylon at gmail.com
Sun Jun 18 20:52:17 EDT 2006


Hi Atte,

I think (and makes sense) you cannot cast from dur to float but there  
is a work around, ie. dividing by samp and assigning to float.

1::samp => dur bpm;
bpm/samp => float n;
<<< n + 1.>>>;

On Jun 19, 2006, at 1:14 AM, Atte André Jensen wrote:

> Atte André Jensen wrote:
>
>>> This works for me ( on win32 ), using a variety of
>>> 1::second / 1::samp => float srate;
>
> Potentially stupid question:
>
> Using this (thanks, it works) I get a bpm as a duration:
> ((now - first_tap)/nb_taps)/sample_rate * 60
>
> Another place I do:
>
> 60 => int bpm;
> 1::second / 1::samp => float sample_rate;
>
> Is it possible to cast the calculated bpm in duration to float?
>
> -- 
> peace, love & harmony
> Atte
>
> http://www.atte.dk      | quartet:      http://www.anagrammer.dk
> http://www.atte.dk/gps  | compositions: http://www.atte.dk/ 
> compositions
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users



More information about the chuck-users mailing list