Csound Csound-dev Csound-tekno Search About

[Csnd] How accurate is converting samples to seconds?

Date2009-06-16 22:59
FromJacob Joaquin
Subject[Csnd] How accurate is converting samples to seconds?
Very... At least to according to some testing I've been doing with Csound
5.10 (double samples) for OS X.  
I tested two cases:

i 1 0 [$durationInSamples / 44100]  ; samples to seconds
...
ilength filelen "$file"
isamples = ilength * 44100  ; seconds to samples

I've run thousands of random numbers through $durationInSamples, and so far,
I've not come across a single rounding error.

If anyone wants to double check my work, here are the files I used:
http://www.thumbuki.com/csound/files/mailinglist/roundoffTest.zip

Best,
Jake


-- 
View this message in context: http://www.nabble.com/How-accurate-is-converting-samples-to-seconds--tp24063639p24063639.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-06-17 10:15
FromRory Walsh
Subject[Csnd] Re: How accurate is converting samples to seconds?
Thanks for the report, that's impressive.

2009/6/16 Jacob Joaquin :
>
> Very... At least to according to some testing I've been doing with Csound
> 5.10 (double samples) for OS X.
> I tested two cases:
>
> i 1 0 [$durationInSamples / 44100]  ; samples to seconds
> ...
> ilength filelen "$file"
> isamples = ilength * 44100  ; seconds to samples
>
> I've run thousands of random numbers through $durationInSamples, and so far,
> I've not come across a single rounding error.
>
> If anyone wants to double check my work, here are the files I used:
> http://www.thumbuki.com/csound/files/mailinglist/roundoffTest.zip
>
> Best,
> Jake
>
>
> --
> View this message in context: http://www.nabble.com/How-accurate-is-converting-samples-to-seconds--tp24063639p24063639.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>