javascript - Gradually Change Web Audio API Panner -
i'm trying use simple html range input control panning of web audio api audio can 3 "positions" audio output:
-center
-100% left
-100% right.
i have in between positions, 20% left , 80% right , on...
the code i'm using is:
//creating node var pannernode = context.createpanner(); //getting value html input , using on position x value document.getelementbyid('paninput').addeventlistener('change', function () { pannernode.setposition(this.value, 0, 0); });
and refers input on html file:
<input id="paninput" type="range" min="-1" max="1" step="0.001" value="0"/>
does knows doing wrong?
you shouldn't need use 2 panners - panner stereo. old answer great 1 question:
how create basic left/right equal power panning createpanner();
Comments
Post a Comment