Function createOscillator