Kris, Jef, etc. - Toaster Script to play DDR

To those of you who understand ToasterScript...

I'm looking to make a DVE transition with a soundeffect played from a DDR.

I've figured out how to do some of these commands individually, but I'm having trouble putting it all together... and I don't even know if it will work.

Basically I would like to do the following by pressing a keystroke shortcut:

Focus to DDR3
Play MP3 that is loaded in DDR3 (keystroke "k" for play)
Focus to switcher
Auto (transition)

Does anyone have suggestions for how to do all of this with Toaster Script? My main problem is figuring out how to get the focus to DDR3 and playing the MP3 that is loaded.

Thanks

Brian
 

kltv

Active member
You should be able to pull that off. I'd base this script in the switcher module, putting it in the user scripts for that module.

I'd try something like this:
Code:
CreateShortCut( "Alt Space" code( 

   //------------send DDR 3 play command----------
   SetFocusToWindow( "VideoEditor_DDR", 3)
   FindModule( VideoEditor_DDR ) :	{
	ts_PlayOrStopDDR()
        }

   //------------auto trans----------
   Auto()

   ) "Always" 2000)

I haven't tried that out, but it works in my head...
Kris
 
Kris -- thanks!

It looks like this is first taking the focus to the correct DDR because it highlights the box, but the play command isn't working. I can't find any reference to "ts_PlayOrStopDDR()" anywhere online... is there another way to try playing the DDR?

I know the keyboard shortcut "k" plays the DDR. Any way to make the ToasterScript "type" the letter k?

Thanks again.
 

kltv

Active member
Hmm... "ts_PlayOrStopDDR()" is supposed to be what pressing "K" does according to the shared ToasterScript file. If you look in the "C:\Program Files\NewTek\VT5\DDR2\MainWindow\Common Support\" folder for the Shared.ToasterScript file, you'll find lots of little gems you can use as well. It might be that you can't use those particular types of commands from the switcher module itself using FindModule. You might be limited to hard coded stuff.

You could try just replacing ts_PlayOrStopDDR() with SetSpeed(1) instead. That should do it too. I'll try and test that out later.

Kris
 
Last edited:

kltv

Active member
One more thing

You might need a SetPause() too... Just in case the DDR ends up paused.

Code:
CreateShortCut( "Alt Space" code( 

   //------------send DDR 3 play command----------
   SetFocusToWindow( "VideoEditor_DDR", 3)
   FindModule( VideoEditor_DDR ) :	{
	SetPause(false)
	SetSpeed(1)
        }

   //------------auto trans----------
   Auto()

   ) "Always" 2000)
 
Alright, we're getting there. One more question though...

This works the first time when the DDR when the MP3 is either stopped or in Play/Pause.

However, once the clip is done playing, it remains idle at the end of the clip.

Then the next time I try this ToasterScript, it tries to play the MP3, but it is at the end of the clip.

Is there a ToasterScript for "ctrl k" or "Home" ... which would take the MP3 clip back to the beginning of the clip?

Thanks!

Brian
 

kltv

Active member
Sure is... This should add in the functionality of the "Home" shortcut.

Code:
CreateShortCut( "Alt Space" code( 

   //------------send DDR 3 play command----------
   SetFocusToWindow( "VideoEditor_DDR", 3)
   FindModule( VideoEditor_DDR ) :	{
	SelectFirst(true) 		
	UpdateInOutPanelSel()
	Position = GetProjectStartTime(false)
	SetPosition(Position)
	SetPause(false)
	SetSpeed(1)
        }

   //------------auto trans----------
   Auto()

   ) "Always" 2000)
 

PIZAZZ

NewTek System Integrator
Cool. Glad I could help.

Kris

Glad I could help too. ;)
Been tied up with NAB and then a big event last Friday. Finally getting some time to check the boards.


I took a different route with a client. We built VTedit projects with the switcher cues embedded along with the sound effect swoosh. Each replay is sponsored by a couple different sponsors depending on which quarter or half.

I will try to post the project later this week.
 
Top Bottom