[chuck-users] powtodb and rmstodb in Chuck

jakob kaiser jakobala at hotmail.com
Thu Jan 24 22:26:27 EST 2008


Hi,
I'd like to know how decibel is defined in the standard functions of chuck, namely powtodb and rmstodb. After what I've read so far decibel is defined as:
 
20*log(soundToMeasure/referenceValue)
 
Is that the formula used for these functions? And if yes, what is the reference Value here? Also, did I get the relation between the float values used for the samples of audio signals in chuck and dB right if I would measure dBs like this:
- suppose I want to get the maximum dB of an audiosignal. Would it be sufficient to look for the greatest float value in the signal, and then apply powtodb(maximumValue) to it?
- suppose I want to get the average dB of an audiosignal. Would I have to take all values of the signal, calculate the root mean square after the formula used in statistics and then apply rmstodb? But then I still don't understand why I need another function for this one. So, what is the difference between rmstodb and powtodb.
 
Have a nice day
 
Jakob
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080125/4f616185/attachment.htm 


More information about the chuck-users mailing list