Re: multiple script processors not working in a row

Looks like you have a couple of mistakes in the code:


>             //some other script processor node, just passing through the signal
>             var otherScriptProcessorNode = audioContext.createScriptProcessor(BLOCKLENGTH,1,1);
>             otherScriptProcessorNode.onaudioprocess = function(e){
>                 var otherNodeInput = e.inputBuffer.getChannelData(0);
>                 var otherNodeInput = e.outputBuffer.getChannelData(0);
>                 otherNodeInput = otherNodeInput.subarray();

1. You probably meant to have two variables here: otherNodeInput and otherNodeOutput. Otherwise you'll be copying the output array back to itself.

2. Even after you have two variables, assigning an array to the local variable otherNodeOutput will not copy the data, it will just change what array that local variable points to. You'll need to do this instead:

                otherNodeOutput.set(otherNodeInput);


Best,

.            .       .    .  . ...Joe

Joe Berkovitz
President

Noteflight LLC
Boston, Mass.
phone: +1 978 314 6271
www.noteflight.com
"Your music, everywhere"

Received on Friday, 20 September 2013 17:12:35 UTC