javascript - can I pan individual howler.js sprites? -


it seems single howler.js (v2.02) sprite file can given 1 stereo location? how can have stereo piano 88 notes set left right on electronic keyboard? i'm trying avoid 88 mp3 files.

i did try setting pan @ point play actuated works if playing 1 note @ time.

perhaps can have 2 identical sprite files, 1 left , 1 right, , able set mix of left , right each note - or - able wrap each sprite in new howl, think i'm clutching @ straws.

relevant code follows; works no panning:

    var pnoarray = {};      (var = 0; < 88; i++) {          pnoarray[i] = [ * 4000, 3850 ];     }     pnosound = new howl( {  src: [ 'spritetest1.mp3' ], sprite: pnoarray } ); 

mousedown event:

    if ( intersects.length > 0 ) {         controls.enabled = false;         selected = intersects[ 0 ].object;         selected.rotation.x = selected.rotation.x + 0.03; //key action          playing = pnosound.play( [selected.number] );          container.style.cursor = 'auto';     } 

mouseup event:

    if ( intersected ) {         selected.rotation.x = selected.rotation.x - 0.03; //key action          if( !sustain ) {             pnosound.pause( playing );         }         selected = null;     } 


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -