View Single Post
Old 01-01-2020, 09:44 PM   #14
Human being with feelings
Join Date: Dec 2012
Posts: 5,550

Originally Posted by CrashAlpha View Post
Been looking for documentation on this. If this is done under @sample,would changing spl0 and spl1 actually change the output value? I. E. Would the VU meter now change the audio?
This plugin has no audio output. It will only affect the meter.

So you know how to add a slider in there? I would suggest just sticking it at the end of the list and giving it the next ordinal number so that you don't have edit references to existing sliders. Give it some reasonable range in db. Then, in @slider do something like:

calibrate = 10 ^ (sliderx/20); //where x is your calibration slider number

and then in @sample, we'll replace the 8 with calibrate:

spl0 *= calibrate;
spl1 *= calibrate;

And it should be at least really damn close. Like I said, the rest of the plugin seems to use 2^(db/6) which is not technically correct and doesn't even match Reaper's own meters, but it's a **** hair's difference at most.

Edit - I also noticed the jitter in the meter, and had trouble finding a setting to make it stop. I kind of assumed it had something to do with the windowing of the RMS calculation. I honestly didn't look very far at all into how they do that part, but there can be glitches in some of these kinds of calculations depending on how the window relates to the frequency of the test tone, and even though I was using a square wave which really shouldn't do that, like every meter, scope, or display in every JS plugin is weird and glitchy, so... Ultimately, there are things happening at the sample block frequency, at the window time frequency, at individual sample frequency, and at gfx frequency such that I think it would almost a miracle if it actually worked smoothly.

Last edited by ashcat_lt; 01-01-2020 at 09:54 PM.
ashcat_lt is offline   Reply With Quote