Search code examples
javascriptaudioweb-audio-api

Web audio api GainNode value what is the MaxValue


I looked in this page: https://developer.mozilla.org/en-US/docs/Web/API/GainNode/gain and I didn't find where they write what is the max value and the min value you can enter.


Solution

  • The max value of the gain AudioParam is the most-positive-single-float value. That is a ridiculously high number.

    https://webaudio.github.io/web-audio-api/#dom-gainnode-gain

    You will most likely not need that. Since the GainNode does just multiply the signal any value above 1 is already amplifying it.