Using an ISR to just set a TimerFlag is not the right thing to do. The ISR should be used to feed the next sample to the output device.
Also you use digitalWrite, yo can save a lot of time using direct port addressing.
I think your title is a bit of a misnomer as music isn’t pitch perfect anyway, the tempered scale is a fudge.