Topic: QChan on Arduino
This time I decided to give QChan a go. This is another kind of engine from the previous two, one that uses actual variable pulse width. So that's a new thing to try. I learned about a trick that allows to generate one-shot pulses using the Fast PWM mode on AVR in advance, but turned out that it is simply not needed, as naive approach with just delayMicroseconds works very well.
I added an enhanced mode just for fun. Original QChan's loop runs at 8663 Hz. Turns out that Arduino has no problem to run it at 86630 Hz, with code written all in C! This improves the sound quality quite a bit.
Again, the clicky drums aren't 100% recreated, just an approximation of the sound is implemented, because they were using ever-changing sample rate, and that's does not fit the simple timer interrupt-driven design well.
Again, you can just compile QChan modules in Beepola in order to play them with this port.
The music in the test is MovieMovies1's 'cant think of a music either'.
By the way, if someone don't know, Beepola is capable to extract music back from tap files that were generated with it. This may come handy when you need to get music for testing and need to recompile it to a different address or something. See File>Import.