RMS

From Jeskola Buzz Wiki
Revision as of 19:44, 27 March 2010 by JoaCHIP (Talk | contribs) (Calculating and displaying RMS)

Jump to: navigation, search

The information on this page needs to be verified for validity.

What is RMS

The Root Mean Square is a way to express the actual sound pressure of a piece of audio. It is a sort of averaging method that suits audio well.

Calculating and displaying RMS

  1. Select a 50 ms piece of audio (uncertain here, please confirm)
  2. Take each sample and multiply it by itself
  3. Take all those resulting values and add them
  4. Divide that by the amount of samples added (let's call that value "x")
  5. x = sqrtf(x);
  6. Silence is now 0.00, and the max (0 dB) point is 1.00 (but higher vales CAN occur in Buzz!)
  7. Scale this to the size of the graphics, leaving some space for the headroom (e.g. +6 dB)

If you want the RMS value scaled onto the x^3 curve as suggested by JoaCHIP's audio gui design page, simply replace step 5 with x = powf(x, 1/6).