Categories

Measure audio level using root mean square on Spark Core

Posted on Thursday, October 16th, 2014 in library, measurement by DP

spark_io_audio_rms_meter

Davide Gironi writes:

A Spark.io library to retrive RMS and Spl value from an audio input.
This library reads data from an ADC pin and returns the RMS value of the input simply using RMS avarage.
The root mean square (abbreviated RMS or rms), also known as the quadratic mean, is a statistical measure of the magnitude of a varying quantity.
Here is simply implemented by getting samples, for each of them making the root, then the mean for all the collected samples, and finally square the result.

Code is available on GitHub.

This entry was posted on Thursday, October 16th, 2014 at 5:08 pm and is filed under library, measurement. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recent Comments

  • readybrek: Anyone got a any recommendations for a budget-priced hot air station?
  • William: lol I'm happy to waste 3c for each program/debug cycle... but probably not the time spent soldering a new device down to a proto board!...
  • Joe Desbonnet: Ya, I can recommend the low melting point solder. I used brand 'ChipQuik' and it's amazingly easy to use.
  • Jerome: I need a new BusPirate for the Fablab ;) Many thanks!
  • Max: Seems like an unexpectedly violent way to remove the chip indeed. A hot air station should of course do the job just fine, but in...