Simple Web audio (noob) doesnt do what I think it should

Just a simple start/stop but it doesnt work as I thought it should.

Hmm. Please some advice.
Thank you

cc @docEdub

The playground is working for me on Windows with Chrome, and on macOS with Safari.

What OS and browser are you having trouble with?

Also, please post the JavaScript console output here.


I can start, I can stop. But then it throws that error as I want to start again.
Browser is Chrome, Windows 11. I have that issue on 2 machines.

Firefox seems the same issue. I think Iam doing something stupi oO :wink:

Best. Werner

According to the following docs, you have to remove the existing then recreate a new oscillator node.

You’re using a browsers WebAudio API. This stackexchange post has more info, as does the sample keyboard synth from Mozilla docs.

Quick example -

1 Like

So its “just” my lack of javascript knowledege.
Yes yes me noob.
Thank you so much for your patience :wink:
Best. Werner