Wandering around the Internet (as you do), I came across a
github of chiptunes. There’s some nice code and idea’s in there.
Go have a look-see, it’s worth a peek.
EDIT: On a second look round, there’s a whole lot more code, covering
lots of topics… very nicely laid out. I could be spending quite a bit of time
there learning new things.