Today, I'm back again with source code and a video for you! Enjoy my first chiptune for the Arduino ;)
With the help of Draeyoc, I was able to get Linus Akesson's hardware chiptune player onto my Arduino. It is a port Draeyoc got from somewhere on the net, and I used the Linus' simplistic but perfectly usable chiptune tracker to create my own tune. However, the tracker exported an assembly source file, which I had to compile and decompile again to get the correct byte sequence for use in the player sketch.
If you want to create your own tune, then...
- Use the tracker (Linux) to compose it.
- Export it ("%" key in the tracker).
- Run my conversion script in the tracker folder (you'll need gcc and java for it to run!).
- Open the file "song.lst" and copy its contents to the clipboard.
- Open the player sketch and replace the byte sequence in "songdata" by the sequence from "song.lst"
- Update the defines of "MAXTRACK" and "SONGLEN" to the values found in "exported.h" in the tracker directory.
- Connect a speaker to port 3 and two LEDs to ports 10 and 12 and enjoy your personal disco with synchronized light show.