I have coded a javascript audio recorder with waves visualizer using gsap library. the Waves are in perfect form by using the gsap.utils.mapRange() as follow
size: gsap.utils.mapRange(
50,
170,
CANVAS.height * CONFIG.barMinHeight/3,
CANVAS.height * CONFIG.barMaxHeight*3
)
But it gives a single bar of very high note in the beginning. If we set the 50 value to 0, then it solves the issue but rest of the waves are not as required. I would like to have a straight line in start. Here's the link to codepen https://codepen.io/mian_waleed/pen/BaxjrKy