\chapter{The 4+ Windows}%
\label{cha:the_4_windows}

\begin{figure}[htpb]
    \centering
    \includegraphics[width=\linewidth,keepaspectratio]{Fenstergrundposition-en.png}
    \captionsetup{labelformat=empty, textformat=empty}
    \caption[The four windows (cc-by-sa Olaf)]{No text}    
    \label{fig:Fenstergrundposition-en}
\end{figure}

First it is important to know what an EDL is. When \CGG{} saves a file, it saves the EDL,
Edit Decision List, of your project which contains all the settings and locations of edits
and pointers to the media so that the media is not modified. The EDL is described in the
Load, Save and the EDL chapter (\ref{sec:edl_edit_decision_list}).

\section{Program Window}%
\label{sec:program_window}

The main window is called the \textit{Program} window and is often just referred to as the \textit{timeline}.  Here is where you enter the main menu operations.  
This timeline consists of a vertical stack of tracks with time represented horizontally on the track. 
It is the output of the rendering operations and this is what is saved when you run the File pulldown, Save command.
Immediately to the left of the timeline is the patchbay. The patchbay contains options that affect each track.  
These options are described in great detail in the Editing chapter (\ref{sec:patchbay}).

The \textit{Window} pulldown on the main window contains options
that affect the 4 main windows. The first 3 options are used to
display each of the windows in case one was accidentally closed.
You can move or resize the windows as needed, save that particular
layout, and revert to the default positions to reposition all 4
windows to the original screen configuration.  On dual headed
displays, the \textit{Default positions} operation only uses the one
monitor to display the windows, but as you can see in the
\textit{Window} pulldown you have more options to change that. Usage
with dual monitors is explained
in~\ref{sec:multiscreen_playback_configuration}.

\subsection{Video and Audio Tracks and Navigation}%
\label{sub:video_and_audio_tracks_and_navigation}

The \textit{Program} window (figure~\ref{fig:patchbay}) has many features for navigation and displays the timeline as it is structured in memory. The tracks are stacked vertically with horizontal movement over time.
There is a vertical scroll bar which allows for moving across tracks and a horizontal scroll bar for scanning across time. 

\begin{figure}[htpb]
    \centering
    \includegraphics[width=1.0\linewidth]{patchbay.png}
    \caption{Patchbay  | Timeline with pulldowns, navigation icons, Video/Audio tracks | bottom Zoom Panel}
    \label{fig:patchbay}
\end{figure}

Video tracks represent the duration of your media, just as if you placed old-fashioned rolls of photographic
film one right after the other on a table.
Individual images that are drawn on each track are snapshots of what is located at that place on the timeline.

Audio tracks represent the sound media as an audio waveform, or if you change a preference setting, a rectified audio waveform. 
This too looks like old-fashioned digital magnetic tape laid out horizontally across a table.
Using the \textit{Zoom Panel} controls at the bottom of the timeline,
you can adjust the horizontal and vertical size of the video and audio waveform displays.
Each track on the timeline has a set of attributes on its left side in the patchbay which is used to 
control some options of that particular track. 

Track Navigation is performed by selecting a video or audio track and moving to a certain time in the track. 
Use the vertical scroll bar to scan across tracks, or even easier you can use the mouse wheel. 
And use the horizontal scroll bar to scan across time, or again even easier, you can use the mouse wheel with the Ctrl key.  

Once you have become familiar with many of the graphical tools and pulldowns, you can switch to using more of
the keyboard to navigate.  Many of the key equivalences are listed in each of the pulldowns to the right of the option
 as a shortcut. All of the shortcuts are listed in a document for keyboard 
navigation (\ref{sub:main_menu_keys}). This includes, for example, shortcuts like the \texttt{Home} and \texttt{End} keys to go to the beginning or end of the timeline.  
Another example is in the default cut and paste mode, hold down \texttt{Shift} while pressing \texttt{Home} or \texttt{End} in order to select the region of the timeline between the insertion point and the key pressed.

\subsection{Zoom Panel}%
\label{sub:zoom_panel}

Below the displayed tracks in the timeline, you will find the zoom panel as seen in figure~\ref{fig:patchbay}.
In addition to the scrollbars, these options and their values are another set of tools for positioning the timeline.  
In order of appearance in the zoom panel as rectangular boxes and either tumbler arrows or a up/down arrow, this next list shows each option along with its tooltip description if available.
Then more details are provided in the next paragraphs.

\vspace{2ex}
\begin{tabular}{ll}
   \hline
	Sample zoom & Duration visible on the timeline \\
	Amplitude & Audio waveform scale \\
	Track zoom & Height of tracks in the timeline \\
	  (type) & Automation Type \\
	Curve zoom & Automation range minimum and maximum \\
	Selection change & 3 boxes with starting point, length, and ending point \\
	Alpha slider & Slider bar to control alpha value for colored assets \\
   \hline
\end{tabular}

Changing the \emph{sample zoom} changes the amount of time displayed on the timeline 
so you can see your media as individual frames or as the entire length of your media. 
To see more frames, use a higher setting. 
The sample zoom value is not an absolute time reference because it refers to the duration visible on the timeline. It will change as you modify the length of the program window horizontally.
You can either use the $\uparrow$ and $\downarrow$ arrows to change the sample zoom by a power of two, or use the mouse wheel on the tumblers to zoom in and out.


The next option is \emph{amplitude} and it only affects the audio waveform size. \texttt{Ctrl-$\uparrow$} and \texttt{Ctrl-$\downarrow$} are shortcuts used to change the amplitude zoom as an alternative to the down arrow to the right of the numerical size.

The \emph{track zoom} affects all tracks and determines the height of each track. 
If you change the track zoom, the amplitude zoom will be changed also so that the audio waveforms
are proportionally sized.
Shortcuts, \texttt{Ctrl-Pgup} and \texttt{Ctrl-Pgdown}, change the track zoom.

\emph{Automation type} is used for selecting one of the following: Audio Fade, Video Fade, Zoom, Speed, X, or Y (X and Y are for the compositor's Camera and Projector).  When an auto line is present on
the timeline and is being manipulated, a small square the same color as the line will be shown to 
the left of the Automation type.  This is just an indicator to make it easy to see what is being worked.
 
The \emph{curve zoom} affects the curves for the selected \emph{automation type} in all the tracks of that type and determines the value range for those curves. 
Use the tumbler arrows to the left of the numbers for the minimum value and the tumblers to the right for the maximum value, or manually enter the values in the text box. 
Good default values for audio fade are -40.0 to 6.0 and for video fade are 0.0 to 100.0. 
The tumbler arrows change curve amplitude, but the only way to curve offset is to use the fit curves button on the curve itself.

The \emph{selection start time}, \emph{selection length}, and \emph{selection end time} display the current selected timeline values. When there is no selection, both the start and end time are the current
position of the timeline and the selection length is 0.
The \emph{alpha slider} allows for varying the alpha value when using colors on the tracks as set in your \texttt{Preferences $\rightarrow$ Appearance} for \texttt{Autocolor assets}.  
It has no function without that flag set.

There are 3 additional pieces of information in the line immediately below the \textit{zoom panel}.
In the lower left hand corner there could be messages such as "Welcome to \CGG{}" when there is no 
need to display a red-colored error message or a line that reads "Rendering took H:MM:SS" after a render
has just been completed. Or when working with an auto, a small square the color of that auto line, will be
present along with its keyframe type, location on the timeline, and its current value.  This is simply
for easy recognition of what is being worked. The second piece of helpful information is all the way to
the right which is a long rectangular box indicating the percentage completion of a render. Finally
there is an X with the tooltip of "Cancel operation" used to stop an ongoing render
(the cancel operation may seem slow due to the amount of data still in the buffer upon cancellation).

\subsection{Track Popup Menu}%
\label{sub:track_popup_menu}

Each Track has a popup menu. 
To activate the track popup menu, Right mouse click (RMB) on the track. 
The popup menu affects the track whether the track is armed on the patchbay or not. 
The Track Menu contains a number of options:

\begin{description}
    \item[Attach Effect] opens a dialog box of effects applicable to the type of track of audio or video.
    \item[Move up] moves the selected track one step up in the stack of its corresponding type - audio or video.
    \item[Move down]  moves the selected track one step down in the stack of its corresponding type - audio or video.
    \item[Delete track]  removes the track from the timeline.
    \item[Add Track]  adds a track of the same media type as the one selected, audio or video, above the selected track.
    \item[Find in Resources]  that media file will be highlighted in the media folder in the Resources window. If the 
	Resources window is closed, media is found and highlighted but the Resources window is not displayed.
    \item[Show edit]  will point out the exact start and stop points along with the length of the current edit on
        that track as well as the media name, track name and number, and edit number.
    \item[User title]  is used to change the title name.  This is really handy for files that have very long and
        similar names that would get cut off during edits.  You can use short names to better differentiate the
        media. In Drag and Drop editing mode, if you select multiple edits all of those clips will have
their title name changed.
    \item[Bar color]  allows the user to select a specific color for the title bar.  This helps to more easily locate a piece of media.
    \item[Resize Track]  resizes the track; this is only applicable to video tracks.
    \item[Match Output Size]  resizes the track to match the current output size; this is only applicable to video tracks.
\end{description}


\subsection{Insertion Point}%
\label{sub:insertion_point}

The insertion point (figure~\ref{fig:insertion-points}) is the vertical hairline mark that spans the timeline in the program window - it can be a solid line but most of the time it will be flashing. 
Like the cursor on a word processor, the insertion point marks the place on the timeline where the next
operation will begin. It is the starting point of all play operations and is the point where a paste operation will occur. 
In some cases, when rendering it defines the beginning of the region of the timeline to be rendered. 

To move the insertion point, you move the mouse inside the timebar area and click with the left mouse button. 
You can use any place on the timebar to reposition the insertion point as long as that spot is not blocked
by In/Out point or a label. 
In cut and paste editing mode, you can also change the position of the insertion point with a simple 
left mouse click in the timeline itself.
When moving the insertion point, the position is either aligned to frames or aligned to samples. 
For best results, \textit{Align cursor on frames} when editing a video track and \textit{Align to samples} when editing audio. 
Use the pulldown \texttt{Settings$\rightarrow$Align cursor on frames} to change the alignment by
checking the box on for video and off for audio.

\begin{figure}[htpb]
    \centering
    %\includegraphics[width=0.8\linewidth]{name.ext}
    \begin{tikzpicture}[scale=1, transform shape]
        \node (img1) [yshift=0cm, xshift=0cm, rotate=0]
         {\includegraphics[width=0.6\linewidth]{insertion-point.png}};
        \node [yshift=-5mm, xshift=-1cm,anchor=east] at (img1.north west) (Pulldowns) {Pulldowns};
        \node [yshift=-10mm, xshift=-1cm,anchor=east] at (img1.north west) (Transport) {Transport \& Buttons Bar};
        \node [yshift=-15mm, xshift=-1cm,anchor=east] at (img1.north west) (Timebar) {Timebar};
        \node [yshift=-20mm, xshift=-1cm,anchor=east] at (img1.north west) (Title) {Media Title };
        \node [yshift=-28mm, xshift=-1cm,anchor=east] at (img1.north west) (Video) {Video Track};
        \node [yshift=-46mm, xshift=-1cm,anchor=east] at (img1.north west) (Audio) {Audio Track};
        \draw [->, line width=1mm] (Pulldowns) edge  ([yshift=-5mm] img1.north west);
        \draw [->, line width=1mm] (Transport) edge  ([yshift=-10mm] img1.north west);
        \draw [->, line width=1mm] (Timebar) edge    ([yshift=-15mm] img1.north west);
        \draw [->, line width=1mm] (Title) edge      ([yshift=-20mm] img1.north west);
        \draw [->, line width=1mm] (Video) edge      ([yshift=-28mm] img1.north west);
        \draw [->, line width=1mm] (Audio) edge      ([yshift=-46mm] img1.north west);
        \end{tikzpicture}
    
    \caption{Insertion point is at 0:00:25:10 in Hr:Mn:Sec:Frames}
    \label{fig:insertion-points}
\end{figure}


\subsection{Editing Modes}%
\label{sub:editing_modes}

There are 2 different editing modes for operations which affect how the insertion point and editing
on the timeline operate.  
There is:  \emph{drag and drop mode} and \emph{cut and paste mode}. 
The editing mode is determined by selecting the \texttt{arrow}, or immediately to the right of the arrow,
the \texttt{I-beam} in the Transport and Buttons bar. In figure~\ref{fig:insertion-points} you can see
the green colored highlight \protect\footnote{green is used in the default Cakewalk theme, but the highlight color will be different in other themes} on the arrow icon indicating that you are currently in 
\emph{drag and drop mode}.

With the arrow highlighted for \emph{drag and drop mode}, a double click with the left mouse button in the timeline selects the edit the mouse pointer is over. 
Then dragging in the timeline repositions that edit and this can be used for moving effects,
changing the order of playlists, or moving video pieces around. 
There are numerous methods to cut and paste in \emph{drag and drop mode} by setting In/Out points to define
a selected region or using the Copy/Paste Behavior as outlined in~\ref{sub:copy_paste_behavior}. 
In this mode, clicking the LMB in the timeline does not reposition the \textit{Insertion Point}. 

When the I-beam is highlighted, you are in \emph{cut and paste mode}.
In cut and paste mode, clicking the LMB in the timeline does reposition the \textit{Insertion Point}. 
Double clicking in the timeline selects the entire edit the cursor is over, i.e.\ that column. 
Dragging in the timeline with the LMB pressed down, highlights a selected region and this is the region that is affected by cut
and paste operations.  It is also the playback range used for the subsequent playback operation. 
Holding down the Shift key while clicking in the timeline extends the highlighted region.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.4\linewidth]{i-beam.png}
    \caption{I-beam + in/out  +  labels}
    \label{fig:i-beam}
\end{figure}

\subsection{In/Out Points}%
\label{sub:in_out_points}

The In/Out points, displayed on the timebar by [ and ] brackets,  can be set in either of the editing modes to define the selection.
In the timebar, a colored bar will show between these 2 brackets to better outline the area selected.
In \emph{drag and drop mode}, they are an easy way to define a selected region.

It is important to remember that in \emph{cut and paste mode} and \emph{drag and drop mode}, a highlighted area 
overrides the In/Out points. That is, if a highlighted area and In/Out points are both set, the highlighted area is changed by editing operations and the In/Out points are ignored. 
But if no region is highlighted, the In/Out points are used. 
To avoid confusion, use either highlighting or In/Out points but not both at the same time.

To set In/Out points, in the timebar move to the position where you want the In point and click the In
point icon or one of the [ or < keys.
Then move the insertion point to a position after the In point and click the ] or > or the Out point icon. 
You can use these same icons or keyboard characters to toggle In/Out points on or off.

If you set the insertion point in another place when In/Out points are already set, that existing point will be
repositioned when you click the In/Out icon or keyboard equivalent. 
If you click on In/Out points while a region is highlighted, the insertion point will be ignored and In/Out points will be set at the beginning and at the end of the highlighted area.

When you select either the In or Out point on the timebar, the insertion point will move to that location.Note that when the insertion point is at the exact position of an In or Out point, the bracket will change
color making it easy to see that you are exactly at that spot.
 
If only the In point is set, when you click the In point icon the In point will be deleted. 
If only the Out point is set, when you click the Out point icon the Out point will be deleted. 
Holding the Shift key while clicking on an In/Out point, the area between the insertion point and that
In/Out point will be highlighted or extended to that In/Out point if already highlighted. 

An easy way to turn off the In/Out points if both are set, is to double click on the [ icon in the toolbar. 
If you have already set the In and Out points, and then move the insertion point anywhere to the left of
the Out point, a LMB click on the [ icon will move the In point to the location of the insertion point.  In the same
manner if you move the insertion point anywhere to the right of the In point, a LMB click on the ] icon
will move the Out point to that new position.  However, if you move the insertion point for either the
In or Out point beyond what makes sense to designate In/Out points, the bracket you clicked on will be
moved to the insertion point and the other bracket will be eliminated.  That is obviously because the
In point has to come before the Out point on the timeline.

Some of the useful operations concerning the In/Out pointers are listed next.

\begin{description}
    \item[Ctrl-KeyPad\#]  if In/Out set, \texttt{KP 2,3,5,6 + Enter}, play between In/Out points
    \item[Shift-Ctrl]  loops play between In/Out points
    \item[Click In/Out] while holding the LMB down, drags In/Out pointer where you drag to
    \item[Shift-Ctrl] with a transport button (e.g. Fast Forward), loops play between In/Out points
    \item[Ctrl-t]  clears both In/Out points
\end{description}

\subsection{Labels}%
\label{sub:labels}

Labels are used in order to set exact locations on the timeline that you want to be able to easily get to. 
To create a label, position the insertion point at a location and click on the label icon in the Transport
and Buttons bar. The new label is displayed on the timebar as a down arrow at that location as shown in
figure~\ref{fig:i-beam}.  Whenever the insertion point is at the same position as a label, it changes
color to emphasize that it is exactly at that spot.
Labels make it so you can jump back and forth to exact marked locations on the timeline.
Use the lower case letter “\texttt{L}” as a shortcut for the label button.

You can use labels to reposition the insertion point when that label is selected. They are also
especially useful for moving along the timeline to the \textit{Next label} or \textit{Previous label}
with the buttons on the Transport and Buttons bar to the right of the Labels button.  
When moving along the timeline with the Next or Previous label buttons, if a label is out 
out of view the timeline will automatically be repositioned so that the label is visible.
If you perform a \textit{Next label} operation and there are no more, the insertion point
will go to the End position.  Conversely if you perform a \textit{Previous label} operation
and there are no more labels, the insertion point will go to the Home position. 
Keyboard shortcuts for label traversal are:

\begin{description}
    \item[Ctrl-left] moves the insertion point to the previous label.
    \item[Ctrl-right] moves the insertion point to the next label.
\end{description}

There is a  Label folder in the Resources window which has a list of every label and its exact location
where the label is. The location is based on the timestamp, frame number, or sample number depending on the selected Time Format of your timebar. 
You can edit, delete, or goto a label by clicking the RMB on that label in the Resources window which
brings up a popup menu with those options.  It can be quite helpful to \textit{edit} the label
and add a text string to help identify what the label represents.
In addition, RMB clicking the label symbol on the timebar brings up a textbox displaying the current
text string and allowing you to change it. If a Label has been given a name, simply mousing over
the label symbol on the timebar will display that string.

With labels you can also select regions:

\begin{description}
    \item[Shift-Ctrl-left] highlights the area between the insertion point and the previous label.
    \item[Shift-Ctrl-right] highlights the area between the insertion point and the next label.
    \item[Double-clicking] on the timebar between two labels, highlights the area between the labels.	   
    \item[Shift-clicking] on a label, highlights the area between that label and the insertion point.
        If an area is already highlighted, it extends the highlighted area up to that label.
\end{description}

If you LMB click the label button when an area is highlighted, labels are created at each end of the
highlighted area. 
When a label is selected, if you click on the label icon, the label will be deleted. 
To delete multiple labels, highlight that area, then use the \texttt{Edit $\rightarrow$ Clear $\rightarrow$ Clear labels}
function to delete them all. The same precedence rules apply to this operation as mentioned earlier.  That
is, if both In/Out points are set and there is a highlighted area also set, the highlighted area's 
labels will be cleared and not those between the In/Out points.

If you enable \emph{Edit labels} in the Settings pulldown menu or disable the \emph{Lock labels from moving}
button on the Transport and Buttons bar, labels will be cut, copied or pasted along with the selected
area of the first armed track. 
In the same manner, if a selected area of media is spliced from the viewer to the timeline in a position 
before labels, the labels will be moved to the right on the timebar so that the label maintains its 
relative position to its edit. 
To prevent labels from moving on the timebar, enable the \emph{Lock labels from moving} icon or
disable the \emph{Edit labels} option under the Settings pulldown.

\subsection{Color Title Bars and Assets}%
\label{sub:color_title_bars_and_assets}

In order to visually aid in locating clips on the timeline that are from the same media file, you can have them auto-colored or self-colored.  
Use of this feature requires additional memory and cpu on every timeline redraw, therefore it is recommended that smaller computers leave it turned off.

For auto-color the color will be based on a hashed filename so that whenever you load this particular media, it will always have the same color on the title bar even if you use proxy.  
To enable auto-color go to \texttt{Settings $\rightarrow$ Preferences, Appearance tab} and check on \texttt{Autocolor assets}. You will see this in the Flags section
as shown in Figure~\ref{fig:settings}.  It is disabled by default.  
Each media will have a random muted color and there could easily be close duplicates as generated by the program algorithm.  There will be no total black, but some dark shades are possible.  

To change a specific clip to your own chosen color, right mouse button (RMB) over that clip and an Edits popup will be displayed.  
Choose the option \textit{Bar Color} to bring up the color picker and choose a color.   
You can also change the alpha value in the color picker and this alpha takes precedence over the current alpha slider bar value unless the color picker's alpha value is set to 1.0.   
The color will only change after you click on the checkmark.  
The \emph{Bar Color} option works in either Drag and Drop or Cut and Paste editing mode and also works if \textit{Autocolor assets} is not set.  
In Drag and Drop editing mode, if you select several clips and then bring up the Edits popup with the right mouse button over a track, you can use the \emph{Bar Color} option to change all of those selected to the same color.

To go back to the default colors, uncheck \textit{Autocolor assets} in Preferences, but this does not affect the specially chosen self-colored ones as they are preserved.  
To change these individually or  selectively, use the Edits popup \emph{Bar Color} option and click on \textit{Default} in the color picker window.  Auto-color does not honor armed/disarmed tracks.  
Self-color does honor armed/disarmed tracks.

And that’s not all!  
There is an \emph{alpha fader slider bar} on the bottom of the main window on the right hand side of the Zoom Panel.  
With this alpha slider, you can colorize your video and audio tracks to either see only the color at 0.0 or see only the image at 1.0.  
This slider bar affects all colored areas of the Autocolor assets and the self-colored ones.  
In the case when a specifically changed edit alpha value is set in the color picker
to any value except 1, the slider bar will not affect that.  
Once you use the slider bar, it is activated so gets first shot at any keystrokes in the main window.  
You deactivate this by simply clicking in a different part of the main window.  

As long as we are on the subject of color, just a note that you can also change the \textit{Highlighting Inversion color} in \texttt{Settings $\rightarrow$ Preferences, Appearance tab}.  You can see this option in Figure~\ref{fig:settings} in the Color section.  
That setting defaults to white ($ffffff$) but sometimes this is a little bright so you can put any hex value in that suits you.

This image (figure~\ref{fig:autocolor_assets_alpha}a) shows an example of the Autocolor assets with alpha set to 0.0 so that you see only the color and no image.
In this image (figure~\ref{fig:autocolor_assets_alpha}b), the alpha is set to show the image
and waveforms with transluent colors.  The pink media file has been self-colored rather than the autocolor to make it easy to see.

\begin{figure}[htpb]
    \centering
    \begin{minipage}[h]{0.55\linewidth}
        \center{\includegraphics[width=0.99\linewidth]{autocolor-assets_alpha0.png}} \\ a)
    \end{minipage}
    \begin{minipage}[h]{0.4\linewidth}
        \center{\includegraphics[width=0.99\linewidth]{autocolor-assets_alpha1.png}} \\ b)
    \end{minipage}
    \caption{An example of the Autocolor assets}
    \label{fig:autocolor_assets_alpha}
\end{figure}


\subsection{More about Pulldowns}%
\label{sub:more_about_pulldowns}

The main window pulldowns as pointed out in figure~\ref{fig:insertion-points} are quite obvious in their meaning and usage, so here is only a summary.  

%TODO Figure 3 shows an example of the pulldowns as displayed in the main window.Appearance


\begin{description}
    \item[File]  options for loading, saving, and rendering as described in other sections (\ref{cha:load_save_and_the_EDL}).
    \item[Edit]  edit functions; most of which have shortcuts that you will quickly learn (\ref{cha:editing}).
    \item[Keyframes]  keyframe options which are described in the Keyframe section (\ref{cha:keyframes}).
    \item[Audio]  audio functions such as \textit{Add track}, \textit{Attach effect}
and \textit{Attach transition}.  The \textit{Attach effect} is especially useful when
you need the effect to be applied to all related audio tracks as a \textit{Shared effect}
and is described as an alternative method of application in section \ref{sec:shared_effect_tracks}.
    \item[Video]  video functions such as \textit{Add track, Default/Attach transition, Render effect}.
    \item[Tracks]  move or delete tracks are the most often used.
    \item[Settings]  much of this is described elsewhere with the most frequently used to include
Preferences (\ref{cha:configuration_settings_preferences}), Format (\ref{cha:project_and_media_attributes}), 
Proxy and Transcode (\ref{sec:proxy_settings}), as well as the others.
    \item[View]  for display or modifying asset parameters and values to include Fade, Speed, and Cameras.
    \item[Window]  window manipulation functions.
\end{description}


\subsection{Window Layouts}%
\label{sub:window_layouts}

If you like to use different window layouts than the default for certain scenarios, you can setup, save, and load 4 variations.   
First, position your \CGG{} windows where you want them to be and then use the Window pulldown and choose \emph{Save layout}. Note the words \emph{Save layout} highlighted in Figure~\ref{fig:window_layouts}a with 4 names shown to the right and below of that highlight. 
To use the default name of \textit{Layout \#}, when the popup comes up, just click the green checkmark OK on the Layout popup menu.  
If you would like a specific name for your layout so you can remember what its best use case is,
keyin 1-8 english characters that are meaningful to you (english characters mean you can not use the German umlaut, the French accent, or the Spanish ñ). 
Legal characters are a-z, A-Z, 0-9, \_ (the underscore character) and a limit of 8 total.  
If you keyin more than 8, only the last 8 characters will be used.  
To rename a currently existing layout, use the \emph{Save layout} option again on the one to rename, and keyin a different name into the text box or leave blank for the default name (figure~\ref{fig:window_layouts}b).

\begin{figure}[htpb]
    \centering
    \begin{minipage}{.49\linewidth}
        \center{\includegraphics[width=1\linewidth]{window_layout1.png}}\\ a)
        %TODO High res image replace
    \end{minipage}
    \begin{minipage}{.49\linewidth}
        \vspace{13ex}
        \center{\includegraphics[width=1\linewidth]{window_layout2.png}}\\ b)
        %TODO Alpha channel
    \end{minipage}
    \caption{Window Layouts}
    \label{fig:window_layouts}
\end{figure}

The files containing the coordinates for your layouts will automatically be saved in the \texttt{\$HOME/.bcast5} directory as \texttt{layout\#\_rc} or \texttt{layout\#\_8chars\_rc}.

To use the desired layout, keyin the shortcut or use the Window pulldown and choose \emph{Load layout} and then make your choice. It is very beneficial to learn the shortcuts for your
layouts because they can be executed from any of the 4 windows instead of just the main
timeline window.

\subsection{Just Playing!}%
\label{sub:just_playing_}
What if you are just using \CGG{} to play media and listen to tunes? 
After loading your media, just hit the space bar to start playing and then again to stop playing.  
Other than that, use the transport buttons on the top bar of the Program window.  
Other ways to \textit{play around} are described next. 

\subsubsection*{Repeat Play / Looping Method}%
\label{ssub:repeat_play_looping_method}

There are 2 methods for repeat play or looping on the timeline and 1 method for both the Compositor and the Viewer.  This works in conjunction with any of the transport buttons or shortcuts in either forward or reverse as usual.  The 1 exception is that the Shift key can not be used to either add or subtract audio within the repeat area.

\textit{Method 1:} Shift-L on the Timeline, repeats the selection per the algorithm outlined next.
  
When setup, long green lines are displayed across the entire set of tracks which shows the start and end of the loop.
\begin{enumerate}
    \item  Highlighted selection repeats loop and takes precedence over all other possibilities.  
        If the cursor is before the highlighted area, it will play up to the area and then repeat the highlighted section.  
        If the cursor is after the highlighted section, play will start at the beginning until you get to the
        highlighted section and then repeat.
    \item  When both In and Out pointers are set, it repeats the section between [ and ].
    \item  If only one of the In or Out pointers is set, it loops the whole media.
\end{enumerate}

\textit{Method 2:} Ctrl+Shift+transport button on the Timeline, Viewer, and Compositor

\begin{enumerate}
    \item Repeats entire media if no In or Out pointer set.
    \item  In and Out pointer set, repeats area between pointers.
    \item  Only In pointer set, repeats from In to end of media.
\end{enumerate}

\subsubsection*{Last Play Position Memory}%
\label{ssub:last_play_position_memory}


When you play media, the start/end playback positions are saved as if they had been made into temporary labels.  
They appear on the timeline as purple/yellow hairline markers representing the last start/end labels for the last playback. 
They can be addressed as if they are label markers using:

\begin{description}
    \item[Ctrl$\leftarrow$]   tab to the label before the cursor, that is \textit{play start}
    \item[Ctrl$\rightarrow$]   tab to the label after the cursor, that is \textit{play stop}
\end{description}


You can use these markers for re-selection.  
Additionally, the selection region can be expanded by \textit{pushing} the markers using single frame playback.  
Use frame reverse (\texttt{keypad 4}) to push the start play marker backward, or use frame forward (\texttt{keypad 1}) to push the end play marker forward.

Another handy feature is to use the combination of Ctrl-shift-arrow (left or right) to select the media from the cursor position (red hairline) to the start or end marker by \textit{tabbing} to the label markers.  
For example, tab to the beginning of the previous play region using Ctrl-left-arrow to move the cursor to the beginning of last play, then press Ctrl-Shift-right-arrow to tab to the end of the playback region. 
Now you can clip/play/expand or edit the previous playback selection.

\begin{description}
    \item[Ctrl SHIFT$\rightarrow$] 	  tab cursor to label right of cursor position and expand selection
    \item[Ctrl SHIFT$\leftarrow$] 	  tab cursor to label left of cursor position and expand selection
\end{description}


\subsubsection*{Playback Speed Automation Support}%
\label{ssub:playback_speed_automation_support}


The speed automation causes the playback sampling rate to increase or decrease to a period controlled by the speed automation curve.  
This can make playback speed-up or slow-down according to the scaled sampling rate, as \textit{time is multiplied by speed} (Speed $\times$ Unit\_rate). For more information on changing
the speed, read the section on Speed Automation~\ref{sec:speed_fade_automation_gang}.

\subsubsection*{Alternative to using Numeric Keypad for Playing}%
\label{ssub:alternative_to_using_numeric_keypad_for_playing}


For the keyboards without a numeric keypad or if you prefer to use keys closer to where you normally type, there are alternative keys for the play/transport functions.  These are listed below.

\begin{tabular}{lcl}
	Alt + m&=&stop playback\\

	Alt + j&=&forward single frame\\

	Alt + k&=&forward slow playback\\

	Alt + l&=&forward normal playback\\

	Alt + ;&=&forward fast playback\\

	Alt + u&=&reverse single frame\\

	Alt + i&=&reverse slow playback\\

	Alt + o&=&reverse normal playback\\

	Alt + p&=&reverse fast playback\\
\end{tabular}
\begin{minipage}{.45\linewidth}
+ Shift key, results in the reverse of whether audio is included or not.
\vspace{1ex}

+ Shift + Ctrl, results in the transport function operating only between the in/out pointers.
\end{minipage}

\section{Compositor Window}%
\label{sec:compositor_window}

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.99\linewidth]{compositor_window.png}
    \caption{Left hand side are the toolbar functions / bottom bar has many control functions}
    \label{fig:compositor_window}
\end{figure}

The Compositor window (figure~\ref{fig:compositor_window}) is used to display the timeline
output.  Playing and moving along the timeline video in the Program window shows in the
Compositor window what the current image is.  Here is where many compositing operations are
performed that can change 
what the timeline will look like.  When enabled, you can simply click the LMB in the Compositor
window to start and stop play.
  You can zoom in and out to 
see small details, pan with the scrollbars, lock the window to prevent changes, add masks,
and make changes with the Projector and Camera function operators. These will be explained
in more detail in the following sections.

\subsection{Compositor Controls}%
\label{sub:compositor_controls}

On the bottom of the window, there are many
of the same transport buttons and controls that are available in the Program window.
They work the same as in the Program window and also have tooltips that are visible 
when you mouse over each of the icons so their use is fairly obvious.  However,
of particular note is the button \textit{Click to play} which is described in~\ref{sub:click_to_play_in_viewer_and_compositor}.  Next is the \textit{Videoscope} button which is used to enable the scopes window
without having to apply the filter to the tracks/edits.

Next to all of these controls all the way to the right side, there is a \textit{zoom menu} and a \textit{tally light}.  The \textit{zoom menu} has a pulldown with different settings that you can choose from
or you can just use the tumbler arrows to the right. Generally when just getting started, you
will be using the default \textit{Auto} option.  The window size is not changed, but rather
the size of the video itself. In addition there are many shortcuts for zooming that you
will find in the Shortcuts chapter (\ref{cha:shortcuts}).

To resize the entire window instead of just the video, use a RMB click in the compositor
window which brings up a menu with all the zoom levels, zoom auto mode, and some other options. 
As you would expect, whenever the video is zoomed so that only part of the image is visible
in the window, scrollbars are automatically added as needed on the bottom, the right hand 
side, or both.
Other options include \emph{Reset camera} and \emph{Reset projector} which obviously are used
to reset the camera and the projector. 
The \emph{Hide controls/Show controls} option is great for hiding the left hand toolbar and
bottom set of controls for a cleaner look. 

Next to the zoom tumbler arrows, is a \textit{tally light} that will be filled in with some color
(often red or blue) when a rendering operation
is taking place. This is especially helpful when loading a very large video so you know
when it is finished loading.  You should pay attention to this \textit{tally light} when performing
a particularly time-consuming operation so that you do not keep executing more operations
that just have to wait until completion of that CPU intensive operation.  Also, you should look
to see if the light is on before assuming that \CGG{} is hung up.

When the window is unlocked, meaning that it is not in \textit{Protect video from changes} mode on the
toolbar, MMB clicking and dragging anywhere in the video pans the view.  Panning can also
be accomplished with the bottom and right hand side scroll bars when displayed.

\subsection{Compositor Toolbar}%
\label{sub:compositor_toolbar}

On the left hand side of the Compositor window, there is a toolbar with several icons that
provide functions for viewing and compositing the video. Each of these operational features 
will be described in more detail next. 
\begin{description}
    \item[Protect video from changes] this option makes it possible to disable changes to the
compositor output when clicking on the Compositor window. It allows for using the
\textit{Click to play} button (when enabled) for simply starting and stopping play.  It helps
to prevent an accidental click from making unwanted changes. When you enable this option, any
of the other enabled tools will automatically be disabled.

     \item[Zoom view / magnifying glass] when enabled, the \textit{Zoom view} immediately results
in the addition of a zoom slider for fine viewing.  
The vertically oriented \textit{zoom slider} will be displayed underneath the last icon of the toolbar and extends
to almost the end of the toolbar.
The slider allows for adjusting the amount of zoom at any level between 0.01 and 100 based on a logarithmic scale.  

When using the zoom slider, the number by which the view is zoomed can be seen in the textbox 
on the bottom controls where the \% zoom is located.  
The zoom slider size is in the form of \textit{times}, such as $\times$0.82 which indicates that the picture is zoomed to $\frac{82}{100}^{th}$ of the original size as seen in the \texttt{Settings $\rightarrow$ Format} menu.  
Once you have set the zoom to the desired size, use the vertical and horizontal scroll bars to position the view as needed.
As mentioned earlier, this
variety of zoom only affects the video and not the resizing of the Compositor window.  After
utilizing this slider bar for zooming around, you may want to switch back to \textit{Auto} 
using the Controls on the bottom of the window.
This slider bar is also displayed
when you click on the icons for \textit{Adjust camera automation} or \textit{Adjust projector automation}.  

The Compositor window image in figure~\ref{fig:zoom_slider} shows the zoom slider bar with rectangular shaped slider about in the middle.  Note that the magnifying glass is enabled which
automatically pops-up the slider and the Protect video from changes is disabled.  Also note that
there is a scroll bar on the bottom and right side of the image since the image at this magnification
does not fit in the window.
The Controls zoom textbox shows $\times0.82$ size.  
\end{description}

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.99\linewidth]{zoom_slider.png}
    \caption{Compositor window zoom slider bar and scroll bars}
    \label{fig:zoom_slider}
\end{figure}
\begin{description}
    \item[Edit mask] brings up a mask editing menu with many versatile options as
described in great detail later in this section (\ref{sub:masks}). You may also have to click on
\textit{Show tool info} to popup the menu depending on whether or not you dismissed that window previously.
    \item[Ruler] this can be a handy tool to get the X,Y coordinates of an exact point or to 
measure the distance between 2 points. To use the \textit{Ruler}, move the mouse on the video to
get to the desired spot - these X,Y coordinates will be displayed in the \textit{Current} text
box.  Clicking the LMB creates Point 1 and then continue to hold down the LMB so that a ruler line is created between
this Point 1 and the stopping Point 2.  \textit{Deltas} is the X,Y difference between the 2 points;
\textit{Distance} is the number of pixels between the 2 points; and \textit{Angle} is the angle in degrees of the ruler line.  
In Figure~\ref{fig:safe_regions} you can see the Ruler menu on the right side of the Compositor window.

Holding down the Ctrl key while dragging with the LMB on one of the points, will
ensure that the line is always at a multiple of a 45 degree angle.  Holding down the Alt key while
dragging with the LMB on any of the points, will translate the ruler line to another place on 
the video while maintaining its length and angle. For some desktop window managers, such as 
\textit{UbuntuStudio 16.4} and \textit{Arch}, the Alt key is already in use by the Operating System
so you will have to use Alt+Ctrl instead.
If you dismiss the Ruler menu, click on
\textit{Show tool info} to get the menu to popup again.  
    \item[Adjust camera automation]  the camera brings up the camera editing tool. Enable \textit{Show tool info} if the popup menu does not appear. More detail for usage is provided in the subsequent
section~\ref{sub:camera_and_projector}.
    \item[Adjust projector automation]  the projector brings up the projector editing tool. Enable \textit{Show tool info} to get the menu to popup again. More detail for usage is provided in the
subsequent section~\ref{sub:camera_and_projector}.
    \item[Crop a layer or output]  this is a cropping tool used to reduce the visible picture area.
More detail for usage is provided in a 
subsequent paragraph (\ref{sub:cropping}).  There is also a Crop \& Position plugin that provides
a different set of capabilities~\ref{sub:crop_position}.
    \item[Get color / eyedropper]  brings up the eyedropper used to detect the color at a
particular spot.  Enable the \textit{Show tool info} if the Color popup menu does not come up 
automatically or if that menu was accidentally dismissed.  Click on a specific color in the video
output with the LMB to see the selected color. You can then use that color's 
value to be applied to some effects depending on how the effect handles the eyedropper.
    \item[Show tool info]  this tool button is used in conjunction with the other tools on the
compositor's toolbar. You only need to click on this if one of these tools popup menu does not
come up or has been dismissed - Mask, Ruler, Camera, Projector, Crop, or Eyedropper tools.
You can also use it when highlighted to dismiss the highlighted tool's dialog box.
It is not needed for Protect video from changes, Zoom view, and Show safe regions since they have
no dialog popup menus.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.9\linewidth]{safe_regions.png}
    \caption{Note the black outlines showing the safe regions. Also note the Ruler menu}
    \label{fig:safe_regions}
\end{figure}

    \item[Show safe regions]  draws 2 outlines to display the safe regions in the video as you
can see in Figure~\ref{fig:safe_regions}.
On some particular TVs/monitors/displays, the borders of the image are cut off and that
cut off section might not be as square as it appears in the compositor window. 
These are especially useful if the device for the output display is an older model TV\@.
The outside largest outline is the \textit{action safe overlay}; whereas the inside smallest
outline is the \textit{title safe overlay}.

Using the \textit{Show safe regions} has no affect on the rendered output.
The purpose of showing the borders is to make it easy to see where it might be cut off.  This
area outside the safe region can then be used as
a scratch or vertical blanking space.  Enabling the safe regions makes it really
easy to see these borders so that you can make sure 
titles are inside the inner outline and actions are inside the outer outline.

\end{description}

\subsection{Compositing}%
\label{sub:compositing}

Much of the editing in \CGG{} involves "compositing" which is the combining of visual
elements from different sources into single images.  This includes such things as 
speeding up and slowing down the video, changing the resolution, creating a split screen, and fading in and out.
Compositing operations are done on the timeline and in the Compositor window using various
operations and other compositing attributes that are available in the Resources window.
When \CGG{} is performing a compositing operation it plays back through the
compositing engine, but when not, it uses the fastest decoder that it has.

\subsection{The Temporary, Track and Output Sizes}%
\label{sub:track_and_output_sizes}

This section explains a few things which help to understand Compositing - especially with relation
to the camera, effects, and the projector.

\subsubsection*{The Temporary}%
\label{ssub:output_size}

\CGG{}'s compositing routines use a \textit{temporary} which is a single frame of video in
memory where graphics processing takes place. The size of the temporary and of the output in
the compositing pipeline are different and vary for any particular frame.  Effects are processed in
the temporary and as such are affected by the temporary size.  In the case of the camera, its
viewport is the temporary size. However, projectors are rendered to the output and so are affected
by the output size. When the temporary is smaller than the output, the temporary will have blank
borders around the region in the output.  When the temporary is larger than the output, it will be
cropped.

\subsubsection*{Track and Output size}%
\label{ssub:track_size}

The \textit{Track size} is used to define the temporary size with each track having a different size (viewports).
You can see or set the track size by RMB click on a track and then select \emph{Resize Track} to resize
the track to any size. Or select \emph{Match output size} to make the track the same size as the
output.  When a track is resized what it looks like on the compositor changes.  The relationship
between the track and the project's output size makes it possible to magnify or reduce the size of
a track in regards to the final output. This feature means you cancreate visual effects such as split
screens, zooms, and pans in the compositor.

The \textit{Output size} can be set in \texttt{File $\rightarrow$ New} when creating a new project,
or by using \texttt{Settings $\rightarrow$ Format}, or in the Resources window with RMB click on
a video asset and choosing \texttt{Match $\rightarrow$ Match project size}. When you \emph{Match project size}, you
are conforming the output to the asset. To change the size and aspect ratio of the output (Projector) we have to change the whole project, which will alter all the tracks in the timeline. Once you have set the output size in 1 of these 3 ways,
any newly created tracks will conform to the specified output size.  When rendering, the project's
output size is the final video track size where the temporary pipeline is rendered into.  

\subsection{Camera and Projector}%
\label{sub:camera_and_projector}

In the compositor window, \textit{Adjust camera automation} and \textit{Adjust projector automation}
are editing tools to control operation of the camera and projector.  In \CGG{}'s compositing
pipeline, the camera determines where in the source the \textit{temporary} is copied from while
the projector determines where in the output the \textit{temporary} is copied to
(figure~\ref{fig:temporary-01}). 

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.8\linewidth]{temporary-01.pdf}
    \caption{Compositing pipeline}
    \label{fig:temporary-01}
\end{figure}

In compositing, each frame can be changed using various options and plugins, such as
a color correction plugin (figure~\ref{fig:camera_and_projector}).  After the image has been
modified, the final image is projected to the compositor so that you now have a changed original.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.8\linewidth]{camera_and_projector.pdf}
    \caption{Color3way on Temporary}
    \label{fig:camera_and_projector}
\end{figure}

When editing the camera and projector in the compositing window, the affected track will be the
first track that is armed.  If there are multiple video tracks, you can select one specific track
for editing with a LMB click on the \textit{Arm track} icon of the desired track. This is called
"solo" the track. To reverse this solo-ing, LMB click on the icon again. 

\subsubsection*{Projector Compositing}%
\label{ssub:projector_compositing}

The purpose of the \textit{projector} is to composite several sources from various tracks into one
output track.  The projector alignment frame is the same as the camera's viewport, except that it
shows where to put the contents of each temporary on the output canvas.  To get into projector
editing mode, click on the \textit{Adjust projector automation} icon in the Compositor toolbar. You
will then see red border lines surrounding the image and 2 diagonal lines criss-crossing in the 
middle, displayed in the video window.  The red outline indicates the size of the frame that will be
sent to the Output. You can easily drag the box with LMB, moving the frame in $x$ and $y$ directions.
When moving along the $z-axis$ (i.e.\ the zoom, with SHIFT+Drag) the box exactly follows the movement
and the size of the frame. After you position the video with the projector, you may next want to
\textit{Adjust camera automation}.

\subsubsection*{The Viewport}%
\label{ssub:viewport}

The \textit{viewport} is a window on the camera that frames the area of source video. The size of the current track is used for the initial size of the viewport. A smaller viewport, for example ($640\times480$), captures a smaller area; whereas a larger viewport of ($800\times600$) captures a larger area.  If the captured area is larger than the source video, the empty spaces will be automatically filled with blanks.  To change the size and aspect ratio of the viewport (Camera) of a single track, right-click on the track in the timeline and choose Resize Track. Here we can vary the height and base of the viewport in pixels or use the ratio between the sides. With OK we will see the change in the Compositor window with the new dimensions reflected in the green box. We can have different size viewports for each video track on the timeline. To go back, reset the viewport to the original value. After the viewport is defined, the camera needs to be placed right above the area of interest in the source video. Operations to control the location of the camera are as follows:

\begin{enumerate}
    \item  In the compositor window you should see the selected track.
    \item  LMB click on the \textit{Adjust camera automation} to bring up the editing menu and the 
green and yellow colored outlines.
    \item  Use the LMB to drag the video over the display in the compositor window to the desired
placement.
\end{enumerate}

When you drag over the viewport in the compositor window, it looks like you are moving the camera
with the mouse.  The viewport moves in the same manner.

\subsubsection*{Camera Compositing}%
\label{ssub:camera_compositing}

Select the camera button to enable camera editing mode. 
In this mode, the guide box shows where the camera position is in relation to past and future camera positions but not where it is in relation to the source video. 
The green box is the Viewport; at the beginning it coincides with the size of the source frame. If we move the viewport by dragging it with LMB (moving it in $x/y$), the green box remains fixed to the original size but the frame is moved to the new position.  A yellow frame will appear along the edges of the frame to indicate the displacement with respect to the green box; this behavior differs from that seen for the Projector. Even if we act on the $z-axis$ (SHIFT + Drag, equivalent to the zoom), the frame narrows or widens, moving behind the yellow frame.

\subsubsection*{Camera and Projector Menu}%
\label{ssub:camera_and_projector_menu}

The camera and projector have shortcut operations that do not appear in the popup menu and are not represented in video overlays. 
These are accessed in the \emph{Show tool info} window.
Most operations in the Compositor window have a tool window which is enabled by activating the question mark icon (figure~\ref{fig:camera_tool}).

\begin{wrapfigure}[10]{O}{0.45\linewidth} 
	\vspace{1ex}
    \includegraphics[width=1.0\linewidth]{camera_tool.png}
    \caption{Camera and Projector tool}
    \label{fig:camera_tool}
\end{wrapfigure}

In the case of the camera and projector, the tool window shows $x$, $y$, and $z$ coordinates. 
By either tumbling or entering text directly, the camera and projector can be precisely positioned.  
Justification types are also defined for easy access. 
A popular justification operation is upper left projection after image reduction. 
This is used when reducing the size of video with aspect ratio adjustment.  
In the last figure you see the choices for justification as the location of the line in the 6 boxes in the order of left, center horizontal, right, top, center vertical, and bottom.

The translation effect allows simultaneous aspect ratio conversion and reduction but is easier to use if the reduced video is put in the upper left of the \textit{temporary} instead of in the center. 
The track size is set to the original size of the video and the camera is centered. 
The output size is set to the reduced size of the video. 
Without any effects, this produces just the cropped center portion of the video in the output.

The translation effect is dropped onto the video track. The input dimensions of the translation effect are set to the original size and the output dimensions are set to the reduced size. 
To put the reduced video in the center subsection that the projector shows would require offsetting out $x$ and out $y$ by a complicated calculation. 
Instead, we leave out $x$ and out $y$ at 0 and use the projector's tool window. 
By selecting left justify and top justify, the projector displays the reduced image from the top left corner of the \textit{temporary} in the center of the output.

\subsubsection*{Reset to Default}%
\label{ssub:reset_default}

In the compositing window, there is a popup menu of options for the camera and projector. Right click over the video portion of the compositing window to bring up the menu:

\textit{Reset Camera}: causes the camera to return to the center position.
    	
\textit{Reset Projector}: causes the projector to return to the center.

\subsubsection*{Use Case: Interaction Between Camera And Projector \protect\footnote{Example provided by Sam. The relative video is located at: \url{https://streamable.com/iq08i}}}%
\label{ssub:use_case_interaction_camera_projector}

\begin{enumerate}
    \item Start by shrinking the projector to $z=0.500$ ($\frac{1}{4}$ of the original frame).
    \item The next step is to switch to the camera and note that the green box has assumed the size of the projector, i.e.\ the red box. The value of $z$ of the camera is always equal to $1.000$ (default) but the frame is $\frac{1}{4}$ of the original frame, i.e.\ it has the size of the projector that has $z=0.500$. This is the current viewport size.
    \item You enlarge the room bringing $z=2.000$. You can see that the dimensions of the viewport (green box) do not change, remaining the same as those of the projector. However, the frame has been enlarged and this variation is indicated by the enlargement of the yellow box. Let's remember that this follows the changes made with the camera tool.
    \item We can drag the room so that we can center the frame to our liking. The movement of the yellow box shows well the variation compared to the green box.
    \item Finally, if we want, we can switch to the projector tool to move the output frame to the position we want with respect to the size of the source. Of course, we can also work on the $z$, which in the example is at $z=0.500$, if we have decided to change the size of the output.
\end{enumerate}

\subsection{Masks}%
\label{sub:masks}

Masks can be used to accomplish various tasks but basically are used to select an area of the 
video to be displayed or hidden. 
They can be used in conjunction with another effect to isolate the effect to a certain region.
Another usage is where you slightly delay one video track copy and unmask an area where
the one copy has interference but the other copy does not.  Or use a mask when  color correction is
needed in one part of a frame but not another.  A mask can be applied to just a small section of
a color corrected track while a plain track shows through. 
Removal of boom microphones, license plates, people and airplanes via mask is a very common usage.

The order of the compositing pipeline affects how masks are done. Usually masks are operated on the
temporary, after the effects but before the projector. Because of the way this works, multiple
tracks can be bounced to a masked track and projected with the same mask.

The compositing pipeline graph has a masking stage (figure~\ref{fig:temporary-02}).

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.7\linewidth]{temporary-02.pdf}
    \caption{Compositing pipeline with mask}
    \label{fig:temporary-02}
\end{figure}

\subsubsection*{Compositing pipeline with masks}%
\label{ssub:compositing_pipeline_with_masks}

The Mask popup menu can be overwhelming upon first encounter.  However, if you follow the next
few steps you can create a single simple mask without having to understand every possible parameter.
\begin{enumerate}
    \item To define a mask, in the Compositor window click on the \textit{Edit mask} icon to get the popup Mask menu.  If the menu does not come up, click on the \textit{Show tool info}.
    \item  On the video, LMB click on the place where you want to start a mask.
    \item  Then LMB click on another spot of the image to create each new point of the mask. Once
you have at least 3 points, lines will be drawn between them, but you can just create as many
more points as you need and the lines will be redrawn to cover all points. When you 
create each point of the mask a straight line curve is expanded, altering the shape of the mask.
The mask position will always be in the same position on each image of the video unless you enable 
\textit{Generate keyframes while tweaking} on the Program window Transport and Buttons bar. Then when 
enabled you can move a mask over time.
     \item For a mask to be seen or not seen, there must be another video track under the track
that you are viewing in the compositor.  An easy way to see the masked area is to just add an empty track
below the target track and drag the \textit{Gradient} plugin to a highlighted area on that track.
     \item  You can move existing points to new locations by simply using the LMB at a point to
drag that point to a different location.
    \item  The mask can be translated as a single entity by Alt-dragging the mask.  For some desktop
window managers, such as \textit{UbuntuStudio 16.4} and \textit{Arch}, the Alt key is already in use
by the Operating System so you will have to use Alt+Ctrl instead.
    \item To create curved instead of straight lines between the points, use  Ctrl-drag on a
specific point. Using Ctrl-drag activates bezier handles (control points) to create these curves
between the points. For example, on a mask with just two points, you can create a romantic heart mask.     
\end{enumerate}

There are a lot more operations you can do using the Mask menu as shown in 
figure~\ref{fig:mask_window}.  Detailed description is provided here next.  Note that the Mask
window is separated into various sections to make it easier to locate the area of interest.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.5\linewidth]{mask_window.png}
    \caption{Mask options window}
    \label{fig:mask_window}
\end{figure}

\subsubsection*{Masks on Track section}%
\label{ssub:masks_track_section}

The \textit{Track}: textbox displays the different video tracks for your session which will be initially set to the first armed video track or will be left blank if there are no armed tracks.  A pulldown to the right of the box brings up the names of all of the video tracks allowing you to change to which track the masking applies.  You can also just use the tumbler to easily mouse up/down to get to the desired track. In the pulldown list, any track that has a red colored text name is disarmed so that you can not change it.  A track that contains masks has yellow colored text for easy identification.  Only when there are no masks on the track, do you have the default text color. This textbox is display only and you can not type into it.

The \textit{Solo} button in the Masks on Track section of the Mask window is very handy when working with masks on different tracks.  It displays just that track so that you see only the track you choose, as well as the tracks behind it to show the mask part.  The Solo button is just a convenience to prevent having to mouse over to the patchbay.

\subsubsection*{Masks section}%
\label{ssub:masks_section}

The \textit{Mask}: textbox will show you the mask numbers of $0-7$ or the 8 ascii character name that you have used to designate each mask number.  There is a pulldown on the right side to easily switch to another mask. 

The \textit{Delete} button is used to delete the mask number/name that is selected. The symbol to the right with tooltip of \textit{Delete all masks} can be used to delete all of the current video track masks.

The \textit{Select}: row of checkboxes is used to indicate which mask is currently displayed for that video track in the Compositor.  Numbers that are colored yellow are active masks for that track.  A tumbler to the right allows for quickly changing the mask number displayed.

The \textit{Enable} row of masks makes it so you can enable all or none of the masks, making it possible to look at no masks or at one mask without interference from the other masks. The symbol that looks like an \texttt{eye} can be used to easily check all or none as the tooltip \textit{Show/Hide mask states}.

\subsubsection*{Preset Shapes section}%
\label{ssub:preset_shape_section}

There are 4 shapes that are automatically available for usage as masks – square, circle, triangle, and oval.  In addition, the next 3 symbols in this section are for the purpose of loading, saving, and deleting your own customized shapes.  The first symbol, \textit{Load} preset, will bring up a list of your previously saved presets.  Clicking on \textit{Save} preset brings up a popup window allowing you to provide a name used to identify the preset you want to save, along with a pulldown to see the names of your other saved presets.   Clicking on \textit{Delete} preset also brings up a textbox with a pulldown to choose which one to delete.  There is a file, called \texttt{mask\_rc}, in \texttt{\$HOME/.bcast5} that records your custom masks.  

When you click \textit{Load} preset, keep in mind that it will write the mask number that you have selected so if you already have a mask at that location, it will write over it – just \textit{Undo mask} under the main window Edit pulldown (shortcut `z') to revert to the previous if you made this mistake.

\subsubsection*{Position \& Scale section}%
\label{ssub:position_scale_section}

\textit{Center} mask button allows for quickly centering a mask on the video track. 
\textit{Normalize} mask button makes it easy to normalize the size of the mask based on the scale of the video. 
The next 3 symbols concern the direction to \textit{drag translate} a mask using the \texttt{Alt+LMB} thus making it easy to preserve the current $X$ or $Y$ value when desirable.  For some desktop window managers,
such as \textit{UbuntuStudio 16.4} and \textit{Arch}, the Alt key is already in use by the Operating System
so you will have to use Alt+Ctrl instead.

\texttt{xlate/scale x}	- drag translate constrained in the $X$ direction

\texttt{xlate/scale y}	- drag translate constrained in the $Y$ direction

\texttt{xlate/scale x/y}	- drag translate in both directions; this is the default and after using the other 2 options, you should reset to this to avoid future confusion while dragging.

\subsubsection*{Fade \& Feather section}%
\label{ssub:fade_feather_section}

The \texttt{Fade}: textbox is used to type in a fade value; the tumbler to the right of the textbox allows you to increase or decrease that number; and the slider bar makes it quick to adjust the fade value.  The fader goes from $-100$ on the left to $+100$ on the right for negative to positive.  Default value is $+100$. The fade slider includes a sticky point at 0 so that it is easy to get to 0 without going too far or not quite far enough -- that way you don’t have to keep jiggling to get there. 

In addition there is a \textit{Gang fader} symbol to allow for having all of the masks fade in unison. The symbol is surrounded by a green colored background \protect\footnote{green is used in the default Cakewalk theme, but the background color will be different in other themes} when it is in effect.  If you have multiple masks with different modes, a decision had to be made on what value to use -- it uses the maximum transparency value of the background to determine the operations results.  To understand how this works, here is a summary:

Note1: The area outside the mask is referred to as the background.

Note2: The operational result is based on the maximum transparency value of that background.

\paragraph{Case 1, Positive Fade:} When the fade for all of the masks is positive, affecting the area inside of the mask, all of the
background colors are at a transparency value of zero. So the largest transparency value is 0,and all masks are drawn with opaque backgrounds, depicted as one would expect.

\paragraph{Case 2, Negative Fade:} When the program computes the background color for any number of masks that includes negative
mask(s), it uses the largest transparency number as the determining factor for the background. Only 1 of the masks can be largest, and wins for the background transparency result.

\vspace{3ex}\textit{Feather}: works in a similar manner to a \textit{gradient Fade} aligned on the mask boundary but is a logical function instead of a mathematical function so will be faster.  The \textit{Gang feather} symbol also works in a similar fashion and is surrounded by a gold colored background when it is in effect.

\subsubsection*{Mask Points section}%
\label{ssub:masks_points_section}

This section is used to change to a different mask number and manipulate the masks you have created.

The \textit{Point}: textbox provides the ability to change which point number for the current mask that you want to work on.  It has a tumbler to allow for quickly switching the point number.  The \textit{X:} and \textit{Y:} boxes below reflect the current values and allow for modifying the $X/Y$ coordinates and these too have tumblers. The \textit{Delete} button will allow for deleting the selected point number.

The next 6 symbols in 2 columns represent \textit{Smooth} and \textit{Linear} buttons.  Smooth buttons use an algorithm based on the previous point and the next point to create a curved line. The smoothing operation takes three points, A, B, C, and arranges the slope at B to be AC as it moves to the next point for that mask.

\textit{smooth point}	$\rightarrow$ smooth a single point.

\textit{smooth curve}	$\rightarrow$ smooth all points on a mask edge curve.

\textit{smooth all} 	$\rightarrow$ smooth all active masks.

Linear buttons of \textit{linear point}, \textit{linear curve}, and \textit{linear all}, perform the inverse of the smooth functions.
The control point vectors on the bezier endpoints are set to zero magnitude.

In addition there is a \textit{Markers} and a \textit{Boundary} checkbox which come in handy to turn off the display of the points and the outline of the mask.  Turning off \textit{Markers} is very useful when you have a lot of control points that clutter the display and make it more difficult to see the actual mask.  A helpful feature is available by disabling \textit{Markers} and enabling \textit{Boundary} which results in all masks being displayed in the viewer; for example you can then see mask 0, mask 1 \dots at the same time.

A \textit{gang} symbol on the right hand side of this section, tooltip of \textit{Gang points}, is another useful feature that makes it easy to drag a mask to an exact coordinate using the \textit{X} or \textit{Y} textbox for numerical input or the associated tumblers.  This works like the \texttt{Alt+LMB drag} translate but provides the ability to be precise.

\subsubsection*{Pivot Point section}%
\label{ssub:pivot_point_section}

The \textit{X:} and \textit{Y:} coordinates mark the value of the current \textit{Pivot Point} used for rotation, scaling, and translation.  You can either directly key in numerical values or use the tumblers to change the values as long as the \textit{Focus} checkbox is checked.

The \textit{Focus} checkbox is used in case you want to set a different point in the Compositor for pivoting instead.  And the \textit{Gang} symbol for rotate/scale/translate means that these operations will be performed on all points of the enabled masks.  The gang symbol is surrounded by a gold colored background when it is in effect.  When performing a rotate operation on a mask with the mouse wheel, \textit{acceleration} is in effect -- this means the faster you wheel, the more space is covered so that you do not have to wheel dozens of time to make a full rotation.  Then when you wheel around slower, you can fine tune the result.
Note that in order to be able to rotate/scale around pointer, the Focus checkbox must be unchecked.

\subsubsection*{Other sections}%
\label{ssub:other_sections}

Finally there are the \textit{Apply masks before plugins} and \textit{Disable OpenGL masking} self-explanatory checkboxes.

Note: Not all OpenGL software can support the current masking methods.  If your opengl implementation does not support Shader Version 4.3 or has trouble with this (it is relatively new to opengl at the time this was implemented), then this checkbox will allow you to use the software masking to avoid any potential issues.  Normally, OpenGL is probed for the shader version and will automatically use the software implementation if required.

The \textit{Help} checkbox can be enabled in order to see a list of the keys used to perform various operations.  If you use Masking infrequently, these are a valuable reminder to which key combinations to use.  Currently they are as follows:

\vspace{2ex}
\begin{tabular}{ll}
    \hline			
    Shift+LMB & move an end point \\
    Ctrl+LMB & move a control point \\
    Alt+LMB & to drag translate the mask \\
    Shift+MMB & set Pivot Point at pointer \\
    Wheel & rotate around Pivot Point \\
    Shift+Wheel & scale around Pivot Point \\
    Ctrl+Wheel & rotate/scale around pointer \\
    \hline  
\end{tabular}

\subsubsection*{Key Alternatives}%
\label{ssub:key_alternatives}

\vspace{2ex} Note: For some desktop window managers, certain keys may already be in use by the operating system, so you will either have to redefine them in your desktop or use different key combinations.  For example, at least some desktops used with \textit{UbuntuStudio 16.04} and \textit{Arch} field the \texttt{Alt} key, thus requiring alternative key combinations to be needed.  Below are some of these alternatives.

\vspace{2ex}
\begin{tabular}{lp{11cm}}
    \hline			
    LMB & move/create an end point (to move the end point the pointer must be above the point) \\
    Shift+LMB & move an end point (the pointer may be near the point, not above it) \\
    Ctrl+LMB & move/create a control point \\
    Alt+Ctrl+LMB & to drag translate the mask \\
    Shift+Key Delete & to delete the mask \\
    Shift+MMB & Set Pivot Point at pointer \\
    Alt+Wheel & zoom in/out the screen (also available in Ubuntu16 but does not exist in all distros) \\
    \hline  
\end{tabular}

\vspace{2ex}
Focus checkbox = unchecked:

\vspace{2ex}
\begin{tabular}{ll}
    \hline			
    Wheel & rotate around Pivot Point \\
    Shift+Wheel & scale around Pivot Point \\
    Ctrl+Wheel & rotate around pointer \\
    Ctrl+Shift+Wheel & scale around pointer \\
    
    \hline  
\end{tabular}

\vspace{2ex}
Focus checkbox = checked:

\vspace{2ex}
\begin{tabular}{ll}
    \hline			
    Wheel & rotate around Pivot Point (“Custom focus point”) \\
    Shift+Wheel & scale around Pivot Point (“Custom focus point”) \\       
    \hline  
\end{tabular}

\vspace{2ex}

\subsection{Cropping}%
\label{sub:cropping}

Cropping is used to reduce the visible picture area by changing the output dimensions, width and
height in pixels, and the $X, Y$ values. An example of cropping and the crop menu is seen in
figure~\ref{fig:cropped_area}.
The easiest way to use cropping is to click with the LMB 
at the spot to begin cropping and while holding down the LMB, drag the mouse. This creates a rectangular
cropping area.  To change the size/location of that area, click on any of the 4 corner points
with the LMB and drag.  While dragging, you will see 
the X1, Y1 coordinates and W for width, H for height, in the Crop tool popup menu
automatically change numerical value to reflect the current position. For precise locations, you
can keyin exact values into those textboxes instead of using the mouse.
Once you have the crop area defined as you want it, then click on the \textit{Apply} button to have
the actual cropping take affect.

There are 3 choices of crop methods to choose in the menu pulldown on the bottom right side.
\begin{enumerate}
     \item Reformat - Reformat Session crops and changes the Format for the entire session. 
Because the Format is changed, this is applied to all tracks in the project.
The part of the image outside the rectangle will be cut off and the projector will make the video fit.
The  \texttt{Settings $\rightarrow$ Format} window will show the new project Width and Height values and
the projector tool window will show the new $X, Y$ values. Track size remains unchanged.
You can undo the cropping by entering the original project dimensions in the
\texttt{Settings $\rightarrow$ Format} window for the Width and Height.  You will also have to use the Projector
tool in the Compositor toolbar to \textit{Ajdust projector automation} by clicking on the Reset icon.
     \item Resize - Resize Projector; to undo this, enable \textit{Adjust projector automation} 
and do a Reset.
     \item Shrink - Resize Projector and Camera; to undo this, enable each of the \textit{Adjust
projector and camera automation} tools, one at a time, and do a Reset in the menus.
\end{enumerate}
An important note here is that the original aspect ratio will be maintained so if your frame is
rectangular (as many are) and you "crop" by surrounding the region of interest with a square,
the cropped area will be more than you marked in order to keep the aspect rectangular shape.
The Resize and Shrink options are applicable to all video tracks except the disarmed ones. 
This is in contrast to the Reformat option, as mentioned previously, which applies to all tracks even if disarmed because it changes the Format for the session.
One last note of interest, this cropping is keyframable.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.9\linewidth]{cropped_area.png}
    \caption{Crop menu and outlined crop rectangle on the right side}
    \label{fig:cropped_area}
\end{figure}

An easy to follow step by step usage of the cropping tool is outlined next.
\begin{itemize}
    \item Enable the crop tool in the compositor window to display the Crop popup menu.
    \item Click-drag in the video to define the crop area which draws a rectangle on the video.
    \item Click-drag in the video to start a different rectangle instead.
    \item Click-drag on a corner of the rectangle to reposition that corner.
    \item Alt-click in crop rectangle to translate the rectangle to a different position without resizing.
    \item The crop popup menu allows text entry of the top left coordinates ($X1,Y1$) and width and
height ($W, H$) that define the crop rectangle. 
    \item Choose one of the 3 options of Reformat, Resize, or Shrink.
    \item When you have the rectangle where you want it,
click on the \emph{Apply} button in the menu to actually perform the crop operation.
\end{itemize}
 

\section{Viewer Window}%
\label{sec:viewer_window}

The Viewer window (figure~\ref{fig:viewer_window}) is convenient for previewing your media and 
clips. It can also be used for editing with cuts and then paste operations into the timeline or
to create a clip.  There are transport buttons to use in the same manner as in the Program
and Compositor windows or you can quickly move through the media by dragging with the LMB in
the timebar above the transport buttons.  

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.99\linewidth]{viewer_window.png}
    \caption{Viewer Window - the red arrow "Play" button is left of the Videoscope button}
    \label{fig:viewer_window}
\end{figure}

In order to view media in the window, you have to load it as follows:

\begin{enumerate}
    \item  In the Resources window, highlight the Media folder or the Clip folder.
    \item  Drag a file from the folder to the Viewer.
    \item  \textbf{Or} double LMB click on a media asset.
    \item  \textbf{Or} highlight an asset, RMB to bring up choices, and click on \textit{View} or
\textit{View in new window}.
\end{enumerate}

Note that you can have multiple Viewer windows open with different or even the same media asset.
After the media is loaded you can use the transport buttons to play, rewind, stop, and so on, or
for fast previewing drag with the LMB anywhere on the timebar slider.  There is also the Videoscope
button which is to used to enable the scopes window without having to apply the filter to the tracks/edits.
A few more options available in the Viewer window can be accessed with a RMB click on the display.
These functions are listed next.

\begin{enumerate}
    \item  Switch to a fullscreen display by choosing \textit{Fullscreen}.  To switch back, click
with the RMB on the display again and choose \textit{Windowed}.
    \item  Change the display size by choosing the \textit{Zoom} function to select a zoom level of
25\%, 33\%, \ldots 300\%, or 400\% of the original media size.
    \item  To remove the current media from being displayed, choose \textit{Close source}.
\end{enumerate}

The Viewer uses the project's output size format settings to display the media instead of the
original asset's format. Operations performed in the Viewer affect a temporary EDL or a clip rather
than the timeline.  By default, the Viewer window is automatically available but if it gets
accidentally closed you can open it again by using the pulldown \texttt{Window $\rightarrow$ Show
Viewer} to bring it back up.  More details for editing in the Viewer window with the Two Screen
Editing method is explained in~\ref{sec:two_screen_editing}.


\begin{figure}[htpb]
    \centering
    \includegraphics[width=1.0\linewidth]{viewer_audio.png}
    \caption{Viewer window at the top displaying same 5 seconds as seen in the Resources window thumbnail. At the bottom of the screen is the audio loaded on the timeline.}
    \label{fig:vieweraudio}
\end{figure}

You can also use the Viewer to listen to media that consists only of Audio.  This is a quick way
to listen to the audio to see if it is what you would like to add to a timeline audio track for
your project.  To do this, you simply drag the audio file from the Resources window in the same
manner as a video file. The viewer was designed to "view" images rather than play audio so in order
to make it obvious that audio media is loaded to the viewer, a waveform is displayed that is the
same waveform as shown in the Resources window thumbnail when in the \textit{Display Icons} mode.
This waveform only represents the first 5 seconds of the media and will not change or move while
playing in the Viewer window.  But you can play the entire piece of media in the window
and as you do so, you see the play cursor line move along and the timestamp reflect the actual
position. You can also create clips. The entire waveform can only be seen on an actual audio track
on the timeline. An example of what this looks like is shown in figure~\ref{fig:vieweraudio}.

\section{Options in both the Compositor and Viewer Windows}%
\label{sec:options_in_both_the_compositor_and_viewer_windows}

The next sections describe capabilities that are available in both the Compositor and Viewer windows.

\subsection{Click to Play in Viewer and Compositor}%
\label{sub:click_to_play_in_viewer_and_compositor}

In both the Viewer and Compositor windows, there is an arrow on the right hand side of the other
buttons in the edit panel as shown in figure~\ref{fig:viewer_window}.  The "play" button can be
toggled on/off via this arrow, which has a tooltip of \textit{Click to play}.  When enabled
the arrow is white surrounded by green and when disabled the arrow is red.\protect\footnote{the color and the look will be different for themes other than the default theme of Cakewalk}
The purpose of enabling this capability is to make it really easy to play the media in the window
by just using the left mouse button to start or stop the play.  The entire main canvas surface
becomes a big play button!  Although the default is initially off, a good reason to enable this,
at least temporarily, is so that you can quickly review your video before a render.
 
\begin{description}
    \item[left click]  forward play or stop forward play if already playing
    \item[middle wheel]  single frame forward or back
    \item[middle click]  reverse play or stop reverse play if already playing. 
        Note that some 3 button mice do not accommodate a middle click for reverse but you can find out by testing from a terminal window with the command \texttt{xev}.
\end{description}

\subsection{Timebar + Preview Region Usage in the Compositor and Viewer}%
\label{sub:timebar_preview_region_usage_in_the_compositor_and_viewer}

The Viewer and Compositor each have a timebar control area with an indicator line below the video
output. The \textit{timebar} shows the whole time covered by the program. When a video asset
is loaded in the main window and you move in the compositor, the insertion pointer in the main
window will reflect those movements.  However, this is not the case with the viewer.  In the viewer
only that specific media is shown and there is no corresponding movement on the timeline.

Both the Compositor and Viewer support labels and in/out pointer which are displayed in the timebar.
And as with the movements, when you use the labels or in/out pointer in the compositor timebar,
the result will also be reflected in the main window timebar.  Along with that, of course, when
you move to a label or in/out pointer in the compositor, the insertion point in the program window
will go to that position.

The timebar in the compositor and the viewer can be used to define a region known as the \textit{preview region}.  
This preview region is the region of the timeline which the slider affects.  
By using a preview region inside the entire program and using the slider inside the preview region you can very precisely and relatively quickly seek in the compositor and viewer.  
The preview region can be especially handy when you have large pieces of media by previewing one section, then move to the next section.  

The active preview region is the zone between the edge bars.  
The full range of the window slider pointer action is down-scaled to the active preview region.   
To use this, set the preview active region as a media time region of interest.  
Now addressing the timebar with the mouse only operates as if the timebar is zoomed to the scale of the active preview zone.  
This has the effect of magnifying the interesting media in terms of the mouse pointer addressing, for fine-tuning.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=1.0\linewidth]{timebar1.png}
    \caption{The arrow above the green colored “play forward” transport button is on the timebar.}
    \label{fig:timebar1}
\end{figure}

To create and use a preview region, hold down the right mouse button inside the timebar on either end of the timebar close to the edge until you see the resize pointer.  
While continuously holding the right mouse button down, drag the arrow away from the end towards the middle of the timebar until you have the desired area outlined.  
The slider will be a dark red color while the selected preview region will remain the same initial black color.  
There are either a left or right resize pointer and you can click and drag in either direction to expand or shrink the region.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=1.0\linewidth]{timebar2.png}
    \caption{A left-facing arrow on the right side of the reddish slider bar is used to drag the bar.}
    \label{fig:timebar2}
\end{figure}

\begin{figure}[htpb]
    \centering
    \includegraphics[width=1.0\linewidth]{timebar3.png}
    \caption{Here you can see the right-facing arrow used to drag the other end of the slider bar.  
        The black area between is the actual preview area.}
    \label{fig:timebar3}
\end{figure}

You can slide the preview zone left or right by holding the right mouse button over the preview zone where you will see a fat double headed arrow.  
The selected area will move left or right as you drag and still retains the same size.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=1.0\linewidth]{timebar4.png}
    \caption{Note the double-headed fat arrow in the preview area used  to move the selection over.}
    \label{fig:timebar4}
\end{figure}

Settings:

\begin{enumerate}
    \item  If no preview region is set, increasing the length of the media on the timeline by inserting media or
        appending, has no effect on the non-selected preview region.  That is, you will not see the blue slider
        suddenly mysteriously appear.
    \item  If the preview region is set, when you replace the current project or file,  the preview region is
        automatically disabled.
    \item  If the preview region is set, when you append data or change the size of the current project, the
        preview region may appear to either move, shrink, or grow depending on the new length of the
        media on the timeline.  
    \item  To disable the preview region, you will have to drag both the right and the left blue slider bars
        completely to their corresponding end so that there is no longer any visible red slider.
\end{enumerate}

A good method for taking advantage of the preview region is described here.  
On the main track canvas, scroll to the beginning of the area of interest.  
When you do that, you will see in the compositor the red indicator line of that location.  
Now in the compositor window, right mouse drag from the left side of the edge of the timebar to create the dark red slider bar line up to the red indicator.  
Back in the main track canvas, move to the location of the area you want to end looking and again you will see the red indicator line in the compositor.  
Use the right mouse drag from the right to stop at that end point.  Using this method is often easier than continuous usage of the single frame move which can be tedious.

One last interesting item of note -- sometimes you may wish to see just a little more that is outside the preview region and you can do so!  You can actually move outside the compositor or viewer window space and view more, at least until you hit the end of the monitor space.

\section{Resources Window}%
\label{sec:resources_window}

Effects, transitions, labels, clips, proxies, user bins, and media assets are accessed here. 
Most of the resources are inserted into the project by dragging them out of the resource window. 
Management of resource allocation is also performed here.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.8\linewidth]{resource_window.png}
    \caption{Folders are in the first column with contents of that folder on the right hand side}
    \label{fig:resource_window}
\end{figure}

The resources window is divided into two areas (figure~\ref{fig:resource_window}. 
One area lists folders and another area lists the folder contents. 
Going into the folder list and clicking on a folder updates the contents area with the contents of that folder. 
The folders can be displayed as icons or text. 
There are several variations for displaying the contents; select \emph{Display text}, \emph{Display icons}, \emph{Display icons packed}, \emph{Display icons list} as types of display for the assets or plugins. 
Use the letter “\texttt{V}” to easily scroll through the choices and see which you prefer.  
You can also get to these options from the menu by a right mouse click in the window.

A \emph{Search} option is available for any of the folders in the Resources window (and when using \textit{Attach effect} on the main track canvas for the Plugins).  
As you type in characters a match is made with that substring.  
Names that do not match are filtered out making it a lot easier to find the item you are looking for.  
The characters can be any where within the phrase and it does not matter if upper or lower case. 

Other options you will see if you \textit{right mouse click in the folder} which brings up the menu are described next.  

\begin{description}
    \item[ Load files ]  for convenience to load files same as from the main window so you do not have to move the mouse so far in case you have multiple monitors.
    \item[Display text/icons]  as described previously for format variations preference.
    \item[Select]  options are All, Used, Unused, and None.  This gives you the capability to have a set of the
        contents highlighted for ease of use so you can see what is or is not loaded, or unset the highlight.
    \item[Sort items]  to sort the contents of the folder alphabetically.  Especially helpful if you accidentally did a 
        drag and changed your mind or dropped suddenly so that the assets no longer look nicely aligned.
    \item[Copy/Paste file list]  use to easily copy a set of files or paste a set of files between \CGG{} and other programs or operating system windows.
    \item[Snapshot/Grabshot]  use to take a quick snapshot or to grab a specific area on the screen.  These functions are described in detail in section \ref{sub:snapshot_grabshot}).
\end{description}

Using the right mouse click to bring up a menu in the folder area, you can also switch from Display text to Display icons, Sort items and create, delete and manipulate user defined folders/bins. Select Folder to create a user Folder or modify an existing folder.

If you \textit{right mouse click on a highlighted/selected resource}, several options are available depending on whether the resource is an effect or transition or a piece of media.  
You can highlight several for some options so that it is applicable to all of them, such as Info.  
Those listed immediately below are the available choices for media assets.


\begin{description}
    \item[Info]  provided basic Asset information; details are described later in this section.
    \item[Display text/icons]  same as mentioned previously.
    \item[Sort]  same as mentioned previously.
    \item[Rebuild index] if you switch from/to using ffmpeg/native for media loading, you should rebuild
        indexes.  Or if you get hangs on media or strange looking tracks, you might want to rebuild indexes.
    \item[View]  use this option to bring up the media in the Viewer window.
    \item[View in new window]  in order to not overwrite your current viewer window, you can open any
        number of viewer windows to simultaneously view multiple media.
    \item[Open mixers]  when you record with multiple cameras setup, you can work with them most easily
        using the mixer mode.  This is described in detail
    \item[Paste]  
    \item[Match]  if you need to change your media parameters you can choose from the following: Match frame
        rate, Match project size, Match all 
    \item[Remove]  use to Remove the asset from the project or with caution, to Remove from disk permanently.
\end{description}

In the case of Effects or Transitions, a right mouse click on a highlighted selection leads to an \emph{Info} button which gives a short 1 line description of what the effect/transition can be used for.
For Labels, choices are \emph{Edit}, \emph{Label}, and \emph{Go to}.
For Clips, \emph{Nest} and \emph{UnNest} as described elsewhere are available.

\subsection{Info Asset Details}%
\label{sub:info_asset_details}

The asset \emph{Info} window also can be used to display detailed information about the selected/highlighted media file -- available for any loaded media of type mpeg or ffmpeg.  
This is extremely helpful in determining what type of media it is, size, resolution, format, and type/number of audio streams.  It is especially useful for multiple program streams.  You can have the info window popped on several of your assets simultaneously.

\textit{Asset's interlacing}  is the type of interlacing the asset has: If the file is (H)DV type, recognition and configuration is done automatically. All other media types will be set unknown. So we have to manually set the interlacing \protect\footnote{From Igor ubuntu's mail}.

Figure~\ref{fig:info_asset_details} shows the \textit{Detail} box to click on the left side and a simple, typical output in the Asset Detail window on the right side.  Also, note the highlighted media in the Resources window.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.99\linewidth]{info_asset_details.png}
    \caption{The “Detail” box}
    \label{fig:info_asset_details}
\end{figure}

\subsection{User Folders/Bins}%
\label{sub:user_folders_bins}

Creating folders that are more specific to a particular project is helpful in better organizing your work.  
This can be done by utilizing the files already loaded to the \textit{master} Media or Clips folders in the Resources window.  The general rule is you can only drag clips to a ClipUserBin and you can only drag media to a MediaUserBin.

Below are steps illustrating an easy way to set up a folder.

%TODO Below part need to be rewriten
\begin{enumerate}
    \item In the Resources window (figure~\ref{fig:folder_resources}), in the location of the Video/Audio effects and Media folders, bring up the \textit{Folder}$\dots$ popup by clicking the right mouse button.  
        Highlight, then click \textit{New Media or Clips}.
        \begin{figure}[htpb]
            \begin{minipage}{.6\linewidth}
                \centering
                \includegraphics[width=0.9\linewidth]{folder_resources.png}
                \caption{Highlight, then click “New Media or Clips”.
                    “Modify folder” can be used to   change the name of a folder.
                    “Delete folder” in the popup can be used to delete a folder.
                }
                \label{fig:folder_resources}
            \end{minipage}
            \hfill
            \begin{minipage}{.37\linewidth}
                \centering
                \vspace{18ex}

                \includegraphics[width=0.9\linewidth]{folder_new.png}
                \caption{Type in your folder name in the textbox.  Click OK.}
                \label{fig:folder_new}
            \end{minipage}
        \end{figure}
    \item  In the \textit{New folder} popup as shown below (figure~\ref{fig:folder_new}), type in your folder name in the textbox.  Click OK.
     \begin{figure}[htbp]    
     	\centering
     	\includegraphics[width=0.9\linewidth]{folder_master.png}
     	\caption{The “master” Media folder}
     	\label{fig:folder_master}
     \end{figure}     
    \item  Select the \textit{master} Media folder to see which files are currently loaded, figure~\ref{fig:folder_master}.  
        Highlight the files there that you want to copy to your new folder (named Photos of Garden).  
        Drag the files to the left and when you see the Photos of Garden folder become highlighted, then drop there.  
        You can drag and drop any of the media from the \textit{master} Media at any time.  
        It flashes when the drop is successful.
\end{enumerate}

Adding the Shift key before the actual drop, will allow for relative path filenames instead of full path.
But you might want to include or eliminate some of the media that exists in one of the folders that you have set up already.  
In this case you will want to click on the \textit{Modify folder} in the popup.  
When you bring up the Modify folder window, if you already have files in that folder, you will see filters that were generated automatically when you did a Drag and Drop.


\begin{figure}[htpb]
    \centering
    %\includegraphics[width=0.8\linewidth]{name.ext}
    \begin{tikzpicture}[scale=1, transform shape]
        \node (img1) [yshift=0cm, xshift=0cm, rotate=0] {\includegraphics[width=0.7\linewidth]{folder_modify.png}};
        \node [yshift=-20mm, xshift=-1cm,anchor=east] at (img1.north west) (Arrow1) {\parbox{8em}{Here is the filter that was generated with the original drop }};
        \node [yshift=-65mm, xshift=0cm,anchor=east] at (img1.north west) (Arrow2) {\parbox{10em}{When you click on the Value portion of that filter, the entire set of files that are covered by the filter rules pops up.   Now you can highlight a target filename that you would like to remove, and just erase that line and check the green checkmark for OK.}};
        \draw [->, line width=1mm] (Arrow1) edge  ([yshift=-20mm] img1.north west);
        \end{tikzpicture}
    
    \caption{Modify target}
    \label{fig:modify-target}
\end{figure}

To delete the entire set of files listed on the filter rule, highlight the rule line and hit the \textit{Del} button.  
To add a new filter rule, click on the \textit{Add} button which will automatically add a default line after any current lines.  
The default line will be a line that matches everything in the \textit{master} Media folder which is \textit{Or  Patterns  Matches   *}.  
Click the right mouse button on the current field underneath the column header to see the choices available for each column.  

Modifications will not be in effect until you click on the green arrow OK button or click on the Apply button.  
But once you hit Apply, clicking on the red X button will not undo your changes.  
The filter/search rules are applied in the order listed in the Modify folder window.  
You can change the order of the filter rules by highlighting the rule you want to move and then drag and drop to a new location.

The figure~\ref{fig:modify_folder} below displays the available choices for each field.

\begin{figure}[htpb]
    \centering
    %\includegraphics[width=0.8\linewidth]{name.ext}
    \begin{tikzpicture}[scale=1, transform shape]
        \node (img1) [yshift=0cm, xshift=0cm, rotate=0] {\includegraphics[width=0.8\linewidth]{modify_folder1.png}};
        \node (img2) [yshift=-1cm, xshift=3.5cm, rotate=0] at (img1) {\includegraphics[width=0.8\linewidth]{modify_folder2.png}};
        \node (img3) [yshift=-1cm, xshift=3cm, rotate=0] at (img2){\includegraphics[width=0.5\linewidth]{modify_folder3.png}};
    \end{tikzpicture}
    \caption{The available choices for each field}
    \label{fig:modify_folder}
\end{figure}

Information about the columns and rules for the search filters in the Modify folder window follows.

Column headers:

\begin{description}
\item[ Enable]  this column is used to designate the state of that filter rule
    \begin{description}
        \item[ Off]		disable the filter
                \item[And] 		narrow your search; all of your search terms must be present
                \item[Or]		broaden your search to include more values
                \item[And Not]	exclude terms that do not contain the given value from your search results
                \item[Or Not]	include terms that do not contain the given value from your search results
    \end{description}
\item [Target] – this column designates which media asset attribute to look at
    \begin{description}
        \item[ Patterns]	each line contains a filename filter, matches the file path
                \item[Filesize]	number of bytes in a file
                \item[Time]		date file was created
                \item[Track Type]	track type of video, audio, or audio video (for both)
                \item[Width]	Format width
                \item[Height]	Format height
                \item[Framerate]	Video framerate
                \item[Samplerate]	Audio samplerate
                \item[Channels]	Number of audio channels
                \item[Duration]	Playback time in seconds -- it uses the largest of audio or video if contains both
    \end{description}
\item[Op] – boolean operators used to narrow or broaden the relationship between your search terms
    \begin{description}
        \item[Around]	about this value; use \textit{+radius} for a search range: [target–radius$\dots$  target+radius]
        \item[Eq	]	equal to
        \item[Ge]	greater than or equal to
        \item[Gt]	greater than
        \item[Ne]not equal
        \item[Le]	less than or equal
        \item[Lt] less than
        \item[Matches]	exactly matches for strings
    \end{description}
\end{description}

\textbf{Value} --- the characteristic you are looking for with expressions that can be written with the following:

\begin{description}
\item[Number] (decimal points are allowed and will be converted to a standard form):
    \begin{description}
        \item[inf] representing infinity
        \item[\#[TtGgMmKk]]  ---  where \# represents a number and the characters mean:
    \end{description}

    \begin{tabular}{rcl}
        inf&=& infinity\\
        T&=&1099511627776\\
        t&=&1000000000000\\
        G&=&1073741824\\
        g&=&1000000000\\
        M&=&1048576\\
        m&=&1000000\\
        K&=&1024\\
        k&=&1000\\
    \end{tabular}

\item[Scalar:] 

    \begin{tabular}{l}
        Number\\
        Number+Number\\
    \end{tabular}
\item[Date time:]
    \begin{tabular}{rcl}
        date&=&year/month\\
        date&=&year/month/day\\
        time&=&hour:minute\\
        time&=&hour:minute:second\\
        date\_time&=&date time\\
    \end{tabular}

  \item[Duration:]
      \begin{tabular}{rcl}
    day  &=&	\#day 	  | \#days\\
    week &=&	\#week 	  | \#weeks\\
    month&=&	\#month | \#months\\
    year &=&	\#year	  | \#years\\
    delta&=&secs\\
    delta&=&mins:secs\\
    delta&=&hours:mins:secs\\
      \end{tabular}

\item[Around time:]
    date time+duration

  \item[Around length:]
    duration+duration

\end{description}

Table showing the allowed usage:

%TODO create table for below code
\begin{lstlisting}[numbers=none]
target:    |  eq  ge  gt  ne  le  lt   matches  around
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
patterns   | <---- strcmp ---------> + filter + nearest
file_size  | <---- arithmetic -------+------> + radius
mod_time   | <---- arithmetic -------+------> + radius
track_type | <---- member test ------+--------+------>
width      | <---- arithmetic -------+------> + radius
height     | <---- arithmetic -------+------> + radius
framerate  | <---- arithmetic -------+------> + radius
samplerate | <---- arithmetic -------+------> + radius
channels   | <---- arithmetic -------+------> + radius
duration   | <---- arithmetic -------+------> + radius
\end{lstlisting}

where in the above, the filter can be:

\begin{tabular}{rcl}
    filter&=&list\\
    filter&=&token\\
    list&=&[token]\\
    list&=&[token]list\\
    string&=&<chars>|<empty>\\
    token&=&string\\
    token&=&string*token\\
\end{tabular}

Examples with some caveats first:

\begin{enumerate}
    \item   \textit{Or} generally includes or adds whereas \textit{And} generally excludes or subtracts.
    \item   The filters only work on media in the folder; if there is no media, then there is nothing to search.
    \item   The examples below are not meant to be executed as a list of filters in Modify folder, they are just single line examples to indicate what can work.
    \item   Sort is by filename base name (directory path not included automatically) except when the \textit{Around} operation is used and then it is sorted by that Target distance first and then filename.
\end{enumerate}

\begin{table}[htpb]
    \centering
    \caption{Examples}
    \label{tab:label}
    \small
    \begin{tabular}{lllm{10em}m{10em}} \toprule
        Enable&	Target&	Op&	Value&	meaning\\\midrule
Or	&Patterns  &Matches   &*&	 all files from the Media folder are included\\
And Not&Filesize&Lt	&160000000& no files that are less than 160MB in size \\
Or Not&	Time	&Ge	&2018/07/30 06:13:00	& files not greater than or equal date\\
And	&Duration&Eq	&01:00		& files included must have 60 secs. Duration\\
Off	&Samplerate&Ne	&44000		& off for now, but may want to include later\\
And	&Framerate&Around&24+1		& files included all have 24 to 25 framerate\\
Or	&Patterns&Matches&[*.mp4]	& all files with the extension of mp4\\
Or	&Time&	Around&2018/08/02 06:00:00 + 02:00:00  & files at 4AM to 8 AM\\\bottomrule
    \end{tabular}
\end{table}


\subsection{Vicons \& Aicons – aka Video Icons / Audio Icons}%
\label{sub:vicons_aicons_aka_video_icons_audio_icons}

Vicons are video icons.  
Aicons are audio icons.  
By default the Resources window will play the first 5 seconds of video or audio waveform looped in the area occupied by the media icons (figure~\ref{fig:vicons1}). 
This is enabled for the Media/Proxy folders in icon mode when the mouse pointer is inside the Resources window. 

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.99\linewidth]{vicons1.png}
    \caption{Note "Full Play" mode and Vicons and Aicons in Media folder}
    \label{fig:vicons1}
\end{figure}

The waveform in the figure~\ref{fig:vicons2} is displayed in the Resources window in the color green for the 3 audio tracks. 
There is a colored bar on the top of each a-icon where the color is based on the Color Spectrum -- the smaller the time duration, the redder the color; then as the time duration goes up, the color goes up so that you will go to green, then yellow, then blue, then really dark blue, then purple for the audio files 1 hour and over.  
There are various other colors between these colors same as that seen in the color spectrum in the screenshot below.  
Colors are utilized from the hue wheel in the counter-clockwise direction.  
Note that the horizontal line in the middle of the a-icon is yellow/red representing the 2 audio tracks and is only red for mono.



\begin{figure}[htpb]
    \centering
    %\includegraphics[width=0.8\linewidth]{name.ext}
    \begin{tikzpicture}[scale=1, transform shape]
        \node (img1) [yshift=0cm, xshift=0cm, rotate=0] {\includegraphics[width=0.99\linewidth]{vicons2.png}};
        \node (img2) [yshift=0cm, xshift=2.8cm, rotate=0] at (img1.south west) {\includegraphics[width=0.3\linewidth]{hue_wheel.png}};
        \node [yshift=-5mm, xshift=1cm,anchor=west] at (img2.east) (Arrow1) {\parbox{18em}{Color hue wheel. For illustration only}};
        \draw [->, line width=1mm] (Arrow1) edge  ([yshift=-5mm] img2.east);
    \end{tikzpicture}
    \caption{Draw Vicons   |            Screenshot display various audio file lengths; red is shortest.}
    \label{fig:vicons2}
\end{figure}

Note that if in \texttt{Settings $\rightarrow$ Preferences} under the Appearance tab, you have unchecked \textit{Use thumbnails in resource window} you will only have default icons and none of the above capabilities.


\subsection{Resources Window Preview Mode}%
\label{sub:resources_window_preview_mode}


Preview mode can be used to pop up a window which draws the vicons/aicons thumbnails in a larger size.  
Preview or \textit{draw vicons} mode is a helpful feature of \CGG{} that lets you see and/or hear the first 5 seconds of the video for identification purposes. 
The Preview mode/playback toggle is to the right of the Visibility label as seen in the screenshot above. 
Preview mode is available for the Media, Proxy, Media User Bins, and Clips but clips are only 1 image.

When \textit{Preview/draw vicons} is enabled/active, if you click on one of the video icons or an audio waveform icon, a view pops up that increases the size to 4 times the surface area larger. 
This makes it easier to see or hear if it is the media you are looking for in case you have many similar media files. 
To conserve memory, the video is stored 8\,bits per pixel which results in low image quality while the audio is 16\,bit. 
The reason for playing 5 seconds of a video for a vicon is that until the first I-frame, the media frequently does not decode properly.  
In other words, a lot of media does not begin at the \textit{beginning} point and will not be properly rendered until enough data has been read to assemble a picture.  
You can increase the thumbnail size, clarity of pixels (memory size) and color mode but it takes a lot more memory.  
Change these values in \texttt{Settings $\rightarrow$ Preferences}, Appearance tab, right hand side of the Layout section -- be aware that when you click OK, your session will re-initialize.  
You can also temporarily increase the preview mini-window by use of the mouse wheel up or down.

There are 4 options for the preview mode.

\begin{enumerate}
    \item  \emph{Full Play} is the default mode.  
        This means all of the media will automatically play when the mouse is in the Resources window and you can use the left mouse button to click on specific media to see it pop up in a larger view.  
        Audio only files do not play the audio until the icon is clicked on and the waveform aicon pops up into the 4x larger mode. 
        \emph{Full Play} includes the \emph{Mouse Over} capabilities as described below as well as the Inter-View \emph{Src Target} functions.

	\item  \emph{No Play} mode is especially useful on smaller computers and for users who find the constant loop play to be somewhat distracting.

	\item  \emph{Mouse Over} mode is activated by a single click on one of the vicons/aicons and deactivated with another single click over any of the icons.  
    Once activated, whenever you just move the mouse over an icon, it automatically pops up the increased size preview.  
    The first time in your session that you enable this feature, it may take a few seconds to load all of the icon previews into memory so be patient and just wait.  
    \emph{Mouse Over} mode makes it quick and easy to preview without having to drag the media to the viewer.  
    You can still drag the media same as without preview enabled.  

	\item  \emph{Src Target} mode gives easy access to the Inter-View source target available by using the middle mouse button on media.  
    There are 2 advantages to this mode -- there is no 5 second play loop taking up cpu time and the popup allows for the use of the letter “\texttt{f}” on that popup to have it go to fullscreen mode.  
    \emph{Src Target} mode in any scenario never plays sound as that is nonsensical usage.  
    After the initial click to pop media in this mode, you also have the \emph{Mouse over} feature.
\end{enumerate}

For any of the options, but not \emph{No Play}, you can temporarily turn off that option by clicking on the button using the middle mouse button.  
This helps to avoid having the thumbnail get in the way of dragging or other functions.  
When you do, a line will be drawn through the current preview mode so that you are aware that it is in \emph{No Play} mode until click it again.

Note that if in \texttt{Settings $\rightarrow$ Preferences} under the Appearance tab, you have unchecked \textit{Use thumbnails in resource window} you will only have default icons and no active previews.

\begin{figure}[htpb]
    \begin{minipage}{.69\linewidth}
        \centering
        \includegraphics[width=0.99\linewidth]{preview_icon_mode.png}
        \caption{The location of the Preview/Draw Icons mode.}
        \label{fig:preview_icon_mode}
    \end{minipage}
    \hfill
    \begin{minipage}{.29\linewidth}
        \vspace{2ex}
        \centering
        \includegraphics[width=0.7\linewidth]{line_through_mode.png}
        \caption{Note the line through the mode.}
        \label{fig:line_through_mode}
    \end{minipage}
\end{figure}



\subsection{Moving clips/media from/to Resources window}%
\label{sub:moving_clips_media_from_to_resources_window}

If you have several media files loaded into the Resources window of one instance of \CGG{} and want to load some of the same ones into another instance or just want a listing to save in a file for later use, you can do this with these set of steps:

Copy or paste a list of files in the Media Resources window:  


\begin{enumerate}
    \item  create a highlighted selection of the desired media files in the media Resources window
    \item    right click on an unused portion of that window to bring up the popup menu
    \item     select the \textit{Copy file list} item and a file list box will appear that contains the full path filenames
    \item     wipe the textbox using your standard copy/paste method to put the list of files in the copy buffer
    \item     in another \CGG{} instance, choose the \textit{Paste file list} of the media Resources window
    \item     paste the list of files, again using your standard paste method, into the new file list box; press OK
    \item    the status bar of the main window will be updated as the file list is loaded to the media folder (the purpose of displaying the status is simply to show that the load is progressing normally).
\end{enumerate}

Obviously this \textit{Paste file list} feature means you can create a list of files outside of \CGG{} using an editor, wipe the names, and then use \textit{Paste file list} to load them into the media Resources window.  

It is important to note that in the steps above, the Operating System cut and paste capabilities are in use for steps 4 and 6 as opposed to \CGG{}’s c/v shortcuts.  
Since the procedure varies among the distros, you will have to adapt to your specific one.  For example, a usage for ubuntu consists of:
\begin{enumerate}
    \setcounter{enumi}{3}
    \item   Ctrl-c to copy the list of files; open gedit; Ctrl-v to paste the list of files into gedit
    \item   Ctrl-c or the standard way using the right click to copy this list from gedit
    \item Ctrl-v paste the list of files into the new file list box, and press OK
\end{enumerate}

\begin{figure}[htpb]
    \centering
    \begin{minipage}{.9\linewidth}
    \centering
        \includegraphics[width=0.99\linewidth]{copy_files1.png}
    \end{minipage}
    \vfill
    \begin{minipage}{.5\linewidth}
    \centering
        \includegraphics[width=0.99\linewidth]{copy_files2.png}
    \end{minipage}
    \caption{Example of copy file list}
    \label{fig:copy_files1}
\end{figure}

In the Figure~\ref{fig:copy_files1}, one instance of \CGG{} has 3 items in the Media area highlighted that were copied to the file list.  
Note how it includes the full pathname.

In this screenshot on another instance of \CGG{}, there are only 2 items in the media but the \textit{Paste file list} box is ready to have the items inserted via the standard text box paste method.  When that is done, the additional 6 media files will be available on this other instance too.


Another possible usage of this capability:

\begin{enumerate}
    \item  Right Click on the Clips Resources window and use the \textit{Paste Clip} option to paste the Copy selection as a clip.  
    \item  Similarly, by highlighting a clip in the Resources window and selecting its copy popup menu item using the right mouse button, that copy buffer can now be loaded onto the timeline.
\end{enumerate}


\subsection{Snapshot / Grabshot}%
\label{sub:snapshot_grabshot}

\begin{figure}[htpb]
    \centering
    \begin{minipage}{.49\linewidth}
    \centering
    \includegraphics[width=0.8\linewidth]{snapshot.png}
    \caption{Snapshot menu and choices}
    \label{fig:snapshot}
    \end{minipage}
    \begin{minipage}{.49\linewidth}
    \centering
    \begin{tikzpicture}[scale=1, transform shape]
        \node (img1) [yshift=0cm, xshift=0cm, rotate=0] {\includegraphics[width=0.65\linewidth]{grabshot.png}};
        \node (img2) [yshift=2cm, xshift=-1cm, rotate=0] {\includegraphics[width=0.07\linewidth]{reticle.png}};
    \end{tikzpicture}
    \caption{Grabshot reticle \& orange box}
    \label{fig:grabshot_recticle}
    \end{minipage}
\end{figure}

To take a snapshot, perform the following steps:

\begin{enumerate}
    \item set your timeline insert marker where you want the snapshot -- this frame shows in the compositor
    \item  right click in an empty spot in the media folder and the popup shows snapshot as the $5^{th}$ item down
    \item  highlight that and the submenu comes up allowing you to choose png, jpg, ppm or tiff
\end{enumerate}

The snapshot shows up in the Media folder.  
It is saved by default in \texttt{/tmp} as

\texttt{snap\_date-time.ext} BUT you can change the default directory path in \texttt{Settings $\rightarrow$ Preferences $\rightarrow$ Interface tab} in the right hand side of the Editing section.

Grabshot is the $6^{th}$ menu item.  
A red circle reticle can be moved to the area to grab; use left mouse drag to surround an area; and right click to grab.




\section{Other Options and Other Windows}%
\label{sec:other_options_and_other_windows}

\subsection{Transport Controls}%
\label{sub:transport_controls}

Transport controls are useful for navigation and for playing media.  
Each of the Viewer, Compositor, and Program windows has its own transport panel.  
The controls generally all contain a yellow colored tooltip when you mouse over the control, providing a hint of their function and shortcuts for usage.

The transport panel is controlled by the keyboard as well as the graphical interface. 
For each of the operations it performs, the starting position is the position of the insertion point in the Program window and the slider in the Compositor and Viewer windows. 
The ending position is either the end or start of the timeline or the end or start of the selected region if there is one.

The orientation of the end or start depends on the direction of playback. 
If it is forward the end position is the end of the selected region. 
If it is backward the end position is the start of the selected region.  
The insertion point moves to track playback. 
When playback stops, the insertion point stays where playback stopped. 
Thus, by playing back you change the position of the insertion point. 
The keyboard interface of either the numeric pad or alternative keys has more speeds with the addition of \emph{Forward Slow}(2) and \emph{Reverse Slow} (5).  
Hitting any key on the keyboard twice pauses it. 
The shortcuts section of this manual as well as a Shell Command available from the \CGG{} main window has a listing of each of the keys.

When using frame advance functions the behavior may seem odd. 
If you frame advance forward and then frame advance backward, the displayed frame does not change. 
This is because the playback position is not the frame but the time between two frames. 
The rendered frame is the area that the playback position crosses. 
When you increment the time between two frames by one and decrement it by one, you cross the same frame both times and so the same frame is displayed.  
There is an option in \texttt{Settings $\rightarrow$ Preferences, Appearance tab} to \textit{Always show next frame} that may help make this clearer for some users.

The transport behavior changes if you hold down Ctrl when issuing any of the transport commands. This causes the starting point to be the In point if playing forward and the Out point if playing backward. If playing forward, the Out point becomes the ending point and if playing backward, the In point becomes the ending point. If no In/Out points are specified, the behavior falls back to using the insertion point and track boundaries as the starting and ending points.

The transport behavior also changes if you hold down the Shift key along with KeyPad 1--6.  
If normally audio is included in the play, it will be removed and if normally audio is not included in the play, it will be added.


\subsection{Zoombar}%
\label{sub:zoombar}

The compositor has zoom capability. 
The pull-down menu on the bottom of the compositor window has a number of zoom options. 
When set to Auto the video is zoomed to match the compositor window size as closely as possible. 
When the video is zoomed bigger than the window size,  you can use scrollbars to scan around or if the zoom icon is enabled, the middle mouse button can be used to zoom in or out the video.

The zoom toggle also causes the Compositor window to enter zoom mode. 
In zoom mode, clicking in the video output zooms in while a Ctrl-click in the video output zooms out. 
If you have a wheel mouse, rotating the wheel zooms in or out too. 
Zooming in or out with the zoom tool does not change the rendered output. 
It is merely for scrutinizing video or fitting it in the desktop. Playing video on the compositor when zoomed to any size other that 100\%, the original size, requires \CGG{} to do extra processing steps. 
This could affect performance on slower systems

\subsection{Show Overlays}%
\label{sub:show_overlays}

Color Coded Keyframe Curves are a big feature in the \textit{Show Overlays} window because by changing the colors to suit the user, it helps to remove confusion from multiple curves on the track canvas.  
They can be viewed from the pulldown menu of \texttt{Window $\rightarrow$ Show overlays} but they will operate the same as when used from the View pulldown menu.  
The \textit{Color Coded Keyframe Curves} have distinct colors associated with each type for ease of identification.  
By clicking LMB on the \textit{Color Ball} to the right of any keyframe type in the \textit{Show overlays} menu you have the ability to change the colors to whatever works best for your video.  
The color ball changes made will be retained across sessions.

There is a line separating the first 4 items, which are just non-automation type settable values as opposed to \textit{auto} keyframe types.  
The color is not changeable for the 3 items of Mode, Pan, and Mask which simply display their symbol icon.

Figure~\ref{fig:overlays_window} displays the Show overlays popup with all of its options and color coded types such as yellow for Speed and blue for Camera Z.  
Upon clicking on the associated \textit{color ball} to the right of any keyframe type, for example \textit{Fade} in this screenshot, the color wheel palette window pops up so that you can manipulate the color as desired.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=0.85\linewidth]{overlays_window.png}
    \caption{Show Overlays window on the left with the Color ball window to the right to set color}
    \label{fig:overlays_window}
\end{figure}

Figure~\ref{fig:overlays1} shows several color coded lines for different keyframes along with the Fade slider for manipulation.  
The slider is in the same color as the color coded keyframe type line which is the same color as in the \textit{Show overlays} window.

\begin{figure}[htpb]
    \centering
    \includegraphics[width=1.0\linewidth]{overlays1.png}
    \caption{Lines are colored here on the timeline as designated in Show Overlays}
    \label{fig:overlays1}
\end{figure}

Overlays Window Nuances:

The Overlays window is an alternative to the main track canvas View pulldown, and thus the order is mostly maintained to match each other.  
To make it easier to get a quick temporary look at a specific option, there is a shortcut of Shift-LMB (left mouse button) that can be used as opposed to having to uncheck everything that is currently checked and then having to recheck them on when done.  
Here is a list of how they work.  Keep in mind that if the Expander on the patchbay is enabled, you still see the track.

\begin{itemize}
    \item  Shift+LMB (left mouse button) in the Overlays Window on a checkbox will turn off all other
        checkboxes except for the one you are on.  Then this named box will have outline for a  \textit{hot} spot.
    \item  Shift+LMB on this \textit{hot} spot will return to \textit{cool} of the previous settings with all of the previous
        checkboxes checked again.
\end{itemize}

\begin{figure}[htpb]
	\begin{minipage}{.29\linewidth}
		\centering
		\includegraphics[width=0.99\linewidth]{overlays_list1.png}
		\caption{Original Settings --- cool spot}
		\label{fig:overlays_list1}
	\end{minipage}
	\hfill
	\begin{minipage}{.29\linewidth}
		\centering
		\includegraphics[width=0.99\linewidth]{overlays_list2.png}
		\caption{Note Titles box hot spot  }
		\label{fig:overlays_list2}
	\end{minipage}
	\hfill
	\begin{minipage}{.29\linewidth}
		\centering
		\includegraphics[width=0.99\linewidth]{overlays_list3.png}
		\caption{Cam/Proj XYZ toggle to fine tune}
		\label{fig:overlays_list3}
	\end{minipage}
\end{figure}

\begin{itemize}
    \item  Shift+LMB on a non-\textit{hot} spot will simply check or uncheck a box and there is no previous state.
    \item This all works in conjunction with the View pulldown menu which, of course, has no hot spots.
    \item  Caveat \#1 - Shift+LMB on the top 4 choices of Assets, Titles, Transitions, Plugin Keyframes will turn
        off all of the checkboxes below because it makes sense to do so.
    \item  Caveat \#2 - Shift+LMB on the Autos will not turn off Assets, Titles, Transitions, or Plugin Keyframes
        because you need to be able to see what is going on.
        \item Caveat \#3 - XYZ toggle on/off of Camera and Projector are not affected.
\end{itemize}




\subsection{Sound Level Meters Window}%
\label{sub:sound_level_meters_window}

An additional window, the levels window, can be brought up from the Window pulldown.  
The levels window displays the output audio levels after all mixing is done.  
The visible range of the sound level meters is configurable in \texttt{Settings $\rightarrow$ Preferences, Interface tab} under the Operations section.

Sound level meters can be toggled in the viewer and compositor windows with the show meters button.  
They also appear in the patchbay when the track is expanded and in the recording monitor when audio is being recorded. 

The sound levels in the levels window, compositor, and viewer correspond to the final output levels before they are clipped to the sound card range.  
In the record monitor they are the input values from the sound card.  
In the patchbay they are the sound levels for each track after all effects are processed and before down-mixing for the output.  
Most of the time, audio levels have numerical markings in dB but in the patchbay there is not enough room.

\begin{wrapfigure}[15]{O}{0.3\linewidth} 
	\centering
	\vspace{-4ex}
	\includegraphics[width=0.5\linewidth]{volume_meter.png}
	\caption{Sound Level Meters Window}
	\label{fig:volume_meter}
\end{wrapfigure}

The sound level is color coded as an extra means of determining the sound level.  
Even without numerical markings, the sound level color can distinguish between several ranges and overload.  
Look at the color codings in a meter with numerical markings to see what colors correspond to what sound level.  
Then for meters in the patchbay in expanded audio tracks, use the color codings to see if it is overloading.

Be aware that sound levels in \CGG{} can go above 0 dB.  
This allows for not only seeing if a track is overloading but how much information is being lost by the overloading.  
Overloading by less than 3 dB is usually acceptable.  
While overloading is treated as positive numbers in \CGG{}, it is clipped to 0 when sent to a sound card or file.


%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../CinelerraGG_Manual"
%%% End:
