logo

Live Production Software Forums


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

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
BlammoTV  
#21 Posted : Thursday, January 23, 2020 1:18:57 AM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Doggy, thanks so much for the help, I finally got it working.

So thanks a lot for your patience, since I noticed early on that you like people to figure it out themselves ;)
This however doesn't always work like that, since not everybody will have the needed skills or level of experience, hence their question. All the comments you posted might be easily understood when one is already somewhat skilled in programming( a little bit more than novice level). I was/still am novice, that's why I posted.

That being said, thanks again. As I now (finally!) know what "the correct way to read or address the API data via what .NET command" is, I made a new script right away;

dim xml = API.XML()
dim DOGGYSTYLE as string = ""

dim x as new system.xml.xmldocument
x.loadxml(xml)

DOGGYSTYLE = (x.SelectSingleNode("//overlays//overlay[1]").InnerText)

If DOGGYSTYLE > 3 Then
API.Function("OverlayInput2In",Input:=1)
Else
API.Function("OverlayInput1In",Input:=1)
End If

You probably already know, but I've bound it to a (midi pad key) shortcut switches one of our cameras depending whether camera is shown in either overlay1 or overlay2.
Two other ones do the same for camera input 2 and 3. Now trying to make a single script out of it, instead of a seperate script for all 3 camera inputs.

Anyways, we all thought Doggystyle was a fitting name for the script ;P
doggy  
#22 Posted : Thursday, January 23, 2020 1:43:25 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,081
Belgium
Location: Belgium

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Great you did it, proficiat :-)

yes i am a believer of learning from it rather then just having a solution thrown into ones lap and then not know how to adjust it.
All the code tidbits where there all along though(scripting for dummies). I am not a programmer by any means but love to figure things out (if its not there try to make it LOL)

It is often really hard what the true intent is . In this case you wanted to switch 2 overlays that were already displayed regardless of which ones they were which is not what i am seeing in your code , but hey whatever works its the end result and satisfaction that counts .
(activating and/or replacing an overlay is already a standard shortcut or button press)

but hey this is what i had all along connected to a shortcut and a streamdeck button;-)

Code:
' OVERLAYS SET TYPE = PIP  AND EFFECT = CUT. 
' Nothing holding you back to choose another effect

'lets have basket to hold some info
dim xml as string = API.XML()
dim ovl1input as string = ""
dim ovl2input as string = ""

'lets get all API xml data (http://127.0.0.1:8088/api)
dim x as new system.xml.xmldocument
x.loadxml(xml)

' let's see which of you inputs is currently on PIP overlays
ovl1input = (x.SelectSingleNode("//overlays//overlay[1]").InnerText)
ovl2input = (x.SelectSingleNode("//overlays//overlay[2]").InnerText)


if (ovl1input = nothing) or (ovl2input = nothing)
'we don't have 2 PIP overlays, no point in continuing then
return
end if

' lets switch you both
API.Function("OverlayInput1In",Input:=ovl2input)
sleep(50)
API.Function("OverlayInput2In",Input:=ovl1input)

'we are all good now ?


BlammoTV  
#23 Posted : Thursday, January 23, 2020 2:12:19 AM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post

It is often really hard what the true intent is . In this case you wanted to switch 2 overlays that were already displayed regardless of which ones they were which is not what i am seeing in your code , but hey whatever works its the end result and satisfaction that counts .


Very true! It is hard to really explain what the situation is, and what the exact solution is you are looking for.

And yes, the script I was looking for was:
Code:

dim xml = API.XML()
dim KING as string = ""
dim KONG as string = ""

dim x as new system.xml.xmldocument
x.loadxml(xml)

KING = (x.SelectSingleNode("//overlays//overlay[1]").InnerText)
KONG = (x.SelectSingleNode("//overlays//overlay[2]").InnerText)

API.Function("OverlayInput1In",Input:=KONG)
API.Function("OverlayInput2In",Input:=KING)

But since our first 3 inputs are always camera inputs AND I learned the proper way of connecting API with .NET (yes, I should've taken a better look at Scripting For Dummies!!), I wrote a second script (the one in my last post) that lets our Streamdeck switch to the corresponding camera (input 1, 2 or 3) whether at that moment it is showed in Overlay1 orrrr Overlay2 :)

Now we can go ahead for a few months haha...
Thanks again!
mavik  
#24 Posted : Monday, January 27, 2020 7:30:46 PM(UTC)
mavik

Rank: Advanced Member

Groups: Registered
Joined: 4/23/2017(UTC)
Posts: 1,143
Man
Location: Germany

Thanks: 3 times
Was thanked: 166 time(s) in 148 post(s)
Another way I can think of is using the mini mixers that came with V23.
Setup two mini mixers. One for the background and one for the foreground.
Then setup two multiviews. One with AB and the other with BA. Set A to mini mixer1 and B to mini mixer2.
Now you can merge between the two multiviews and change sources for A and B as you like.
Users browsing this topic
Guest
2 Pages<12
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.