(Web Audio API) Oscillator node error: cannot call start more than once

A better way would be to start the oscillatorNode once and connect/disconnect the oscillatorNode from the graph when needed, ie : var ctx = new AudioContext(); var osc = ctx.createOscillator(); osc.frequency.value = 8000; osc.start(); $(document).ready(function() { $(“#start”).click(function() { osc.connect(ctx.destination); }); $(“#stop”).click(function() { osc.disconnect(ctx.destination); }); }); This how muting in done in muting the thermin (mozilla … Read more

What does the FFT data in the Web Audio API correspond to?

yes,getByteFrequencyData results in a normalized array of values between 0 and 255. (it copies the data to the array it gets passed-in). the frequency bands are split equally, so each element N of your array corresponds to: N * samplerate/fftSize so, the first bin is 0. and, assuming a samplerate of 44100 and a <analyzerNode>.fftSize … Read more

What’s wrong with this simple FM synth design?

Most synthesizers labled ‘FM’ in fact do phase modulation (PM, see https://en.wikipedia.org/wiki/Phase_modulation ). There are some benefits (mostly leading to more stable sound over a large tonal range). The OPL2 may use this too, I found no clear evidence, but the Wikipedia article also uses the term ‘phase modulation’. For short, many musical synthesizers labeled … Read more

MediaRecorder.stop() doesn’t clear the recording icon in the tab

This is because this recording icon is the one of getUserMedia streaming, not the one of MediaRecorder. When you stop the MediaRecorder, the stream is still active. To stop this gUM stream (or any other MediaStream), you’d call MediaStreamTrack.stop(). stream.getTracks() // get all tracks from the MediaStream .forEach( track => track.stop() ); // stop each … Read more

Access microphone from a browser – Javascript

Here we capture microphone audio as a Web Audio API event loop buffer using getUserMedia() … time domain and frequency domain snippets of each audio event loop buffer are printed (viewable in browser console just hit key F12 or ctrl+shift+i ) <html><head><meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″> <title>capture microphone audio into buffer</title> <script type=”text/javascript”> var webaudio_tooling_obj = … Read more

Generating sound on the fly with javascript/html5

You can use the Web Audio API in most browsers now (excepting IE and Opera Mini). Try out this code: // one context per document var context = new (window.AudioContext || window.webkitAudioContext)(); var osc = context.createOscillator(); // instantiate an oscillator osc.type=”sine”; // this is the default – also square, sawtooth, triangle osc.frequency.value = 440; // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)