Ok, here’s the code. This is very much an experiment, and very much in-progress: I wanted to see if I could do DSD-style (Direct Stream Digital) 1-bit audio. Currently, the sample rate isn’t anywhere near high enough, and the memory demands of DSD-style audio make this sort of pointless, except potentially as an educational tool. (I have some PCM-based sampler code that is a little more reasonable, but still mainly a teaching tool.)
The sound data is generated by a Processing program. It may look like gibberish (and it certainly sounds like gibberish), but it is based on actual audio. I’ve also attached the source audio file (CC-BY from the One Laptop Per Child project).
This includes an ugly work-around in _binaryLookup.h. It defines PROGMEM variables like “B00000000” to avoid the errors I was getting. The get the errors, just delete the line that says "#include “_binaryLookup.h”.
I would like to get this working, but it isn’t critical. However, if this is unexpected behavior for the binary formatter, hopefully this is helpful in sorting it out.
Sampler1bit_0005.zip (8.5 KB)
bell.wav (10.7 KB)