Previous topicNext topic

Videos to only play when I hit the music play button...

Questions, comments, feedback, etc.
Post Reply
SpaceTraveller
Posts: 41
Joined: Fri Mar 12, 2021 10:33 pm

Videos to only play when I hit the music play button...

Post by SpaceTraveller »

There might be a simple answer hopefully,

But with a few scenes of video all connected to the main scene - how do I prevent these videos playing until I start the music on the input sources window so they all start at the same time?

All stopping when I hit stop would be great too...


Any help greatly appreciated...
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Videos to only play when I hit the music play button...

Post by Sadler »

I think you asked this question before: https://magicmusicvisuals.com/forums/vi ... 84&p=10801
SpaceTraveller
Posts: 41
Joined: Fri Mar 12, 2021 10:33 pm

Re: Videos to only play when I hit the music play button...

Post by SpaceTraveller »

Sadler wrote:I think you asked this question before: https://magicmusicvisuals.com/forums/vi ... 84&p=10801

Yes - I never did find a suitable outcome -I was hoping this could now be done in house (just using MMV) but sadly not :(

Here's hoping for the future :idea:
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Videos to only play when I hit the music play button...

Post by Magic »

I tinkered for a few minutes and came up with something that:
1) rewinds a VideoFile module when the Input Sources file rewind button is clicked
2) pauses a VideoFile module when the Input Sources file pause button is clicked
Screen Shot 2022-04-15 at 9.30.54 AM.png
Screen Shot 2022-04-15 at 9.30.54 AM.png (268.1 KiB) Viewed 2549 times
The first expression is: if(x-xp=0, 0, 1)
Which, in this case, means that if the current playback time (x) is the same as the previous playback time (xp), set the speed to 0 (paused); else set it to 1 (normal)

Therefore it's important to know that xp is a reserved variable in the Expression modifier which stores the previous input value, whereas x is the current input value. This allows you to compare them.

The second expression is: if(x=0, 1, 0 )
Which, in this case, means that if the playback time is 0, trigger a rewind; otherwise don't do anything else.

Hope that helps!
SpaceTraveller
Posts: 41
Joined: Fri Mar 12, 2021 10:33 pm

Re: Videos to only play when I hit the music play button...

Post by SpaceTraveller »

Thanks for that Eric; I look forward to trying it out further... ;)
Post Reply