Brill, thanks Gordan!
Sorry I should have explained more about what I wanted to do.
What I had in mind was making a synthesiser-sampler-sequencer, along the lines of this and this
, though on a much more modest scale.
Both those projects use the Teensy and its audio library and as the Teensy mcu is a M4 as well I had the idea of doing something along the same lines using Espruino as well.
So thats why I was mentioning starting with a sine wav (but also square, tooth, etc) and then applying modulations to them to create sounds.
Thanks again for all the info that you and fanoush replied with, I think I have a good idea now of how to get started experimenting with this.