Thinking out loud:
One problem is that the timer doesn't run fast enough to be able to accurately play back high notes, so realistically I get about half of octave 0, octaves 1 and 2, and about half of octave 3 (and a few notes of 4). This is rather limiting.
I've been thinking about an alternative playback system, where I have a set of precomputed 'wavetables' for each note. Playback simply involves indexing into the appropriate wavetable. On the 6502 this can be super cheap:
```
lda note1, x
eor note2, x
eor note3, x
```
Changing notes is done by updating the addresses directly in the instructions. Because this is cheaper and faster, I can do it more often, and therefore increase my sample rate and get better high-pitched notes.
Except, now I need a 'sample' for every possible note. 80 notes at 16 bytes per sample is a bit over 1kB, which is fine. Except... those 16-byte samples won't necessarily contain complete waveforms. So there'll be a glitch every time the sample loops. If my sample loops every 0.01s, that'll produce a 100Hz tone.
Is this an approach anyone else has investigated? Is it at all workable? The downside is that I don't get on-the-fly waveform generation, which means no volume control; but my volume control is pretty bad anyway...