Not a lot of action in this thread. What a shame. I just left this comment at http://narbotic.net.
I get loads of ideas that will take ages to implement (considering my 2-week arduino ownership) , you may want to cooperate? I just saw your sketch.
Here's your oscillator:
for (i=0; i<= cycles; i++){ // play note for t ms
digitalWrite(speakerOut, HIGH);
delayMicroseconds(hperiod);
digitalWrite(speakerOut, LOW);
delayMicroseconds(hperiod - 1);
On the fly PWM implementation idea: Declare PulsWidth parameter
Shorten the HIGH period , lengthen the LOW period by (PulsWidth)
Have PulsWidth read from analogPin
Make PulsWidth LFO from “Fading” sketch: http://www.arduino.cc/en/Tutorial/Fading
There's a proper synth parameter for you. If you have more analogIn's available (or select DigitalIn switches) you can combine Pulswidth parameters, so PulsWidth will be: PulsWidth read from analogPin + LFO derived value + LFO speed ( by varying increment/deminish amount at "Fading" portion).
Now if someone could apply this to the enigmatic pitch determenation scheme we can have pitchbend and vibrato....
A first seed on a "Waveform generator" will be posted elsewhere, as this is no longer appropriate for the "Exhibition" section.
I do hope to make this a joint project, my sketch making so far is minimal to say the least.