Tuesday, October 14, 2014

Measure audio level using Root Mean Square on Spark Core

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.

This library is a derivation of the work you can find here: http://davidegironi.blogspot.it/2013/05/avr-atmega-audio-input-root-mean-square.html
So for more information about RMS, you can read the post above.


  • read risk disclaimer
  • excuse my bad english

Thursday, October 2, 2014

Roland SP-404 AVR custom midi control pedal.

---ref 2009

The Roland SP-404 is a digital sampler made by Roland Corporation.
This sampler has an input midi port, and expose a set of midi commands to control the unit.

With this project user can control Roland SP-404 using a Midi Pedal.
With the pedal user can change the bank of the sampler and also switch on / off samples. It is a pedal extentions of the button matrix in front of the sampler.
Current working bank of the midi pedal extention it is show by a 7-segment digits display. User can work on the selected bank even if the SP-404 unit is showing other bank.

I've built it for a friend of mine, Mauro, which has this beautifull sampler, and want to control that unit even by his foot. This was my first project on Atmel micros. The design and the code was from 2009, actually it can be improved, can be also simplified, removing the shift registers and using a simpler button matrix on an ATmega, simoultaneos button press should be added, but at present it works and because it is open, you can change the code as you want.

I've no picture inside of the hardware cause it is already mounted. But i can post some picture of the external unit.

It uses an ATtiny2313.

  • 03c: fixed schematics
  • 03b: fixed code double note out on press
  • 03: fixed schematics, clean code
  • 02b: fixed schematics
  • 02: first release

  • read risk disclaimer
  • excuse my bad english