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

First couple AudioChunks are played simultaneously

I'm using the WebAudio api to play a stream from the server. I do that the following way: var d2 = new DataView(evt.data); var data = new Float32Array(d2.byteLength / Float32Array.BYTES_PER_ELEMENT); for (var jj = 0; jj < data.length;…
metabolic
  • 669
  • 1
  • 7
  • 24
1
vote
2 answers

Soundcloud waveforms

I would like to know how soundcloud generate their waveforms. Is this done on server side? Is it done using the web audio API? How can I achieve static waveforms like soundcloud do using the web audio API? Thanks
mrHorse
  • 131
  • 1
  • 1
  • 7
1
vote
1 answer

changing the duration of start() in web audio

For Web Audio API, is there a way to change the duration for start(); e.g. start(0,0,3), after the sound has been played for 2 seconds, now I want it to play for 5 seconds instead of 3. or do I have to schedule a successive start() to pick up where…
1
vote
1 answer

Android Chrome 39 getByteFrequencyData returns 0 array

I have setup example here - http://jsbin.com/hotovu/2/ On desktop chrome all is good. Android Chrome 39 returns all the arrays to 0,0,0, ... ( on ADB plugin for chrome debug ) Any workaround to make this work ?
digitalzoomstudio
  • 1,112
  • 1
  • 15
  • 30
1
vote
1 answer

HTML5 Audio, with Web Audio API - Not Working in Firefox

So I recently posted this question: CLICK HERE And I have come to the conclusion, that I just don't have the time to make this work for Firefox. It would be nice, but I have other projects that I need to work on. So I have decided to just perform a…
Murphy1976
  • 1,415
  • 8
  • 40
  • 88
1
vote
1 answer

Webaudio Playback from WebSocket has drop-outs

I have a software-defined radio playing an audio stream from a WebSocket server, and a client which consumes the data and plays it using an AudioBufferSourceNode. It mostly works. The only problem is that there are momentary dropouts every few…
MidnightJava
  • 1,927
  • 2
  • 18
  • 38
1
vote
1 answer

MediaElementAudioSourceNode prevents video playback in Firefox

Here's what I'm doing: (1) Create a video element; (2) create an AudioContext and a MediaElementSourceNode on the video element; (3) connect the MediaElementSourceNode to the destination node; (4) play the video. It always works in Chrome. In…
aldel
  • 6,489
  • 1
  • 27
  • 32
1
vote
1 answer

How to use the various rampToValueAtTime methods

When I use the following code to fade in a file it doesn't work as I expect. I expect a gradual fade in from 0 to 1 over the course of 5 seconds, instead I get an abrupt change five seconds into playing the file where the gain instantly goes from 0…
William
  • 4,422
  • 17
  • 55
  • 108
1
vote
1 answer

Web Audio API how to modify reverb tails, room size and other ambiance variables

In the Web Audio API you can use the convolver node to create a reverb effect. You can then mix a dry version of the signal with a fully wet version via gains nodes to control the amount of the effect. What I would like to know is if it is possible…
William
  • 4,422
  • 17
  • 55
  • 108
1
vote
0 answers

Reloading file often in Web Audio API

I am grabing a rtmp stream video and recording a MP3 file in a server, using java (I can record it in my PC, as well). I need to load this file in Web Audio API, considering that is constantly being updated, and play it like real-time stream. So, I…
cagigas
  • 49
  • 10
1
vote
1 answer

Chrome crash when utilizing multiple ScriptProcessor and Analyser nodes

I'm building a web app that allows users to evolve webaudio synthesizers (https://gensynth.ou.edu/#/evolve). However, on chrome, whenever you click refresh a few times with mutation amount turned all the way up and play around during evolution, the…
David Rice
  • 1,111
  • 1
  • 11
  • 24
1
vote
2 answers

multiple OfflineAudioContext crashing browser

I have an array of about 60 audio files, (~3min each). I loop through this array - for each item I create an OfflineAudioContext and then do some filtering and processing like so: var request = new XMLHttpRequest(); request.open('GET',…
yung-hans
  • 57
  • 4
1
vote
1 answer

JavaScript Web Audio: cannot properly decode audio data?

I'm trying to use the Web Audio API in JavaScript to load a sound into a buffer and play it. Unfortunately it doesn't work and I get the following error: Uncaught TypeError: Failed to set the 'buffer' property on 'AudioBufferSourceNode': The…
hashahid
  • 179
  • 1
  • 2
  • 7
1
vote
3 answers

How to fix frozen div when using compressor.reduction.value to monitor compression reduction

My problem is the following. I am attempting to connect the compressor.reduction.value of the compressor node to a div's height so I can monitor the compression reduction effect dynamically. This works fine. The problem is when the audio signal…
William
  • 4,422
  • 17
  • 55
  • 108
1
vote
1 answer

WebRTC issue when using RecordRTC

We use the RecordRTC library to record user audio to our system. But an user got this error: Uncaught sample-rate must be under range 22050 and 96000 And I'm not sure what does it mean, as far as I could find on google it has something to do with…
Brayan
  • 460
  • 2
  • 5
  • 17