6.4 Controlling a style’s music response
The Constructor sets up the timing for each portion of the input media given by the user. That is, it selects clips from the video material and arranges pictures into a timeline with many aspects of this construction driven by music characteristics. A style can specify how the constructor goes about doing this by setting several controls, which we describe here.
6.4.1 Segment duration pattern
(segment-durations 2.0 4.0)
6.4.2 Segment duration scaling factor
A (human) music video editor will tend to make slower edits when the music is quiet and faster edits when the music becomes energetic. You can simulate the same effect using what we call a segment duration transfer curve. This curve derives a scaling factor for segment durations as determined by the segment duration pattern depending on the music’s loudness value at the time of the edit.
This transfer curve is specified as follows -
; loudness-level scaling-factor (segment-duration-tc 0.0 scale0 level1 scale1 level2 scale2 .... 1.0 scaleN)
(segment-duration-tc 0.0 1.0 1.0 0.25)
(style-parameters (continuous-slider SPEED 0.0 -2.0 2.0) ....) (segment-duration-tc 0.0 (/ 3.0 (pow 2 SPEED)) 1.0 (/ 0.8 (pow 2 SPEED)))
6.4.3 Transition duration scaling factor
(transition-duration-tc 0.0 2.0 0.65 0.3 1.0 0.3)
If you want to specify cuts, you can use a value of 0.0.
(preferred-transition-duration dur-secs) → void |
dur-secs : number |
(min-segment-duration-for-transition dur-secs) → void |
dur-secs : number |
6.4.4 Time warping
You get an emotionally appealing edit when you introduce slow motion video when the music is soft, speeding up to normal motion when the music activity picks up. You specify such behaviour using the time warp transfer curve.
(time-warp-tc 0.0 1/4 0.5 1.0 1.0 1.0)
6.4.5 Music descriptors
Several descriptors are made available as normal muSE functions.
loudness is a function of time (expressed in seconds since the start of the muvee) and evaluates to the loudness of the mixed music at the given time. It will always yield a value in the range 0.0 to 1.0 and can therefore be used with the with-descriptor function (see About effects and transitions).
Evaluates to a time-value pair (t . v) if a cut hint or a flash hint is present at the given time t, or to () if there’s no such hint at the given time.
These give you the respective hints as a list of (t . v) pairs where the times fall within the given interval [t1,t2).
These give you a cut or flash hint as a (t . v) pair that is somewhere around (t + (beats->secs pref-dur-beats)) and has a maximal value v among the hints near that time.
(New in Reveal X!)
A style can use this to provide additional hints about edit timing to the muvee engine. (The additional hints provided via this function do no affect the cut-hints and flash-hints functions.
hint-type should either be 'cut-hints or 'flash-hints. The list-of-time-value-conses is a list in exactly the same format as the data returned by cut-hints and flash-hints functions. The "value" part of the time-value pairs is expected to be in the range 0 to 1, but it is not necessary for it to conform to that range though less than 0 would not be of much use. It can be greater than 1 though.