Andrea continues adding index entries + revisions as needed
[goodguy/cin-manual-latex.git] / parts / Keyframes.tex
index 4ef4af440c54ce52315f9855e018ef779f695ee9..f1b05ebe11d5fdb4b0fc1452a4f3bcdda7d531ff 100644 (file)
@@ -1,7 +1,7 @@
 \chapter{Keyframes}%
 \label{cha:keyframes}
 
-The word \textit{keyframe} has at least 3 contextual meanings in the NLE environment.  First, the oldest meaning, is the \textit{I-Frame} definition used in codecs algorithms.  These are \textit{key} frames that begin a new sequence of pictures, and are anchor points for repositioning (seeks).  Next are the automation parameter data points.  These are usually input to primitive math forms, like translation and zoom.  And last are blobs of data that are chunks of parameters to plugins that can do almost anything.  The data can be a simple value, like a fader value, or more complex like a group of points and colors in a sketcher plugin keyframe.  The word keyframe has changed a lot in meaning.  In the context of \CGG{}, keyframes are data values that have been associated to the timeline which affect the media presentation.  So a keyframe no longer refers to a frame, but to a position on the timeline.
+The word \textit{keyframe} has at least 3 contextual meanings in the NLE environment.  First, the oldest meaning, is the \textit{I-Frame} definition used in codecs algorithms.  These are \textit{key} frames that begin a new sequence of pictures, and are anchor points for repositioning (seeks).  Next are the automation parameter data points.  These are usually input to primitive math forms, like translation and zoom.  And last are blobs of data that are chunks of parameters to plugins that can do almost anything.  The data can be a simple value, like a fader value, or more complex like a group of points and colors in a sketcher plugin keyframe.  The word keyframe has changed a lot in meaning.  In the context of \CGG{}, keyframes are data values that have been associated to media on the timeline which affect the media presentation.  So a keyframe no longer refers to a frame, but to a position on the timeline.
 
 In \CGG{}, there are two general types of keyframe data,
 \textit{automation keyframes} (autos) which are drawn as colored
@@ -12,12 +12,12 @@ track. \includegraphics[height=\baselineskip]{auto.png} Auto
 $\leftarrow$ Keyframe $\rightarrow$ Plugin
 \includegraphics[height=\baselineskip]{plugin.png}
 
-\section{Automation Keyframes,/\,Autos}%
+\section{Automation Keyframes /\,Autos}%
 \label{sec:automation_keyframes_autos}
 
 The \textit{autos} are created by clicking on an \textit{automation curve} to establish the time position for the new keyframe anchor point.  The basic nature of these simple auto values make them primitive operations that are easy to apply when needed.
 
-There are many automation curve types, and most are not normally visible or clickable.  To make them visible, use the \texttt{View} pulldown, or open the \texttt{Window $\rightarrow$ Show Overlays}. This window allows toggling of the parameters in the View pulldown but is more convenient because you can leave the window up to change values quickly.  If all of the automation curves are turned on, the timeline will be quite cluttered, and so usually only the parameters of interest are enabled during use.  When keyframes are selected, they are drawn on the timeline over the tracks to which they apply.  The keyframe is represented on the timeline as a little square on the curve, for example as in fade, or as a symbol as in a mask.  This square, timeline attachment point, can be used for positioning by clicking on a keyframe anchor and using drag and drop to set the new position.
+There are many automation curve types, and most are not normally visible or clickable.  To make them visible, use the \texttt{View} pulldown, or open the \texttt{Window $\rightarrow$ Show Overlays}. This window allows toggling of the parameters in the \textit{View} pulldown but is more convenient because you can leave the window up to change values quickly.  If all of the automation curves are turned on, the timeline will be quite cluttered, and so usually only the parameters of interest are enabled during use.  When keyframes are selected, they are drawn on the timeline over the tracks to which they apply.  The keyframe is represented on the timeline as a little square on the curve, for example as in fade, or as a symbol as in a mask.  This square, timeline attachment point, can be used for positioning by clicking on a keyframe anchor and using drag and drop to set the new position.
 
 The automation keyframes include:
 
@@ -25,7 +25,7 @@ mute/play audio; camera translation x,y and zoom; projector translation x,y and
 
 Except for the mask auto, the values are all simple numbers.  Mute is different from the other autos in that it is simply a toggle of either on or off.  Mute keyframes determine where the track is processed but not rendered to the output.  An example usage would be to use auto keyframes to fade in a clip by setting the transparency to $100\%$ at the first keyframe and adding another keyframe 5 seconds later in the timeline with a transparency of $0\%$.
 
-The Keyframes pulldown on the main timeline is used for Cut, Copy, Paste, Clear, Change to linear, Change to smooth, Create curve type of Smooth, Linear, Tangent, or Disjoint, Copy default keyframe or Paste default keyframe.  If you right click on a curve keyframe on the timeline, a set of options popup including the choices \textit{keyframe type} (such as Fade, Speed, etc.), Hide keyframe type, Delete keyframe, Copy keyframe, smooth curve, linear segments, tangent edit, or disjoint edit.
+The \textit{Keyframes} pulldown on the main timeline is used for Cut, Copy, Paste, Clear, Change to linear, Change to smooth, Create curve type of Smooth, Linear, Tangent, or Disjoint, Copy default keyframe or Paste default keyframe.  If you right click on a curve keyframe on the timeline, a set of options popup including the choices \textit{keyframe type} (such as Fade, Speed, etc.), Hide keyframe type, Delete keyframe, Copy keyframe, smooth curve, linear segments, tangent edit, or disjoint edit.
 
 Usually, the use of the keyframe values are more pleasing when the data varies smoothly between keyframe anchors on the timeline.  This is useful in many cases that are familiar, like a video fade in/out, or audio pan between channels.  To make the auto value change smoothly as the media is played, the keyframes auto values are points on curves that are created according to the design of the effect.  Most of the primitive types can create anchor points on curves that are piecewise linear, smooth, sloped, or broken at the keyframe anchor points.
 
@@ -52,7 +52,7 @@ To make it easier to navigate curve keyframes, since there is not much room on t
     keyframe on each of the tracks in the exact same position.
     \item Left mouse click on a keyframe position will show the numerical value in a yellow tooltip-like box.
     \item Right mouse click on the curve type line will bring up the option of \textit{Hide keyframe type}.   This
-    provides the same functionality as disabling the keyframe type in the View pulldown menu.  Often it
+    provides the same functionality as disabling the keyframe type in the \textit{View} pulldown menu.  Often it
     helps to use this in order to be able to see other things on the timeline once it gets cluttered.
     \item Fade and speed allow for setting a specific value for the keyframe using the following:
     \begin{enumerate}
@@ -108,7 +108,8 @@ audio, with a double click. The curves to be affected must be both armed and gan
 patchbays to be included in the operation. You can see the advantage of having different media types
 ganged the same so that they will remain synchronized.  However, if as recommended you have Settings of \textit{Align cursor on frames} set, video will always snap to a frame, whereas audio does not.  Because the smallest pieces are audio and not video, when video is present in order to maintain synchronization be sure to do the double click on the video track.  The single/double click feature also works in the same manner for Fade Automation.
 
-The conversion algorithms that calculate the duration are approximate, not exact.   Speed is not checked when inserting media on a track that already has speed adjustments so duration will not be corrected in that case.  You can not do negative time and you can not play backwards.
+The conversion algorithms that calculate the duration are approximate, not exact.   Speed is not checked when inserting media on a track that already has speed adjustments so duration will not be corrected in that case.  You can not do negative time and you can not play backwards.  When working with edits and the speed auto, if you make a \textit{cut} in a section, the speed curve values should not change over the remaining playable edits.  It is
+possible to easily add \textit{disjoint} curve points at the boundaries of the edit to preserve the curve shape.
 
 Steps to demonstrate Auto Gang of Speed/Fade on all of the audio and video tracks are listed below:
 
@@ -139,6 +140,94 @@ Figure~\ref{fig:always} shows orange keyframes and lines for the ganged speed au
 
 One other helpful item is a small colored indicator in the zoombar \textit{Automation Type} box when you have clicked on an auto line.  It will be the same color as that line so you can easily see out of the corner of your eye what that line refers to.  This is especially useful for the Camera and Projector X,Y,Z lines which are often right on top of each other.  In addition the status bar will have the colored indicator to the left of the last auto value when that status is visible.
 
+\section{Bump autos}%
+\label{sec:bump_autos}
+
+Bump autos are a kind of floating point keyframe that differs from the rest
+of the floating autos, like smooth and linear, in that they have two values:
+
+   a left edge and a right edge value.
+
+The presence of a \textit{bump} creates boundaries
+to regions on the timeline.  The region begins at that bump, and extends to
+the next bump auto.  If the bump \textit{span} toggle is set, then adjusting the
+left/right edge value will raise or lower all of the auto values in the
+bump region.  For example, if you put a speed bump in at 1.0 secs and
+another at 2.0 secs on the timeline, and adjust the right edge of the first auto to
+speed 3.0, then the first region of playback (between 0.0 and 1.0 secs) will
+play at normal speed, the next region (between the speed bumps) will play
+at 3x, and the last region (after the 2.0, which moved to 1.333 after speed up)
+will play at normal speed (figure~\ref{fig:bump-autos-04}).
+
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.6\linewidth]{bump-autos-04.png}
+       \caption{range from left keyframe to right keyframe}
+       \label{fig:bump-autos-04}
+\end{figure}
+
+Adjusting the \textit{bump} edge values when \textit{span} is on modifies all of the keyframes between edges of bumps, or to the beginning or end of media if there are no bumps to end the bump region.  Turn \textit{span} off if you only want to change the edge value without modifying the region values.
+
+\paragraph{Technical Insight:} The \textit{bump} is a kind of FloatAuto, an element in an automation list that is one of the 12 automation types of keyframe lists:
+
+\qquad \textit{mute, cam\_x,y,z, proj\_x,y,z fade, pan, mode, mask, speed}
+
+which are part of the Track.  A FloatAuto is one of 4 auto \textit{value} types
+that are stored in the auto at the keyframe position: \texttt{float, mask, int,
+pan}.
+
+A FloatAuto stores a floating value for the automation at a position on
+the track.  When a FloatAuto \texttt{get\_value} is invoked at a track position, the
+position is used to access a previous and next auto list element values
+based on the \textit{current} position.  The returned value is generated using
+one of 5 modes of curve interpolation: smooth, linear, tangent, disjoint, bump.
+
+When a FloatAuto is created, it gets a list default value.  This varies
+by auto type speed=0, fade=100, ..., and at position 0, but this is almost
+always immediately changed to a value specified for the current position,
+a value/mode you specify in the sliders and drag values of the GUI updates.
+
+The best way to create bump keyframes is highlight a region and then:
+
+\texttt{Keyframes $\rightarrow$ Create curve type $\rightarrow$ bump}
+
+\texttt{Keyframes $\rightarrow$ Create keyframes $\rightarrow$ speed} (or other)
+
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=1.0\linewidth]{bump-autos-01.png}
+       \caption{Bump autos creation}
+       \label{fig:bump-autos-01}
+\end{figure}
+
+However, you can also create them by clicking or double-clicking on the curve, then:
+
+\texttt{RMB $\rightarrow$ bump}
+
+\texttt{RMB $\rightarrow$ speed} (or other)
+
+Make sure that the keyframes at the edges are bump type, span is active and that the left edge is set to the right (if we want to change the next interval). Changing the \textit{Left/Right Edge} and \textit{Span} options will involve all the autos of the curve. Actually the changes concern the whole curve, not the individual keyframes.
+
+\textbf{Warning}: bump autos works only via slider. Dragging the keyframe with the mouse makes you lose the \textit{right/left edge} and \textit{span} settings and behave as normal autos (figure~\ref{fig:bump-autos-02}).
+
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.5\linewidth]{bump-autos-02.png}
+       \caption{Speed autos slider}
+       \label{fig:bump-autos-02}
+\end{figure}
+
+With using the sliders on a track, the keyframes ganged track are changed if the positions match; tracks can be excluded by switching the track gang mode off. Another way to edit all armed tracks of all types at the same time is as follows:
+
+\begin{itemize}
+       \item disable \textit{Master track} of all tracks except the first one, on which we will work.
+       \item switch to \textit{gang media} mode. Now only the Master track is visible, but every change made on its keyframes is also applied to the other tracks. (see \nameref{sub:displaying_tracks_ganged})
+\end{itemize}
+
+In the Camera and Projector tools configuration window you will find the \textit{Bump curve}, \textit{Span} and \textit{Rigth/Left Edge} buttons. The Camera-XYZ and Projector-XYZ curves can also create and use Bump autos. (see \nameref{ssub:camera_and_projector_menu})
+
+\paragraph{Note:} do not confuse the autos bump span button with the keyframes span button of the plugins (on MenuBar); they are different and work differently (see \nameref{sec:allow_keyframes_spanning}). With the plugin keyframes, the update is done by first creating a textual \texttt{diff} on the xml values of the plugin keyframes, then applying that diff to all of the keyframes selected in the \textit{span} range.  The bump FloatAuto \texttt{bump\_update} subtracts the old and new values to create a \texttt{diff} that is added to all of the values in the [\textit{right\_edge $\dots$ auto values $\dots$ left\_edge}] region created by bump autos and media endpts.
+
 \section{Plugin Keyframes}%
 \label{sec:plugin_keyframe}
 
@@ -153,7 +242,7 @@ is usually due to the nature of the keyframe parameter data.  For example, it do
 For plugins, there is a special hidden keyframe, called the \textit{default keyframe}, that is used when no previous keyframe exists.  It is like keyframe zero on the timeline, and it is persistent and shared on
 all sessions.  The intent is to make a parameter set that is likely to be reused on all initial instances of the plugin.  An example may be to color correct a set of media that was taken in low light, or needs resampling to be played correctly.  The default keyframe is \textit{off the bar on the left side} of the plugin title bar and can not be seen.  It is used when there is no \textit{previous} keyframe for its default values.
 
-It may be useful to create a default keyframe which has specific desirable values for later use.  To do this, set the timeline to position 0 and be sure to disable \textit{generate keyframes while tweaking}.  This will create a default keyframe at the beginning of the timeline which contains global parameters for the entire duration.  Or if you have copied a non-default keyframe via Keyframes pulldown \textit{copy default keyframe}, it can be stored as the default keyframe by calling \texttt{keyframes $\rightarrow$ paste default keyframe}.  After using paste default keyframe to convert a non-default keyframe into a default keyframe, you will not see the value of the default keyframe reflected until all the non-default keyframes are removed.
+It may be useful to create a default keyframe which has specific desirable values for later use.  To do this, set the timeline to position 0 and be sure to disable \textit{generate keyframes while tweaking}.  This will create a default keyframe at the beginning of the timeline which contains global parameters for the entire duration.  Or if you have copied a non-default keyframe via \textit{Keyframes} pulldown \textit{copy default keyframe}, it can be stored as the default keyframe by calling \texttt{keyframes $\rightarrow$ paste default keyframe}.  After using paste default keyframe to convert a non-default keyframe into a default keyframe, you will not see the value of the default keyframe reflected until all the non-default keyframes are removed.
 
 The \texttt{keyframes $\rightarrow$ copy default keyframe} and \\
 \texttt{keyframes $\rightarrow$ paste default keyframe} allow conversion of the default key-frame to a non-default keyframe.
@@ -161,7 +250,7 @@ The \texttt{keyframes $\rightarrow$ copy default keyframe} and \\
 \texttt{Keyframes $\rightarrow$ copy default keyframe} copies the default keyframe to the clipboard, no matter what region of the timeline is selected.
 The \texttt{keyframes $\rightarrow$ paste} \texttt{keyframes} function may then be used to paste the clipboard as a non-default keyframe.
 
-\textit{Typeless keyframes} enabled under the Settings pulldown allow keyframes from any track to be pasted on either audio or video tracks.  Ordinarily audio keyframes can only be pasted to another audio track and video keyframes can only be pasted to another video track.
+\textit{Typeless keyframes} enabled under the \textit{Settings} pulldown allow keyframes from any track to be pasted on either audio or video tracks.  Ordinarily audio keyframes can only be pasted to another audio track and video keyframes can only be pasted to another video track.
 
 \section{Keyframe \textit{Edit Params} for Plugins}%
 \label{sec:keyframe_edit_params_plugin}
@@ -180,7 +269,7 @@ Keyframe values can be set using the various plugin \textit{show controls} (magn
 
 Tweaking is defined as changing a parameter while playing -- it can be small changes or small motion increments performed in a series.  These changes are recorded as a series of new keyframes on the timeline.  Enable automatic keyframe mode by enabling the automatic keyframe toggle, that is \textit{Generate keyframes while tweaking}.  In automatic keyframe mode, every time you tweak a key-framable parameter it creates a keyframe on the timeline.  Since keyframes affect playback, you should enable generate keyframes just before you need a keyframe and disable when your parameter changes are complete.  So turn on when ready to make changes and turn off when done!
 
-Also, before making a change, be sure to check the View pulldown and make the desired parameter visible with the enable checkmark.  The location where the automatic keyframe is generated is under the insertion point.  If the timeline is playing back during a tweak, several automatic keyframes may be generated as you change the parameter.  When automatic keyframe mode is disabled, adjusting a parameter adjusts the keyframe immediately preceding the insertion point.  For example, if two fade keyframes exist and the insertion point is between them, changing the fader changes the first keyframe.
+Also, before making a change, be sure to check the \textit{View} pulldown and make the desired parameter visible with the enable checkmark.  The location where the automatic keyframe is generated is under the insertion point.  If the timeline is playing back during a tweak, several automatic keyframes may be generated as you change the parameter.  When automatic keyframe mode is disabled, adjusting a parameter adjusts the keyframe immediately preceding the insertion point.  For example, if two fade keyframes exist and the insertion point is between them, changing the fader changes the first keyframe.
 
 \section{Compositor Keyframes}%
 \label{sec:compositor_keyframes}