Questions tagged [web-audio-api]

Web Audio API is an advanced audio processing API directly available inside browser that helps to create, manipulate and analyze audio data using JavaScript.

Web Audio API is a powerful model completely different from the HTML5 <audio> element that helps to synthesis audio using JavaScript in browser.

The API uses Modular Routing architecture to create simple or complex mixings and effects. It comes with a low-latency precise-timing model that enables to schedule events at specific times in the future which is very crucial for musical applications.

It also has integration points with <audio> and <video> elements.

Some of the powerful features provided by the API are:

  • Processing live audio input
  • Integration with WebRTC
  • Spatialized audio
  • Convolution engine to create effects in Concert, Cathedral, Tunnel etc.
  • Dynamics Compression
  • Real-time time-domain and frequency analysis
  • Filters and Oscillators

References:

Demos:

2531 questions
1
vote
1 answer

Sample Rate Conversion for Web Audio Streaming

I'm doing a project where I have a server offering up audio via WebSocket to the browser. The browser is then using WebSocket to capture the audio blocks and play them out via the Web Audio API. I create an AudioContext which then has a predefined…
Paul Braman
  • 173
  • 10
1
vote
2 answers

Web MIDI callback function only works when logged to console

I'm building an experimental Web MIDI app which graphically displays the notes you're playing on an external MIDI keyboard to the browser. I'm having a strange error where the following callback only works if I log it to the console: //…
Anson Kao
  • 5,256
  • 4
  • 28
  • 37
1
vote
1 answer

Web Audio Oscillator unable to create new oscillator

In the below code I expect to create a new Oscillator node assigned to o each time that the button element is pressed allowing for multiple presses resulting in multiple 1 second tones at 440. However what I am finding is that the button can only be…
1
vote
2 answers

HTML5 Audio, separate left and right channels

I have an mp3 file with 2 channels, right and left. Is there is any way to play it in the browser with the two channels separated ? So I will have two
HasanAboShally
  • 18,459
  • 7
  • 30
  • 34
1
vote
1 answer

JavaScript - WebAudio API ScriptProcessorNode InputBuffer getChannelData precision

I'm trying to determine the fundamental frequency of an input signal (from a tone generator, or possibly a musical instrument) using JavaScript's WebAudio API, along with some other SO articles (How to get frequency from fft result?, How do I obtain…
numonium
  • 131
  • 2
  • 7
1
vote
2 answers

How can I stop/pause a WebAudio ScriptProcessor node?

I can generate sounds using only createJavaScriptNode(...) on my HTML5 app. I need to generate white noise on the fly. The issue that I am having is that I can not stop/pause the generation for example setting null to the processor or the context.…
the_moon
  • 553
  • 1
  • 7
  • 21
1
vote
2 answers

Converting PCM stream to Javascript readable stream

I'm trying to convert a PCM stream to a readable float32Array. I'm trying to convert with the following method function parseHexString(str) { var result = []; while (str.length >= 8) { int16 = parseInt(str.substring(0, 8), 16); …
boortmans
  • 1,138
  • 2
  • 24
  • 40
1
vote
1 answer

WebAudio PannerNode Automation with LFO

Is there an easy way to connect an LFO directly to a panner node to automate x,y, or z? Like osc.connect(pannerNode.position.x)? Or would it be better to just use a channelSplitter and handle left/right separately?Alternately I could input an LFO…
David Rice
  • 1,111
  • 1
  • 11
  • 24
1
vote
0 answers

callback when AudioContext is ready

I used this to create an audio context: window.AudioContext = window.AudioContext || window.webkitAudioContext; myAudioContext = new AudioContext(); It is taking about 2-3 seconds before any sound can be produced. Is there a callback to tell if…
EmilyJ
  • 872
  • 2
  • 8
  • 19
1
vote
1 answer

How to stop audio in an iframe using web audio api after hiding its container div?

I have an iframe where users can play/stop audio (using web audio api). But how can I stop audio if I hide that iframe? (e.g., by setting the CSS property containerDiv.css('display', 'none')). I've tried to clear the parent div with…
redcrow
  • 1,743
  • 3
  • 25
  • 45
1
vote
2 answers

Is it possible to get sound generated from flash in web audio api?

Hello all :) The question is pretty much the title. A page has a flash application, which I cannnot touch, modify, reproduce in any way. I can put javascript in the page though. I can put another flash app also too. Would it be possible to get the…
BenoitParis
  • 3,166
  • 4
  • 29
  • 56
1
vote
1 answer

How can an AudioParam's change be delayed

When trying to implement an ADSR envelop its easy to implement ADS Attack, Decay and Sustain as the timing of all those values are known at the same time. However if attempting to implement the Release part of this envelop I'm running into trouble.…
Wes
  • 6,697
  • 6
  • 34
  • 59
1
vote
1 answer

Why must a ScriptProcessorNode be connected to a destination?

Consider the following code: http://jsfiddle.net/LVFa6/ The ScriptProcessorNode EventHandler process is not called. Consider adding processor.connect(audio.destination); at the end, as shown in the following code: http://jsfiddle.net/LVFa6/1/ The…
1
vote
2 answers

web audio api changes sample rate when a working draft is released?

I trying to develop a simple guitar tuner based on harmonic detection using the web audio API and js. https://github.com/lontafara/El-audio-en-la-web I have always worked with a sample rate of 48000 Hz. Allowing me some resolution in the frequency…
1
vote
3 answers

Which format is returned from the fft with WebAudioAPI

I visualized an audiofile with WebAudioAPI and with Dancer.js. All works well but the visualizations looks very different. Can anybody help me to find out why it looks so different? The Web-Audio-API code (fft.php, fft.js) The dancer code…
user2090392
  • 51
  • 1
  • 1
  • 3
1 2 3
99
100