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
Salleman  
#1 Posted : Tuesday, October 12, 2021 1:15:22 AM(UTC)
Salleman

Rank: Member

Groups: Registered
Joined: 3/13/2020(UTC)
Posts: 20
Sweden
Location: Stockholm

Thanks: 2 times
We using DataChangeIn when we sending football and there is a gool in a another match in the series.

The graphics then sense the new change in goals in the series and fade in a infobox in the left corner showing the new score in that parallell gamee playing.

I have solved this by creating a GT graphicas imput 1 fading in and out when data changes, and then put this as multi layer 10 in input showing scoreboard.
This working very well, but now I whant to automat a "bell" sound when this happens, but cant get vMix to notice when this happens.

Any suggestions?
doggy  
#2 Posted : Tuesday, October 12, 2021 1:36:31 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
As you are using datachange withn a GT title that means that data is somewhere in the title .
A script can read that data/textfield content and check for a change and act upon it .

Don't even need an audio file as input to lay a sound ;-) https://forums.vmix.com/...ng-for-Dummies#post88356
Salleman  
#3 Posted : Wednesday, October 13, 2021 6:50:48 PM(UTC)
Salleman

Rank: Member

Groups: Registered
Joined: 3/13/2020(UTC)
Posts: 20
Sweden
Location: Stockholm

Thanks: 2 times
Originally Posted by: doggy Go to Quoted Post
As you are using datachange withn a GT title that means that data is somewhere in the title .
A script can read that data/textfield content and check for a change and act upon it .

Don't even need an audio file as input to lay a sound ;-) https://forums.vmix.com/...ng-for-Dummies#post88356


OK Thx

I have not dive into scripting so much yet, but if some of you have a script or could build one it would be greate.

My setup:
I have one Input with a GT Title called "Goal-Pling"
In this Title I have 7 Titles av Multilayer showing 7 GT-Tiles named G1Result, G2Result, G3Result... etc

Those GT is set to show if Object "G1Result" DataChangeIn (G1Result.Text) has a new data and disappear 3 seconds later on DataChangeOut (G1Result.Text)

The easiest way should be if there is a way to script that if Data change at G1Result the Input Goal-Pling should be shown as "Layer2in" in 5 seconds and then "Layer2Out"
Then I can just set a trigger to this Input to play a sound on showing on Layer2

But I'm open for suggestions. :-)

So the short need is:
If DataChangeIn on (G1Result.text) then Layer2in input "Goal-Pling"

Duable?

doggy  
#4 Posted : Wednesday, October 13, 2021 7:08:57 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: Salleman Go to Quoted Post


Duable?



Sure is doable but maybe also time to learn a little bit yourself ( see previous link)

Code:

dim oldresult as string = "0"
dim G1result as string = ""

do while true
G1result = Input.Find("Goal-Pling").Text("G1Result.text")  'get current score
if not G1result = oldresult '  check if score has changed
     'do your layer2In
     'do your plingy thingy or use the trigger
     sleep(5000) 'wait 5 seconds
     'do your layer2Out
     oldresult = G1result 'save the new score
end if
sleep(500) 'lets not check again to quickly 
loop
Salleman  
#5 Posted : Wednesday, October 13, 2021 7:17:41 PM(UTC)
Salleman

Rank: Member

Groups: Registered
Joined: 3/13/2020(UTC)
Posts: 20
Sweden
Location: Stockholm

Thanks: 2 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: Salleman Go to Quoted Post


Duable?



Sure is doable but maybe also time to learn a little bit yourself ( see previous link)

Code:

dim oldresult as string = "0"
dim G1result as string = ""

do while true
G1result = Input.Find("Goal-Pling").Text("G1Result.text")  'get current score
if not G1result = oldresult '  check if score has changed
     'do your layer2In
     'do your plingy thingy or use the trigger
     sleep(5000) 'wait 5 seconds
     'do your layer2Out
     oldresult = G1result 'save the new score
end if
sleep(500) 'lets not check again to quickly 
loop


Absolutly, I dive in to this soon.

Thx for code

Salleman  
#6 Posted : Wednesday, October 13, 2021 9:27:03 PM(UTC)
Salleman

Rank: Member

Groups: Registered
Joined: 3/13/2020(UTC)
Posts: 20
Sweden
Location: Stockholm

Thanks: 2 times
Originally Posted by: Salleman Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: Salleman Go to Quoted Post


Duable?



Sure is doable but maybe also time to learn a little bit yourself ( see previous link)

Code:

dim oldresult as string = "0"
dim G1result as string = ""

do while true
G1result = Input.Find("Goal-Pling").Text("G1Result.text")  'get current score
if not G1result = oldresult '  check if score has changed
     'do your layer2In
     'do your plingy thingy or use the trigger
     sleep(5000) 'wait 5 seconds
     'do your layer2Out
     oldresult = G1result 'save the new score
end if
sleep(500) 'lets not check again to quickly 
loop





Hi again, sorry to need to ask again.

When I start the script it seems to work fine and the "overlay2" is lightning up and play "pling" as i should and shuts of layer2 after 5 sec as scripted.
But it seems not recognize any data change when the goals keep coming in.

Could you please see if I missed something in the code?

*********
dim oldresult as string = "0"
dim G1Result as string = ""

do while true
G1Result = Input.Find("MATCH-PLING1").Text("G1Result.text") 'get current score
if not G1Result = oldresult                                 'check if score has changed
     API.Function("OverlayInput2In", Input:="59")           'do your layer2In
                                                            'do your plingy thingy or use the trigger
     sleep(5000) 'wait 5 seconds
     API.Function("OverlayInput2Out")                       'do your layer2Out
     oldresult = G1Result                                   'save the new score
end if
sleep(500)                                                  'lets not check again to quickly
loop
***********

On Input number 60 named "MATCH-PLING1" built on GT "goal-plingg1.gtzip" I have in Title Editor "G1Result.TEXT" getting data from a Google Spreadsheet.

If I manually light up Overlay2 and change the score in spreadsheet the Title shows for 4 seconds and then disappears as planned.
But if I leave the Overlay2 Off, the datachange do not activate the On and Off och Layer2.

The Input needed to use Layer2 is Input 59 where Input 60 is one of 7 multilayers.

But as I wrote the script when I started to do exactly this and lights up Layer2 on Input 59 so that part works, but not the DataChangeIn function later on.

Any suggestions? 


Absolutly, I dive in to this soon.

Thx for code



doggy  
#7 Posted : Thursday, October 14, 2021 12:05:15 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Quote:
But if I leave the Overlay2 Off, the datachange do not activate the On and Off och Layer2.


I dont get what you mean
overlay and layers of a multiview are different things and use different functions to manipulate

The script does work

Instead of messing (and mixing up) with layers and overlays why not have multiple pages in your title and activate/deactivate those ?
Salleman  
#8 Posted : Thursday, October 14, 2021 12:10:27 AM(UTC)
Salleman

Rank: Member

Groups: Registered
Joined: 3/13/2020(UTC)
Posts: 20
Sweden
Location: Stockholm

Thanks: 2 times
Ok I look into that instead
wemmy  
#9 Posted : Monday, May 2, 2022 11:19:50 PM(UTC)
wemmy

Rank: Newbie

Groups: Registered
Joined: 5/2/2022(UTC)
Posts: 5
Estonia
Location: Tallinn

Hello,

I was looking similar script for instant replay. when data changes create a new reply event. In vmix language - ReplayMarkInOut.

Unfortunately, I didn't get it to work. So I tried something more simple. Took the same script and just added a value to G1result. Then two cut functions. As I start the script it compares G1result with oldresult and finds that they are not equal so it starts a function and cuts input 4 to program. After 5 seconds, cuts input 3 to program. But now when I change the Headline value nothing happens. So I couldn't find out where the problem in the code. I tried to console.writeline to find out does it store the G1result and for me it seems it doesn't store the new value to G1result.



dim oldresult as string = "0"
dim G1result as string = ""

do while true
G1result = Input.Find("NewsHD.xaml").Text("Headline") 'get current score

if not G1result = oldresult ' check if score has changed
API.Function("Cut", Input:="4") 'do your plingy thingy or use the trigger
sleep(5000) 'wait 5 seconds
API.Function("Cut", Input:="3")
oldresult = G1result 'save the new score
end if
sleep(500) 'lets not check again to quickly

loop
wemmy  
#10 Posted : Wednesday, May 4, 2022 4:18:56 AM(UTC)
wemmy

Rank: Newbie

Groups: Registered
Joined: 5/2/2022(UTC)
Posts: 5
Estonia
Location: Tallinn

Well,

don't know the reason why it didn't work yesterday. I ran the same script today and it worked like a charm.
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.