We are about to switch to a new forum software. Until then we have removed the registration on this forum.
can anyone explain to me how to take the audio level coming into processing and convert it to a db scale? I was looking at this http://www.indiana.edu/~emusic/acoustics/amplitude.htm and found some code that makes some sense
float rms = 0.0;
for(int i = 0; i < in.bufferSize() - 1; i++)
{
rms += level*level;
}
rms = sqrt(rms / in.bufferSize());
float dbScale = 0.5* (2.0 + log10(rms));
but I don't totally understand how they relate
Answers
Not sure but I think it should be something like: