bitfocus / companion-module-studiocoast-vmix

Studiocoast vMix module for Bitfocus Companion
MIT License
32 stars 10 forks source link

Feedbacks: Audio - Input solo On/Off #223

Closed Howlswolf closed 9 months ago

Howlswolf commented 1 year ago

Describe the feature Add state selection for On or Off

Usecases At the moment the feedback does not give us a state choice, it only feedback if it is ON (true)

I have one button that Remove the Solo on an Input. The only way to have some feedback is to reverse the state. So the natural state of the button is On(highlighted), and when the feedback is active it is Off(normal). (It works for certain situation but not all)

So far the variable for the Solo dont seem to be active. If they were we could use something like $(vmix:input_35_solo) =="false"

the api is returning for each input (depending on the state): solo="False" solo="True"

richardgatarski commented 1 year ago

+1 (for variable added) In addition I would like to be able to indicate both Muted/Unmuted and Solo On/Off. Having the variable HowIswolf suggests would be wonderful for that :)

Oldman-Winter commented 1 year ago

There already is feedback for solo and mute.

These only work with true so you have to have a default button state of false and then change the colour when true. (Works fine for me)

There is a variable for every input's mute status true/false. Actual 2 variable for the same thing just opposite.

There is a variable for solo but only for busses which I find odd. Also there is no feedback or variable for checking globally for solo. In Vmix it displays a message at the top when any input is in solo. It would be nice to clear all solos with a button press but I can't find an easy 1 step function to clear all. I don't want to have to add all 100 inputs in a giant list.

richardgatarski commented 1 year ago

Also there is no feedback or variable for checking globally for solo. In Vmix it displays a message at the top when any input is in solo

Unfortunately there is no info in vMix's API that reflects solo globally. Here is script that will find if any Input has Solo On. To save vMix's Dynamic values for other uses, the script alters the Loop value of the (arbitrary) Input "Black". And it's loop state can easily be used for Feedback, Triggers, etc in Companion.

'AnySolo

dim checkStatesIterTime as integer = 200

do while true
    Dim x As New XmlDocument()
    x.LoadXml(API.XML)

    dim soloNode As XmlNode = x.SelectSingleNode("/vmix/inputs/input[@solo='True']")
        If soloNode IsNot Nothing Then
             API.Function("LoopOn",Input:="Black")
          Else
             API.Function("LoopOff",Input:="Black")
        End If

   sleep(checkStatesIterTime)
Loop
richardgatarski commented 1 year ago

@Oldman-Winter

It would be nice to clear all solos with a button press but I can't find an easy 1 step function to clear all.

Using this script is one, I believe:

Dim x As New XmlDocument()
x.LoadXml(API.XML)

dim soloNodesList As XmlNodeList = x.SelectNodes("/vmix/inputs/input[@solo='True']")

for each node as XmlElement In SoloNodesList
  API.Function("SoloOff",Input:=node.GetAttribute("key"))
next
thedist commented 9 months ago

There's now variables for bus_any_solo, input_any_solo, and also solo suffix for inputs and dynamic inputs (eg, $(vmix:input_test_solo)). These can be used to check if any bus, input, or a specific input, has a solo state.

Additionally, the vMix 27 beta adds a new function to disable solo on all busses and inputs, so there's now an action Audio - Solo All Off but this only works in vMix 27.

richardgatarski commented 9 months ago

fan-tastic! Thanks.