We are using an integrated chipset LED strip regulated by an Arduino microcontroller to display visuals. With the proper Neopixel library installed in Arduino, the intensity and color of the individual pixels can be programmed, and they will be modulated to complement a song. The initial idea was to map the beat of the song to the intensity of the lights and the melody of the song to the color of the lights, however we ran into several issues that prevented this from occurring which will be explained below.
In order for as many of the digital signal processing tools to be available to us, we decided that all of our data would be pre-processed in Matlab and then sent to Arduino over a serial communication. This would allow us to be able to utilize a wide array of tools that might not be available to an Arduino. In the end, this ended up being the largest flaw in our design.
In order for as many of the digital signal processing tools to be available to us, we decided that all of our data would be pre-processed in Matlab and then sent to Arduino over a serial communication. This would allow us to be able to utilize a wide array of tools that might not be available to an Arduino. In the end, this ended up being the largest flaw in our design.
Issues with Implementation
Because the system that we used to communicate between Matlab and Arduino was not designed for precise time actions, we ran into many issues with actually implementing our method on the LED strip. We also were only able to send one value to the Arduino at a time rather than three, so we were only able to control one color at a time. This meant that we were unable to implement both the beat detection and melody detection at the same time because the melody detection involved plotting multiple colors to the LED strip. Instead, we had to change the intensity of the red LED's based on the beat for one demonstration and then in a separate demonstration we also changed the intensity of the red LED's based on the melody of the song.
Because Matlab's pause function is not very consistent from trial to trial, timing the LED strip to start when the music starts was very difficult. Because we were also playing the audio file from within Matlab to keep the method consistent, the volume of the speakers somehow seemed to also affect the pause function. The louder the speakers were set to, the more inconsistent the pause functions were. We also had trouble timing our the commands sent to the Arduino throughout the song. We used a for loop within Matlab which, mixed with the pause function, produced a variable tempo. We were able to implement it effectively with certain songs, however we had to change the duration of the pause function for each song even though the songs were all sampled with a frequency of 44100 Hz. In our Future Prospects, we provide some suggestions for creating a more reliable system.
Because Matlab's pause function is not very consistent from trial to trial, timing the LED strip to start when the music starts was very difficult. Because we were also playing the audio file from within Matlab to keep the method consistent, the volume of the speakers somehow seemed to also affect the pause function. The louder the speakers were set to, the more inconsistent the pause functions were. We also had trouble timing our the commands sent to the Arduino throughout the song. We used a for loop within Matlab which, mixed with the pause function, produced a variable tempo. We were able to implement it effectively with certain songs, however we had to change the duration of the pause function for each song even though the songs were all sampled with a frequency of 44100 Hz. In our Future Prospects, we provide some suggestions for creating a more reliable system.