Tutorial: Page (1) of 1 - 07/20/05 Email this story to a friend. email article Print this page (Article printing at MyDmn.com).print page facebook

GPRMs and GPRM Partitions in DVD Studio Pro 4

Part 1: An overview of the basics By Dave Nagel
You've seen by now that DVD Studio Pro 4 has added a new feature for partitioning GPRMs. What most of you are probably asking yourselves is, "Why in the bejonkers would I want to do that?" The answer is simple: You want to add more interactivity to your DVD presentation. In this installment in our series on DVD Studio Pro 4's new workflow features, we'll take a look at GPRM partitioning: what it means, why it works the way it does and when you can and can't use it. Next time around, we'll take a look at the specifics of how to partition a GPRM and use a partition in a script.

In versions of DVD Studio Pro prior to 4.0, you were limited to eight general purpose register memories (GPRMs). And what this meant is that, in terms of scripting, you were limited basically to eight interactive features. Granted, not all interactivity in a DVD has to be based around GPRMs, but most of it is. And once you get past the storage of preferences for audio format, language, subtitles and various options (commentary, deleted scenes and the like), you weren't left with a whole lot of room for doing anything else. A number of the scripts we've covered in the past have used up to four GPRMs alone--and that's just for one type of interactive feature (such as an interactive quiz).

So clearly there are cases when you need more than eight GPRMs in order to include all of the features you want for your DVD. What DVD Studio Pr 4 has done is to allow you to break (partition) the eight available GPRMs into smaller GPRMs, giving you more places to store and retrieve information for your interactivity.

GPRM basics
Before we get into the details of GPRM partitioning, I thought this might be a good time to review the basics of GPRMs and their relation to scripting. For those of you who are new to scripting, you can find links to detailed beginner tutorials at the end of this article. But, in short, a GPRM is simply a place to store numbers that you then use as the basis for doing something else later on.

For example, let's say you want to create a button that will set the user's preference for audio for a particular track. The user clicks on "English 5.1 Surround." Well, one way to handle that is to store a value in a GPRM that means, in terms of your DVD, "set the system stream for track 1 to the 5.1 surround steam." So you create a script that sets a value of 2 (or whatever, as this is an arbitrary number) in GPRM 1 (or whatever) when the person clicks this button.

Now, when it comes time to play the track, you have another script that looks up the value set in GPRM 1. You might have a script at the beginning of the track that says, basically, play audio stream 1 if the value in GPRM 1 is 0. Or play audio stream 2 if the value in GPRM 1 is 1. Or play audio stream 3 if the value in GPRM 1 is 2. (If you want examples of how to do this in real-workld applications, take a look at some of the links at the end of this article.)

All well and good.


But if you have more than one track with separate options for each track, you'll need to use separate GPRMs for each one. Otherwise the values you have stored in a particular GPRM will be overwritten the next time a user chooses a different option for a different track. Then the user will have to go back and reset the audio options for the first track later.

I know this doesn't sound terribly likely to happen, but it has indeed happened that GPRMs get cross-contaminated, as it were, resulting in a flawed user experience. Something like this happened in the commercial DVD release of one of my favorite recent movies, which forces me to eject the disc anytime I play it and want to view particular scenes again. Very annoying.

So you will want to use separate GPRMs for each particular interactive feature you add to your DVD. And that means running out of GPRMs quickly. Hence the need for partitioning.

Numerical limits in partitioned GPRMs
Now, in DVD Studio Pro 4, you can overcome the limitations of eight GPRMs by partitioning these GPRMs into smaller units. What this means, basically, is that you wind up with more places to store information, although each one of these places can store less information than an unpartitioned GPRM. Considerably less. (Please note that there's a flaw in DVD Studio Pro 4's interface in this regard. We'll get to this at the end of this section.)

And what this means is that you can't always use the partition feature.

Why?

A full GPRM (non-partitioned) is a 16-bit GPRM. In other words, it can store 16 bits of information. A bit contains a 0 or 1, and combinations of these 0s and 1s make up numbers that we use in the real world. With 16 bits, you have 16 places in which to store your 1s and 0s, such as 1001001001001011. But when you split a GPRM, you take down the number of bits available. SPlitting a GPRM in two means that you're left with two 8-bit GPRM partitions, which each allow only eight places for storing 1s and 0s (such as 01010101). Cut these in half again, and you're left with four 4-bit GPRM partitions, each capable of storing only four spaces of binary information (such as 0101). In DVD Studio Pro, you can use the following GPRM partition configurations: one partition (same as not partitioned), two 8-bit partitions, four 4-bit partitions, eight 2-bit partitions or 16 single-bit partitions.

The more partitions you create, the less information each partition can hold. And there are some cases where you need the full 16-bit capacity, such as when you want to store information in a GPRM that's captured from an SPRM.



The only truly feasible way in which to use GPRM partitions is when you're putting the information into the GPRMs manually (as in the example in the previous section) so that you can always control the size of the information being stored there.

I've shown you what bits mean in terms of binary numbers. And each of these binary numbers has a real-world equivalent.

A 16-bit register can store numbers 0 through 65535. (That's the binary equivalent of 0000000000000000 through 1111111111111111.)

An 8-bit register can store numbers 0 through 255. (That's the binary equivalent of 00000000 through 11111111.)

A 4-bit register can store numbers 0 through 15. (That's the binary equivalent of 0000 through 1111. For your information, these are expressed as 0000 (0), 0001 (1), 0010 (2), 0011 (3), 0100 (4), 0101 (5), 0110 (6), 0111 (7), 1000 (8), 1001 (9), 1010 (10), 1011 (11), 1100 (12), 1101 (13), 1110 (14) and 1111 (15).)

A 2-bit register can store numbers 0 through 3. (That's the binary equivalent of 00 through 11. Again, for your information, this is owing to the fact that a two-bit number can be expressed as 00, 01, 10 or 11, which equate to 0, 1, 2 and 3, respectively.)

And a 1-bit register can express only numbers 0 and 1.

Therefore the number of partitions you create in any single GPRM will be determined by how much information you need to store there. In other words, how large the number will be that you place into that register and whether that number can be expressed as a binary given the number of bits available. Can you stick a number like 152 into a 4-bit GPRM partition? No, because it can't be expressed as a binary that has only four places. You'd need to use an 8-bit GPRM partition to store a number that large.

But a 4- or 2-bit GPRM partition can easily handle the stored values for a choice between a few audio streams. In the example we used in the first section, we had three audio stream choices, whose reference values we'd store in a GPRM as 0, 1 or 2.

Now, it's obviously important for you to know the limits of the  various partition configurations simply because you need to know what you can and can't store in in partitioned GPRMs. The other reason that it's important to know it is that DVD Studio Pro 4 will actually allow you to place larger numbers into the value fields in a partitioned GPRM than you can actually use in the end.

In a regular (unpartitioned) GPRM, if you enter any number larger than 65535, DVD Studio Pro will automatically reduce it to the 16-bit maximum of 65535 for you. (For example, enter the value 99999, and then hit the Enter key, and the number will be switched to 65535, as seen in the screen shots below.)



However, once you start messing around with partitions, DVD Studio Pro stops paying attention to this sort of thing in the Inspector palette. It doesn't actually allow numbers that are too large to be placed into a script; but in terms of the interface, the largest possible value will not be adjusted for you in the Inspector palette, which could cause you some trouble later on. In the screen shot below, you see that the Inspector palette is allowing me to enter a value of 99999 in GPRM 1 Partition 2, while the actual Script Editor window has adjusted the value to the true maximum of 255.



This isn't a critical flaw. In fact, if I click on a different command, then come back to this command, the number will be adjusted for me in both the Script Editor and the Inspector palette. It's just something you should be aware of.

Next time around we'll look at the specifics of how to partition GPRMs and use the partitions in a script. If you have any questions in the meantime, be sure to visit me in DMN's DVD Studio pro forum by clicking here.

And, of course, if you want to read any of our previous tutorials on DVD Studio Pro, you can find them by clicking on the links below.


DVD Studio Pro Scripting, Series 1
DVD Studio Pro Scripting, Series 2
Other scripting articles
General design and authoring topics



Page: 1


Related Keywords:apple dvd studio pro 4, gprm partitioning

HOT THREADS on DMN Forums
Content-type: text/html  Rss  Add to Google Reader or
Homepage    Add to My AOL  Add to Excite MIX  Subscribe in
NewsGator Online 
Real-Time - what users are saying - Right Now!

Our Privacy Policy --- @ Copyright, 2015 Digital Media Online, All Rights Reserved