Adafruit VS1053 Library with added methods for utilising the spectrum analyser plugin. Uses the spectrum analyser plugin from the VSLI website (http://www.vlsi.fi/en/support/software/vs10xxplugins.html).
In theory it should be compatible with other arduino shields which use the VS1053 chip.
readFrequencies(uint16_t *currentVal, uint16_t *peak)
reads the results and fills two arrays with the current and peak values of an mp3 that is being played by the shield (values are from 0 to 31 in 3dB steps).checkRateAndBands(void)
prints out the sampling rate and the number of frequency bands being read.setFrequencies(int numOfBands, short *frequency)
sets the frequencies to be read.readBands(void)
returns the frequency bands.readSamplingRate(void)
returns the sampling rate.
- Download the spectrum analyser plugin from the VSLI website (http://www.vlsi.fi/en/support/software/vs10xxplugins.html)
- Open "spectrumAnalyzer1053b.plg" in a text editor
- Copy from #ifndef SKIP_PLUGIN_VARNAME (line 27) to #endif (line 152) to the top of your arduino project sketch
- Make sure you have included the modified library in your sketch
- After you initialise the mp3 player shield in your sketch add the following code: varNameOfFilePlayer.applyPatch(plugin, PLUGIN_SIZE);
- Use methods as required (refer to example code for reference)