In hardware there's a good hack for two notes at the same time - which is just to attach the piezo to two signal pins and use PWM on both (= two channels).
However if you use Waveform then that automatically does polyphonic sounds - so you just need multiple Waveform classes and you can set them all playing on the same pin at once (although you have to keep the sample rate low - 4kHz or so - to make sure there's enough CPU time).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In hardware there's a good hack for two notes at the same time - which is just to attach the piezo to two signal pins and use PWM on both (= two channels).
However if you use
Waveform
then that automatically does polyphonic sounds - so you just need multiple Waveform classes and you can set them all playing on the same pin at once (although you have to keep the sample rate low - 4kHz or so - to make sure there's enough CPU time).