I have a system that register sound from guitar chords to an Arduino. The result for each chord is an array of numbers between 0 and 1024. So one array represent an audio spectrum. I send each array to a nodeJS server. I'd like to compute the envelope of each audio spectrum, but i dunno how to achieve that. If possible, I'd prefer to use a javascript solution, as my server is in javascript.
I add an approximate drawing. What I have is the blue data ; what I want is an array containing the red data.