This content has been marked as final. Show 2 replies
There are several parts to your problem: reading a 'music' file, mapping data from that to notes, mapping a 'note' to your light interface.
The last part is the easiest since you can just make up your own notational system and stream that to your lights.
However I am guessing that you are also going to want to play the music so you can hear it as the lights change.
And reading the file and playing the music is a non-trivial undertaking especially since you want to insert yourself into the stream. As such you probably should focus only on that now. Once you have achieved that you should have a better idea of how to map to notes especially if you pay attention to the details of the file formats.
You need to read the sound data in chunks, then do a fourier transform (FFT) on the data. This converts it from an array of values over time into an array of values over frequency. You can aggregate these to produce a strength per frequency range, and use these to drive the various lights.