My version 2.0 implementation of the robotic xylophone used Winbond SPI Flash as the song data storage. I chose this because, at the time, it was less expensive than an SD Card with data logger shield. See the Data Storage Tutorial and my blog post SPI Flash or SD Card for discussion on these two media.
Because MIDI files cannot be copied directly onto SPI Flash it was necessary for me to write a separate Windows-based program to do all the heavy lifting. I called this program the “Xylophone Configurator”. This program would read and disassemble MIDI files, convert the MIDI notes into a proprietary format that would be read by the Arduino, and then load this data onto the SPI Flash. The Configurator program would allow one to configure as many songs as could fit on the SPI Flash memory. Below is a screen capture of the Configurator program.
And below shows an example of configuring one song from a MIDI file.
The Configurator program also has the ability to configure different Playlists and Volumes, with each Volume containing up to 250 songs.
The song data is transferred from the computer to the SPI Flash memory via Serial. I wrote a custom library which implemented a series of command-response functions to send data in 32-byte chunks via the serial port (either USB serial, or a wireless bluetooth serial adapter). In this way, any amount of data can be sent from the computer to the Flash memory without any special hardware.
I am not planning to publish this version 2.0 software because 1.) it has been superceeded by the SD Card version 2.1 software, 2.) the SPI Flash software is significantly more complicated, and I don’t have the time to thoroughly test and document it, and 3.) the Winbond SPI Flash in a DIP8 form factor is getting very hard to find online.
If you would like to build a robotic xylophone using SPI Flash (or for that matter have any other Arduino project that uses SPI Flash) I am willing to share my code with you. Please Contact me and let me know what you are trying to do. DISCLAIMER: This code is provided as is, with minimal documentation or commenting, and no guarantee that it will work for you. And I most likely will not be able to provide any troubleshooting or technical assistance. But if you would still like to have my code and try to make it work for your project, just ask.