Making Polyphonic Music (with PICBASIC)

Hello all,
today I stumbled upon this tutorial that makes use of the PICBASIC microcontroller: http://users.picbasic.org/projects/making_music/
I know very little about the PIC, so I was wondering if this is doable with an Arduino.
What worries me is the part that the says:

"Creating sound on a PICmicro is not difficult, simply toggle a pin rapidly enough and it will produce a square wave output. Adjust the rate of toggle and the frequency will alter. However, nothing else can be accomplished if this crude method is adopted because the PICmicro will use all its resources servicing the bit being toggled. So we must use an interrupt in order to toggle the pin in the background, while the main program goes about its business as usual."

Is this possible with an Arduino? Of course I do not want a conversion of the PIC code to an Arduino code, just a simple "yes, it is possible while keeping the same line of thought" will do, but any further info would be great! :slight_smile:

Thanks a lot,
Cassiano

Yes, it's possible using the same sorts of techniques.
(note that by default, all of the timers available on the Arduino are dedicated to generating PWM for the analogWrite() pins.)

(note that by default, all of the timers available on the Arduino are dedicated to generating PWM for the analogWrite() pins.)

Meaning that for every timer that I use I have one less PWM? If that is the case, which one? Or it doesn't matter?