As an electronic instruments enthusiast, I've been meaning to make a 1bit PWM DAC for some time and I finally succeeded. Most examples I found relied heavily on C(++) code which, to be frank, is still incomprehensible for me. So I made my own, using only Arduino code. I feel like my version is quite a bit better to understand for beginners, so I'd like to share it!
(note: it starts with the huge sample, just scroll to the bottom to see the actual code)

If anyone's got suggestion/corrections or wants to collaborate on expanding this thing, you're very welcome!

My next steps:
-Modify to play multiple samples polyphonic
-Add midi input
-Handle different sample rates (pitch up/down)
-Read samples from SD card (standard 44.kHz 16bit wavs, and other formats)
-Improve sound quality (comparison IntervalTimer and elapsedMicros, increase sample/bit rate etc)
-Add UI
-Make it as complex as to be a hardware NI kontakt competitor

Some questions about the IntervalTimer:

Is it possible to set IntervalTimer in Hz, instead of just us?
Is it possible to change the IntervalTimer frequency while it is running?