Waveform Generator on the Arduino Mega

I recently decided to build a diy synth and after some research I found this tutorial on the arduino.cc site for a Waveform Generator for the Arduino Due. I was reading the comments on the code when i stumbled upon a comment that said "The minimum frequency is 1hz and the maximum one is 170hz". Obviously a 170 hz limit isn't suitable for music, so I asked myself if it was a software problem or a hardware one. Since I'm not too savvy on the code, can someone explain to me how to break this limit to an higher frequency (like 600hz)?

Here's the code: https://www.arduino.cc/en/Tutorial/DueSimpleWaveformGenerator

(I also am using an Arduino Mega for this project, is it the same?)

No, a Mega is still a 16MHz AVR with no DAC, whereas the Due is ARM, with DAC and a faster clock.