You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll probably implement this at some point, but I'm thinking it will be better as a separate module. Would love to try and replicate some vintage analog VU meters.
I was able to create it quite easily, drawing on a separate canvas.
I use getBars() and then getting the max value and max peak to draw a bar for the value and a little 'dash' on top for the peak. Also applying the fillStyle and strokeStyle from the regular analyzer, to get the same gradient fill. Works quite nice, see image. Probably the values are not technically correct as 'volume', but for the user it's a good enough indicator to understand how 'loud' they are.
@JanMisker That's a nice solution! You can also use getEnergy() and getEnergy('peak'), although currently it returns only a single channel - there's a demo of it in https://audiomotion.dev/demo/fluid.html (see the Energy meters button).
Maybe it would be worth expanding getEnergy() to return separate left and right channels. I'll have a look into it.
And you're correct, these are not very accurate volume measurements. Ideally it would be done by analyzing the time-domain (waveform) data, instead of the frequency-domain. That's why I said I'll probably create a separate module just for the meters.
The package is great, works very well.
I was wondering whether it is possible to create a volume level meter.
So a single or dual (stereo) bar display?
The text was updated successfully, but these errors were encountered: