vMix Forums
»
General
»
General Discussion
»
vMix script, action based on current state.
Rank: Member
Groups: Registered
Joined: 6/26/2011(UTC) Posts: 18 Location: London
Was thanked: 5 time(s) in 3 post(s)
|
For IFB to vmix callers, I have a script that (amoung other things) changes a vMix callers audio source on press of a streamdeck button.
API.Function("VideoCallAudioSource",X,"BusD")
Then on release of the streamdeck button it switches it again.
API.Function("VideoCallAudioSource",X,"BusA")
This is all well and good when you know the caller will always originate on Bus A.
However I now have a production where they could originate from A or G.
Could someone possibly help me write a script, or point me in the right direction of how to. I know it's possible to call the current state of everything, but it's beyond my ability to save a state, then recall it later. My scripting ability is limited to simply sending functions, and I'm struggling to backwards engineer other similar examples found here on the forums.
Many thanks.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 2,639  Location: Belgium Thanks: 151 times Was thanked: 482 time(s) in 392 post(s)
|
While i don't use multiple calls and such i'm pretty sure one can check (API XML) the call's BUSses you assigned to it and go from there Quote:<input key="***********" number="12" type="VideoCall" title="Call ***" shortTitle="Call ***" state="Running" position="0" duration="0" loop="False" muted="False" volume="100" balance="0" solo="False" audiobusses="A" meterF1="0" meterF2="0">Call guy</input>
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/26/2011(UTC) Posts: 18 Location: London
Was thanked: 5 time(s) in 3 post(s)
|
Thanks doggy,
That's excellent, so we know the information is there :)
Now in scripting, how can I call that information, save it in memory somehow, change the bus on button down, then change it back to the previous state on button up!
I appreciate this is relatively specialist knowledge, and I'd be happy to pay someone to write this for me, along with a few other handy scripts I have in mind. Are there people here that offer custom vmix scripting as a service?
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/26/2011(UTC) Posts: 18 Location: London
Was thanked: 5 time(s) in 3 post(s)
|
Success! (Mostly) Posting for the benefit of others who might need something similar. Firstly, I have now learnt how to read information from the XML and action based on it, very usefull :) https://forums.vmix.com/...86-Scripting-for-Dummiesdoggy's post is very handy but if you don't know vb.net you need to learn or find a friend who does before you can make any sense of it. So it turns out you cannot get the information you need from the XML. The "VideoCallAudioSource" is not shown anywhere in the XML, frankly very little output information is available. In the end I took a different approach. It's prone to error but it's good enough for me for now. In the specific case of my production I can infer which audio bus they are being sent, by reading other things like whether they are active, or on an overlay, or which audio busses their own audio is being sent to... I know that if a callers audio is being sent to BusG, they should also be recieving BusG. And if it's being sent to Busses M and A, they should be recieving BusA. So now I have the streamdeck button down will swap their audio source to my IFB bus as usual. Then on button up it runs a script to check which bus their audio is being sent to, and changes their return audio accordingly. Good luck!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 2,639  Location: Belgium Thanks: 151 times Was thanked: 482 time(s) in 392 post(s)
|
Originally Posted by: Andrew  if you don't know vb.net you need to learn or find a friend who does before you can make any sense of it.
True but explaining how to code here would not fit here in the forum. There are tons of google searches explaining how to code in vb.net , or even c#.net and translate to vb.net The ability to use scripting with such code did open up a whole world within vMix
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 12/1/2020(UTC) Posts: 1 
|
Originally Posted by: Andrew  Success! (Mostly) Posting for the benefit of others who might need something similar. Firstly, I have now learnt how to read information from the XML and action based on it, very usefull :) https://forums.vmix.com/...86-Scripting-for-Dummiesdoggy's post is very handy but if you don't know vb.net you need to learn or find a friend who does before you can make any sense of it. So it turns out you cannot get the information you need from the XML. The "VideoCallAudioSource" is not shown anywhere in the XML, frankly very little output information is available. In the end I took a different approach. It's prone to error but it's good enough for me for now. In the specific case of my production I can infer which audio bus they are being sent, by reading other things like whether they are active, or on an overlay, or which audio busses their own audio is being sent to... I know that if a callers audio is being sent to BusG, they should also be recieving BusG. And if it's being sent to Busses M and A, they should be recieving BusA. So now I have the streamdeck button down will swap their audio source to my IFB bus as usual. Then on button up it runs a script to check which bus their audio is being sent to, and changes their return audio accordingly. Good luck! So glad I have finally found someone who has successfully implemented this! I've been searching the forums for hours trying to find anything remotely similar with little success (probably searching for the wrong thing). I'm just starting out with scripting and im stuck on this one so far. I can understand all the elements. But putting them together is where I'm falling apart! At the risk of sounding a bit cheeky, Would you be willing to share your final script for me to have a browse through. I just need something to get me on the right track. Thanks in advance!
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
vMix script, action based on current state.
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