Description of button layouts on each screen
In "Edit octave" mode
I found music trackers like MilkyTracker and FamiTracker interesting, but could never use them because they were too complicated. I had also recently acquired a surplus LCD display intended for a Nokia 5110. Based on these two factors, I decided to try and make as compact of a music tracker-like device as possible. A side objective was to keep the cost low. Total cost of all components is probably less than $10, except for the battery.
What it does
It can play up to four tones simultaneously, store them in a temporary RAM buffer or save them to ROM, edit the songs, scroll through them to view them, and has a backlight.
How we built it
First, the music box was prototyped on a breadboard. After major software issues were ironed out and the primary functions (editor, scrolling, music playback) were complete, the circuit was transferred to a proto board. Although the circuit was permanently attached to the board, the debugging port was still accessible, and the final features (backlight, saving, a sample song) were added through that.
Challenges we ran into
The first challenge was driving the LCD and reading the matrix keypad. Fortunately, with some modification to some rather old libraries, those components became usable. The second challenge was saving the music to ROM. PSoC 4 does not have internal EEPROM, so it must be emulated with flash memory. The third challenge was wiring. On the L78L33, the pinout is reversed compared to the standard 7805, resulting in a destroyed regulator. Other wiring issues included insufficient board space (necessitating a chip being mounted underneath the board), and a shortage of wire. (This project is actually Plan A-3. Plans A-1 (calculator-to-AVR interface) and A-2 (AVR sound) did not work as well as expected, and were replaced by this plan, which I was fairly sure would work. However, I didn't consider the challenges enough to push to plan B, a home security system with Internet connection.)
Accomplishments that we're proud of
The primary accomplishment we are most proud of is the user interface. Using a system with 4KB RAM (even less than graphing calculators 25 years ago), a basic GUI can be constructed.
What we learned
First, we learned a lot of strange details about PSoC, and ARM GCC in general. Also, we somehow managed to bump into a large variety of edge cases for PWM modules. Another thing was how to program graphics under low RAM conditions--key to this is placing as many items as possible into flash ROM.
What's next for Modifiable Music Machine
Probably an improvement to sound quality is in order. Additionally, exporting and importing music to PC/phone/other device would be handy. Additional sound capabilities could also be added, such as PCM sampling, triangle, sine, and sawtooth waves, and louder speakers and auxillary output. The mechanical design could also be improved, to make it less fragile--redesign to have fewer components sticking out (and a nice-looking case).