javascript - How to measure the compression with web audio api? -


i create html meter display reduction made compressor node.

i used code not change metter

compressor = context.createdynamicscompressor(); compressor.threshold = -50; compressor.ratio = 12; compressor.attack = 0.003; compressor.reduction.onchange = function () {   var gainreduction = pluginslot1.reduction;   document.getelementbyid("meter").value = gainreduction.value; }; 

this connected html

< meter id="meter" min="0" max="100">

what need in order work?

here's quick , dirty jsbin example: http://jsbin.com/ahocut/1/edit

unless there's i'm missing in spec, reduction param doesn't fire events. need read on-demand. in example, that's happening requestanimationframe loop.

the other thing you're missing need set params compressor.threshold.value, because compressor.threshold object.

hope helps.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -