Whoops. I forgot to update the reference when I changed the frequency. Thanks for pointing that out; it's fixed now.
You can change the frequency by playing with the timer registers. Try searching for TCCR1B on the forum or the Arduino homepage. I'm going to try add a function to do this sometime soon.
Meanwhile this is my piece of code so far now. It generates a parabolic sinoid wave. Still no clue how to sync to sample rate clock. But maybe i'm to slow to make it in time anyway...
So i tried to do a pot read(see //...) but it seems the analogRead blocks for 2.5 ms or so lowering the loop rate to +/-400hz... witch is totaly to slow for a Oscillator...
Do ya think it could work, or am i just trying something that i shouldnt?
If you look at analogRead() in wiring.c in the lib/targets/arduino/ subdirectory of the Arduino directory, you'll see a delay(1). You can try commenting it out, as it will probably be removed in the next version of Arduino. That should speed things up.