vMix Forums
»
General
»
3rd Party Software and Development
»
Setting an Audio Output fader level from a dB value
Rank: Newbie
Groups: Registered
Joined: 12/20/2019(UTC) Posts: 5 Location: Victoria Point, Qld Thanks: 2 times
|
I want to send "SetVolume" commands to vMix via the TCP API, but the volume I'm working from is in dB. Can anyone give me the formula for converting dB values to the 0-100 range accepted by vMix?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/20/2015(UTC) Posts: 493 Location: Copenhagen, Denmark Thanks: 389 times Was thanked: 100 time(s) in 79 post(s)
|
|
1 user thanked stigaard for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 12/20/2019(UTC) Posts: 5 Location: Victoria Point, Qld Thanks: 2 times
|
Thanks for the link, but I'm confused. As an example, I hard-coded a dB level of -6.25dB which for the formula I negated and then calculated 50 as the required volume, which seems to match the example in the Knowledge Base. But when I sent "SetVolume Input=<key>&Value=50" to vMix, the audio fader for that input in vMix moved to the half-way position (ie 50%) BUT the fader tooltip shows 6% -24dB. If I move the fader up until the tooltip shows 50%, the slider is approx 20% of the way down from the top of the fader. To check the result, I followed this SetVolume command with an "XML" request, and the response included volume="6.25" for that input. So why is vMix actually playing the clip at -24dB?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/7/2012(UTC) Posts: 2,636 Location: Canada Thanks: 33 times Was thanked: 506 time(s) in 475 post(s)
|
@ MikeOz
I think it is because the vMix "SetVolume" function uses a 0-100 scale on the position of the Fader vs the Amplitude scaling described in the above link, which I believe only explains the corresponding numbers when you move the Fader. So if you want to reduce the Volume by 50% (in Amplitude) you will need to set the Value of the Fader position to 84. Using the formulas from the link: Volume = (Amplitude ^ 0.25) * 100 Volume = (.5 ^ 0.25) * 100 Volume = (.840896) * 100 Volume = 84
I hope that explains it.
Ice
|
1 user thanked IceStream for this useful post.
|
|
|
vMix Forums
»
General
»
3rd Party Software and Development
»
Setting an Audio Output fader level from a dB value
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close