Midi player using a pic16f690 and the AY-3-8912 sound chip. Since I lacked an optocoupler I connected it using rs-232, but the pic should be able to handle midi baudrate just fine using the internal UART, and it should be possible to connect it using standard midi cables.
Sample recording of "House of the Rising Sun" by the Animals, it doesn't sound too bad, especially considering the 2MHz clock for the sound chip is an astable 555... Ehrm.. :D
Another sample recording, "Save Tonight" by Eagle Eye Cherry. Unfortunally, the lead is drowned by the base and chords, the sound chip has only three channels. Might implement some kind of auto-arpegio in the future to deal with that.. Also, a couple of stuck notes can be heard, because of serial buffer overflow. I Have a panic button on the hardware to deal with that x)
Well, since three channels doesn't quite cut it, i slapped on another soundchip, for the total of six channels! The pic now also uses an external oscillator at double the frequency (8MHz) to cope with the extra overhead, however serial overflows still occur when serveral events are to be received at the same time. It is perhaps also caused by the pitch bend i implemented which is a bit hungry on processor cycles.. might have to rewrite some parts of the code in assembler. And yeah, since i now use an oscillator the the soundchips now have a stable 2MHz clock derived from that. Things are starting to sound quite awesome! :D
Beat It by Michael Jackson with six channels and pitch bend. What can I say? It just sounds amazing! (apart from an overflow in the solo that is)
Source is now on github.
Now started working on fitting it all inside a case, namely one from a huge, old transformer. The finished build will feature midi input, line output and an internal amplifier and loudspeaker. It will be powered from the wall using a (much smaller) transformer or from 4 AA batteries for maximum portability. Awesome!
Yay! Finally managed to fit everything inside the case! The pic now clocks 20MHz, should be plenty of processing
power to keep it from overflowing, however, I still have plans to rewrite some of the more critical parts in
assembler. Too bad pic assembler is really horrilble and retarded D:
Well what more can I say? The built-in amplifier really sounds like crap, especially when running on battery power, but i guess that was to be expected. Line out works very well however! And for the curious: The buttons and knobs on the panel are "power", "internal amp", "panic button" and "volume".
Made a video recording of the final hardware playing the theme to The Secret of Monkey Island and Michael Jackson's Beat It.
Slaeshjag and I have some Grand Plans™. We plan on building a big brother to the Chipspter 6000, called the Chipster 24k [link yet to come] with a total of eight AY-3-8912 sound chips for 24 simultaneous channels. We also plan on using the volume envelopes and noise channels for more fancy instrument sounds and midi drums, along with some other total badassery such as a Soviet mini-CRT vector display, a floppy drive for midi file playback and a totally silly Intel 80186 multi-processor architecture with four processors sharing the same memory bus. WTF!? I don't know, but it will be absolutely radical!
Slaeshjag has also written a quick blogpost about some of the problems we ran into when interfacing the sound chips. It might be worth a read if you were to attempt a similar problem