Fixed bug in toneGenerator

Now it works (standalone)