logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MikeOz  
#1 Posted : Saturday, April 11, 2020 3:18:01 PM(UTC)
MikeOz

Rank: Newbie

Groups: Registered
Joined: 12/20/2019(UTC)
Posts: 5
Australia
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?
stigaard  
#2 Posted : Saturday, April 11, 2020 4:24:52 PM(UTC)
stigaard

Rank: Advanced Member

Groups: Registered
Joined: 5/20/2015(UTC)
Posts: 493
Man
Denmark
Location: Copenhagen, Denmark

Thanks: 378 times
Was thanked: 100 time(s) in 79 post(s)
thanks 1 user thanked stigaard for this useful post.
MikeOz on 4/11/2020(UTC)
MikeOz  
#3 Posted : Saturday, April 11, 2020 6:56:42 PM(UTC)
MikeOz

Rank: Newbie

Groups: Registered
Joined: 12/20/2019(UTC)
Posts: 5
Australia
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?
IceStream  
#4 Posted : Sunday, April 12, 2020 12:25:39 AM(UTC)
IceStream

Rank: Advanced Member

Groups: Registered
Joined: 3/7/2012(UTC)
Posts: 2,600
Man
Location: Canada

Thanks: 33 times
Was thanked: 501 time(s) in 470 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
thanks 1 user thanked IceStream for this useful post.
MikeOz on 4/13/2020(UTC)
Users browsing this topic
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.