Hi,
I recently completed building my Dr.Who Sonic Screwdriver, have a look at the video:
Since I spent some time on the audio and 'NeoPixel' LED effects, I thought I'd tidy up the routines and make 'em generally available - so I've banged in a class as the API for the audio and I'll get around to issuing the LED driver soon.
DDS_Audio generates can play tunes, tones, WAV samples and samples generated by "custom sample generators". It can also play more than one thing at once. An important point is that it can generate audio and drive 'NeoPixel' LEDs at the same time.
The attached complete sketch is a preview of the DDS_Audio player in action (no NeoPixels yet)
It runs on an Arduino Nano or Pro Mini, PCM audio out on D9.
If anyone can run this up, have a play, report any bugs/ideas/comments etc. - I'd be grateful
Yours,
TonyWilk
P.S. In my sonic, the mainline code reads a Flora 9dof accelerometer and modifies the sample generator parameters - rather than playing a fixed WAV loop.
P.P.S. I don't think the code is for beginners.
P.P.P.S I should give credit to this page: Advanced Arduino Sound Synthesis for the initial idea.
DDS_Audio_test_0v1.zip (33.9 KB)