W3C home > Mailing lists > Public > public-audio@w3.org > January to March 2012

Advice on the convolver node

From: Chris Lowis <chris.lowis@bbc.co.uk>
Date: Tue, 20 Mar 2012 16:30:02 +0000
Message-ID: <4F68B08A.9070602@bbc.co.uk>
To: public-audio@w3.org

I've been playing around with the convolver node in the Web Audio API. 
The examples I could find load an impulse response into the convolver 
node by making an XHR request to a URI to a wav file, e.g. (from [1]):

function loadImpulseResponse(url, convolver) {
     var request = new XMLHttpRequest();
     request.open("GET", url, true);
     request.responseType = "arraybuffer";

     request.onload = function() {
         convolver.buffer = context.createBuffer(request.response, false);
         isImpulseResponseLoaded = true;
     request.onerror = function() {
         alert("error loading reverb");


var convolver = context.createConvolver();
loadImpulseResponse('impulse-responses/matrix-reverb6.wav', convolver);

My question - is it possible to set the convolver buffer from a regular 
javascript array? For example to generate the impulse response using 

Best regards,


[1] - 

Chris Lowis
Research Engineer, BBC R&D (Central Labs)
7th Floor, Henry Wood House, 3-7 Langham Place, London. W1A 1AA
Tel: 020 7765 0854
Received on Tuesday, 20 March 2012 16:29:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:49:58 UTC