Play All 1 – scripts

A Scripted Play All solution

By Hal MacLean

Download the project files

One of the most frequent questions is how to create a ‘play all’ situation when the disc has been built using individual tracks. One of the problems with this is that the issue is dealt with in the (otherwise very good) DVD Studio Pro manual but they only provide the rudimentary scripts and don’t go to the depth that is necessary to make the system bombproof.

The theory behind this system is easy enough – if the user chooses to play a single track, do that and then return to the menu. If they have chosen to play ALL of the tracks, then go to each in turn and then go back to the menu.

Easy enough, right?

However, lots of ‘what if…’ scenarios immediately spring to mind. For example, what if the user is in a play all and wants to go for a cup of coffee. They press the menu button to pause playback, knowing that they can press it again to resume from where they were. Or, what if the user finishes halfway through the play all and doesn’t want to continue? They go back to the menu and then select an individual clip, but the scripting is locking them in to a play all situation.

Both of these are very real possibilities and you need to find ways around them. There are several, fortunately, but for this tutorial we will focus on just one, and whilst it is a bit long winded, it does help keep the logic behind the scripting clear – all of the scripts are short and easy to follow.

In the tutorial files we have five clips set up as five individual tracks. The scripting used does several things. Firstly, if all clips are to play back the system sets a value in to a GPRM and at the end of each clip checks to see if it is still there. If it is then the playback goes to the next track. If not then playback goes to a menu. On the other hand, if the user has selected a single clip then any earlier stored value is removed and the clip plays. At the end a quick check looks for the value and if it isn’t there then the menu plays again.

It has been enhanced a little by using the last selected button number to remember where on the menu the user was. For simplicity this has been hard coded into the scripts, but you could just as easily make this dynamic and make use of ‘GPRM Based Button Jumps’.

So the flow through the disc is as follows:

play all logic

As you can see, each time the user selects a button on the menu you send them to a script. Each time a track finishes they also go to a script. In this tutorial the scripts are either set to play a single clip and go back to the menu, or set to go on to each track in turn. It is all ‘hard coded’ – that is, each jump is written out by the user and nothing is set up to automatically evaluate what the next action should be. It is possible to automate this playback scripting, but I advise you learn the theory here before going on to more advanced techniques.

You can download the project files needed to build this example, and investigate how they have been set up. If you’d like a more streamlined version of how to do this, log in and leave a comment so that we can get back to you directly.