On this page:
5.2.1 STAGE 1 : Starting from the S10000_ Blank Template
5.2.2 STAGE 2 : Playing around with editing pace
5.2.3 STAGE 3 : Better PACE control
5.2.4 STAGE 4 : Making the editing pattern respond to music
5.2.5 STAGE 5 : Adding transitions
5.2.6 STAGE 6 : Making transition durations respond to music
5.2.7 STAGE 7 : Adding a MUSIC RESPONSE control
5.2.8 STAGE 8 : Some polish
5.2.9 Now what?
5.2.10 Appendix
5.2.10.1 Mathematical expressions in Scheme

5.2 Basic editing

Tip: Copy-paste the tutorial URL into the muveeStyleBrowser’s address box to get the styles for the various stages.

Here we show you aspects of a muvee style that is likely to cross-cut all the styles that you might develop. It is therefore worth working through the concepts in this tutorial so you can tweak the editing behaviour of your style to match your audio-visual effects. All the action in this tutorial happens in the style’s "data.scm" file so that’s the file to direct your attention to.

    5.2.1 STAGE 1 : Starting from the S10000_BlankTemplate

    5.2.2 STAGE 2 : Playing around with editing pace

    5.2.3 STAGE 3 : Better PACE control

    5.2.4 STAGE 4 : Making the editing pattern respond to music

    5.2.5 STAGE 5 : Adding transitions

    5.2.6 STAGE 6 : Making transition durations respond to music

    5.2.7 STAGE 7 : Adding a MUSIC RESPONSE control

    5.2.8 STAGE 8 : Some polish

    5.2.9 Now what?

    5.2.10 Appendix

      5.2.10.1 Mathematical expressions in Scheme

5.2.1 STAGE 1 : Starting from the S10000_BlankTemplate

Style: S10000_BasicEditing_Stage1

  1. Make sure muvee Reveal isn’t running.

  2. Start by copying the Blank template style. If you’re unsure how to do this, refer to Getting Started. The rest of the tutorial assumes that your style has the id S10000_MyBasicEditingStyle. Do change the name of the style to something like “My basic style” and its description to, say, “A masterpiece in the works.” just so you can distinguish it from the original.

  3. Launch muvee Reveal and your new style will show up in Reveal’s styles panel, ready for action.

At this stage, your style consists of just two lines of code, apart from the comments.
; No parameters yet.
(style-parameters)
 
; Specify a uniform cutting pattern without any segment variations.
(segment-durations 2.0)

This style, although very minimal, already gives you a lot. For example, you can use pictures, video and music with it, your pictures get an automatic Ken-Burns effect based on face detection and your video is automatically summarized to the duration you give, or to the music duration, depending on your setting. Of course, you can use highlights and exclusions on your video to control the content. Your style responds to pretty much everything that the muvee Reveal interface allows you to specify (... except captions, which we’ll defer).

Playing with your new style
Since this tutorial is about editing logic, pacing and music response, we suggest you do at least one of the two below -
  • Add about 50 pictures and 1 minute of music that has significant soft and energetic portions. Then go to the Personalize panel and select Use it all mode. muvee Reveal tries to fit all your pictures into the duration that you specify, therefore if you do not select Use it all, you will not be able to see the effects of pacing changes in this tutorial.

  • .... or add at least 5 minutes of video and 1 minute of music. If you’re adding a longer piece of music, add proportionately more video.

Now select your new style and make some muvees. Try different media, personalization settings, etc. You may notice that captions don’t work yet. We’ll come to that later in this tutorial. If you’re a new-comer to muvee Reveal and automatic editing, you might find the tutorials at the muvee Maniacs forum useful.

If you’ve already installed DrScheme, it will chosen as the editor for .scm files.

To work through the following stages, you’ll need to edit your style’s "data.scm" file. If you have your style open in the muveeStyleBrowser, you can right-click on your style and select the Edit data.scm command to open it in a text editor.

!!! Important Note !!!
Whenever you modify your style’s "data.scm" file and want to see the effect of your changes on your muvee, hold the Shift key and click on the play button in Reveal’s interface. (This facility is available starting from the March 2009 release of muvee Reveal.) The play button usually just plays the muvee if you’ve made, but in this case you want to recompute the muvee and you indicate that by holding down the Shift key as you click the play button.

You now have the beginnings of your style.

5.2.2 STAGE 2 : Playing around with editing pace

Style: S10000_BasicEditing_Stage2

If you played around with the “Stage1” style, you’ll have noticed that your style edits at the same pace no matter what piece of music you give it. “Pace” refers to the overall rate of happenings in the muvee. A faster paced muvee will have more pictures shown per minute than a slower paced one, at the very least. We’ll add some user level control of the editing pace in this stage and follow it up with music driven pace control in the next one.

Add a style parameter named "PACE" and directly specify the segment-durations using PACE -

IMPORTANT: Changing style-parameters needs muvee Reveal to be relaunched to take effect.

; muSE v2
(style-parameters
 ; Specify a PACE slider with a default of 2.0,
 ; a minimum value of 0.5 and a maximum of 8.0.
 (continuous-slider PACE 2.0 0.5 8.0))
 
(segment-durations PACE)

Now when you open the “Style settings” panel, you should see a PACE slider that you can twiddle to make your style edit faster (to the left) or slower (to the right). Notice that even though you make the muvee go faster or slower, the transition points (a.k.a. “cut points”) are synchronized to the music events.

5.2.3 STAGE 3 : Better PACE control

Style: S10000_BasicEditing_Stage3

The PACE slider we defined in Stage 2 above is functional, but is not quite what we’d like. There are two problems with it -
  • Moving the slider to the left causes the style to edit faster and moving to the right causes it to edit slower. This is counter intuitive to the notion of pace.

  • The range from 4x faster to normal speed takes up only about 30% of the slider’s length compared to the range from normal speed to 4x slower. Ideally we’d like both to take up the same range to match our intuition of Nx faster or slower.

This kind of issue arises very often when you are designing sliders for user control and is therefore worth paying some attention to. You always want to make your sliders correspond to the user’s intuition as much as you can - by making it control one independent aspect of the production, making it always increase something when you move it from left to right and by making it increase proportionately.

IMPORTANT: Changing style-parameters needs muvee Reveal to be relaunched to take effect.

To achieve all of that for our PACE slider, we turn PACE into a logarithmic control as follows -
; muSE v2
(style-parameters
 (continuous-slider PACE 0.0 -2.0 2.0))
 
(segment-durations (/ 2.0 (pow 2.0 PACE)))

The expression (/ 2.0 (pow 2.0 PACE)) is the Scheme code equivalent of the mathematical form 2.0 / (2.0 PACE) which becomes 0.5 when PACE is -2.0 (the left extreme point) and becomes 8.0 when PACE is 2.0 (the right extreme point).

If the above way of writing mathematical expressions doesn’t suit you, consider using math to get a more familiar notation. With math, the above segment-durations line becomes -

(segment-durations (math 2.0 / (2.0 pow PACE)))

See Mathematical expressions in Scheme for more discussion on the topic.

We now have a PACE slider that goes from “4x slower” to “4x faster” more evenly than it did before.

5.2.4 STAGE 4 : Making the editing pattern respond to music

Style: S10000_BasicEditing_Stage4

Controlling the pace of your edits using a slider is fine and fun, but if you tried your style with many types of music with some dynamics, you soon begin to want to be able to move the PACE slider depending on the music - for example, you might want to edit faster during the more energetic portions of a music and slower during the softer portions.

Though you cannot control the PACE slider during muvee playback, you can encode the music dependence into your style using the concept called segment duration transfer curve. During music analysis, muvee Reveal computes a loudness function that varies in the range 0.0 to 1.0 over the course of the music. Obviously, during the louder sections of the music, the loudness value is closer to 1.0 and during the softer sections, it is closer to 0.0.

The segment durations scale up and down based on the value of loudness as specified by the segment-duration-tc. Here is what you can add to Stage 3 to get music-dependent editing pace.

(segment-duration-tc ; loudness scaling-factor
                     0.0   6.0
                     0.5   1.0
                     1.0   1/4)

The first column gives the music loudness and the second column gives the scaling factor to be applied to each segment duration when the loudness of the music during the segment is that value. The value of 6.0, for example, says that the editing pace when the loudness value is near 0.0 should be 6x slower than the pace specified by the segment-durations expression. The value of 1/4 for loudness of 1.0 means the cutting pace will be 4x faster than normal pace for loud portions of the music.

You only specify certain “knee” points in the transfer curve and scaling factors for other loudness values will be determined by proportional interpolation.

See "data.scm" for all the style code up to this point. You now have a style whose pace you can control and which responds to the dynamics of the music.

5.2.5 STAGE 5 : Adding transitions

Style: S10000_BasicEditing_Stage5

In our style so far, each segment changes to the next one abruptly. Such a transition is known in editing parlance as a cut. Cuts are effective when the music is energetic and the editing pace is fairly high. However, you can enhance the emotive appeal of the slower parts of your music by using soft transitions when loudness goes low.

First, you’ll need to learn how to add transitions to your style. The most important thing you need to do is to define the muvee-transition symbol to an expression that describes a transition. In our case, we’ll start simple by putting in a cross-fade transition. We’ll stick to this simple transition for now and leave the construction of effects and transitions to a separate tutorial.

(define muvee-transition (effect "CrossFade" (A B)))

Once you add the above expression to the Stage 4 style, you’ll get cross fades *everywhere* instead of cuts.

Basic transition specification

The transition duration is decided by the preferred-transition-duration which defaults to 1.0 when not specified. You can change the value to a smaller value first, to shorten the transition durations for the normal pace case -

(preferred-transition-duration 0.4)

You can disallow transitions for ultra-short segments by changing the “minimum segment duration for transition” setting as follows -

(min-segment-duration-for-transition 0.8)

... which says that if we’re creating a segment that is shorter than 0.8 beats, don’t stick any transitions from or to this segment.

Putting the three together, we have a full transition specification -
(preferred-transition-duration 0.4)
(min-segment-duration-for-transition 0.8)
(define muvee-transition (effect "CrossFade" (A B)))

See "data.scm" for all the style code up to this point.

5.2.6 STAGE 6 : Making transition durations respond to music

Style: S10000_BasicEditing_Stage6

Now we have transitions adding to the character of the style. Play around with it and try different kinds of music. In this stage, we’re going to introduce a subtlety that is often used by human editors, but something that most viewers are seldom aware of - that it is generally nicer to have longer transitions when the music is soft and shorter transitions when the music is energetic.

Like what we did with segment durations in Stage 2 above, we want to tie the transition durations to the music loudness. .. and just like what we did with segment-durations, we have a corresponding transition duration transfer curve to help us specify the relationship.

(transition-duration-tc ; loudness scale-factor
                        0.0    3.0
                        0.5    1.0
                        1.0    0.25)

The first column specifies the loudness value and the second column specifies a corresponding factor that multiplies with the preferred transition duration indicated by the preferred-transition-duration expression.

See "data.scm" for all the style code up to this point.

5.2.7 STAGE 7 : Adding a MUSIC RESPONSE control

Style: S10000_BasicEditing_Stage7

We have a fairly complete basic style now and more importantly we’re aware of all the basic aspects of style authoring that have to do with its editing behaviour. We’ll top it off by wanting just a bit more - to be able to dictate the extent to which we want our style to respond to music. This is a good exercise in parameter design and we’ll leave the details for you to work out as an exercise.

IMPORTANT: Changing style-parameters needs muvee Reveal to be relaunched to take effect.

Specification of MUSIC_RESPONSE
What we want is to add a new control called MUSIC_RESPONSE which when set to 0.0 makes the style behave blandly even if the music is changing wildly from soft to loud and back (as though we did Stage 3 but had transitions), and which when set to 1.0 causes all aspects of the style that we’ve defined so far to respond to music - exactly like Stage 6.

Solution
...

Ok.. here is the full code for stage 7 - "data.scm".

5.2.8 STAGE 8 : Some polish

Style: S10000_BasicEditing_Stage8

In this stage, we’re going to add a bit of polish to the style.

Title -> Body and Body -> credits transitions

In Stage 6, we added transitions, but if you noticed, the muvee begins abruptly after the title ends and at the end of the muvee, it abruptly jumps to the credits section. That’s not very smooth since the main muvee itself uses cross-fades to soften things up. So now we use the same cross-fade transition for the title->body and body->credits jumps as well.

Add the following two lines to the end of your "data.scm" file -

(muvee-title-body-transition muvee-transition 0.5)
(muvee-body-credits-transition muvee-transition 0.5)

Since we’ve already defined muvee-transition, we can re-use that for the title->body and body->credits transitions. Of course, you can use different transitions for these if you want to.

Try it out. Looks better?

Captions

If you’d added captions for your pictures or video, you might have noticed that they didn’t turn up when you viewed your muvees. This is because each style has to explicitly describe how captions are to be presented and we haven’t done that yet for our new style.

You can easily specify a “standard treatment” for captions by defining muvee-segment-effect to muvee-std-segment-captions.

(define muvee-segment-effect muvee-std-segment-captions)

muvee-std-segment-captions scans all the captions that need to be presented during its application period and shows them as indicated in muvee Reveal’s captions UI. Since it is a normal effect, it is possible to combine this with other effects to create more sophisticated captions like those in muvee Reveal’s Reflections style. We’ll defer that to another tutorial.

Strings

When you open your style’s settings panel, you see ugly looking names for your parameters and their ranges - PACE, PACE_MIN, PACE_MAX, etc. Lets clean that up by writing down some nice labels for our precious user-level controls, since we put in so much effort into getting them behave nicely.

The key file here is "strings.txt", which you can edit by right clicking on your style in the muveeStyleBrowser and selecting Edit strings.txt.

Your current strings.txt file probably contains the following two lines -

STYLEDESC       en-US   A masterpiece in the works.
STYLENAME       en-US   My basic style

Each line in the "strings.txt" file specifies three items separated by a single <tab> character -
  1. The ID of the string.

  2. The language code.

  3. The string for the ID in that language code.

So, for example, the line

STYLENAME       en-US   My basic style

says - STYLENAME’s US-English text is “My basic style”.

You can add similar strings for each parameter that your style exposes. muvee Reveal’s UI will look up these strings and use them instead of showing PACE, PACEMIN etc.

So edit your "strings.txt" and add the following lines -

PACE    en-US   Pace
PACE_MIN        en-US   Slow
PACE_MAX        en-US   Fast
MUSIC_RESPONSE  en-US   Music response
MUSIC_RESPONSE_MIN      en-US   Inverse
MUSIC_RESPONSE_MAX      en-US   Normal

WARNING: Do not copy-paste the above lines into your strings.txt. Copy from the original file "strings.txt" instead to get the correct formatting.

Here is a link to the "strings.txt" file.

Localization

Ideally, you’ll want your strings to be localized in all the languages that you want your style to work on, but we’ll stop with English for the moment. You can take a look at the "strings.txt" files in muvee Reveal’s bundled styles for examples of how to add UTF-8 encoded strings in other languages. Its not very different from what we did here, you just need to know the language codes.

5.2.9 Now what?

You now have a style that shows interesting music response characteristics and does some simple transitions. You now also know how to get there in an incremental fashion. You can go ahead and add more complexity to your style to make it more interesting and our documentation and discussion group are there to help you get to where you want to go.

5.2.10 Appendix
5.2.10.1 Mathematical expressions in Scheme

In Scheme, operators always come first in (....) expressions. It is easy to get used to it if you read these expressions operationally - for example, (/ (+ a b) (- a b)) can be read as divide the sum of a and b by the difference of a and b”.

The Scheme notation is unambiguous and no explanation is needed beyond the operator first rule. If you need regular mathematical notation, you can write the same expression as

(math (a + b) / (a - b))

IMPORTANT: You *must* leave a space surrounding the mathematical operators. You cannot write (math a*b+c), for instance. You must write (math a * b + c). This is because a*b+c is a valid Scheme symbol.

The math form supports the following kinds of expressions -
(math a + b) = (+ a b)
(math (sin x) * (cos y)) = (* (sin x) (cos y))
(math (a * b) + c) = (+ (* a b) c)
(math a * b * c * d) = (* a (* b (* c d))) = (* a b c d)
(math a * b + c) = (math a * (b + c)) = (* a (+ b c))
(math a * b + c * d) = (math a * (b + (c * d))) = (* a (+ b (* c d)))
(math (a * b) + (c * d)) = (+ (* a b) (* c d))