13397533add109426189fa476dafb28670e84fce
[goodguy/cin-manual-latex.git] / parts / Editing.tex
1 \chapter{Editing}%
2 \label{cha:editing}
3
4 Editing comprises both time and track space.  The timeline consists
5 of the time certain media appear on the track going left to right
6 and a set of tracks from the top to the bottom.  There are 2 methods
7 of timeline editing -- drag and drop editing, also called
8 \textit{arrow mode}, and cut and paste editing or \textit{I-beam
9   mode}.  Cut and Paste is the default editing mode.  An additional,
10 but not often considered editing method is called \textit{two-screen
11   editing} where the Viewer is used to view media and then the
12 desired clip from the media is transferred to the timeline.
13
14 The timeline is where all editing decisions are made
15 (figure~\ref{fig:timeline}).  This is a stack of tracks in the
16 center of the main window.  It can be scrolled up, down, left and
17 right with the scrollbars on the right and bottom.  It can also be
18 scrolled up and down with a mouse wheel, or left and right while
19 holding down the Ctrl key and using the mouse wheel.
20
21 \begin{figure}[htpb]
22   \centering
23   \includegraphics[width=1.0\linewidth]{timeline.png}
24   \caption{Timeline editing session}
25   \label{fig:timeline}
26 \end{figure}
27
28 The active region is the range of time which is affected by editing
29 commands on the timeline.  The active region is determined first by
30 the presence of in/out points on the timeline.
31 %
32 If those do not exist the highlighted region is used. To reiterate,
33 \emph{highlighting} is done in \emph{cut and paste mode} by moving
34 the insertion point with the mouse in the timeline to where you want
35 to start. Then hold down the LMB\@, drag the mouse to where you want
36 the end point to be and release the LMB\@. In \emph{drag and drop
37   mode}, the method to create a highlighted selection is to hold
38 down the Ctrl key and double click with the LMB with the mouse over
39 that column.
40
41 If no highlighted region exists, the insertion point is used as the
42 start of the active region.  Some commands treat all the space to
43 the right of the insertion point as active while others treat the
44 active length as 0 (zero) if no end point for the active region is
45 defined.
46
47 Most importantly, editing decisions never affect source material
48 meaning that it is non-destructive editing.  So not only does your
49 original media stay completely untouched, it is much faster than if
50 you had to copy all the media affected by an edit.  Editing only
51 affects pointers to source material, so if you want to have a new
52 modified media file at the end of your editing session which
53 represents the editing decisions, you need to render it.  Saving and
54 loading your edit decisions is explained in the Load, Save and the
55 EDL section and rendering is explained in the section on Rendering.
56
57 In the following editing sections, references to common operations
58 are scattered within any of the modes where they seem pertinent.
59 However, many of the editing operations work in different modes.
60
61
62 \section{The Patchbay}%
63 \label{sec:patchbay}
64
65 On the left of the timeline is a region known as the patchbay.  The
66 patchbay enables features specific to each track as described next.
67
68
69 \begin{description}
70 \item[Textbox] for naming the track.  The default names will usually
71   be Video \#, Audio \#, or Mixer \# if using the multi-camera/mixer
72   operations.  A \# will be designated for subsequent tracks as in 1,
73   2, 3 and so on.
74 \item[Expander] which is a down arrow on the right side, is for
75   viewing more options on the patchbay and for viewing the effects
76   represented on the track.  You can just click on the expander to
77   expand or collapse the patchbay and the track.  If it is pointing
78   sideways, the track is collapsed.  If it is pointing down, the track
79   is expanded.  Existing effects appear below the media for the track.
80 \end{description}
81
82 Below the textbox name are several toggles referred to as
83 \textit{attributes} for different features (currently there are 7 as
84 shown in figure~\ref{fig:patchbay01}).  If the toggle button is
85 shadowed by a color, the feature is enabled. If the toggle is the
86 background color of most of the window, it is disabled. Click on the
87 toggle to enable/disable the feature.
88
89 \begin{wrapfigure}[13]{O}{0.3\linewidth}
90   %\vspace{-2ex}
91   \centering
92   \includegraphics[width=0.79\linewidth]{patchbay01.png}
93   \caption{Patchbay}
94   \label{fig:patchbay01}
95 \end{wrapfigure}
96
97 Several mouse operations speed up the configuration of several
98 tracks at a time. Click on an attribute and drag the cursor across
99 adjacent tracks to copy the same attribute to those tracks.  Hold
100 down Shift while clicking a track's attribute to enable the
101 attribute in the current track and toggle the attribute in all the
102 other tracks. Or you can:
103
104 \begin{enumerate}
105 \item hold down Shift while clicking an attribute,
106 \item click until all the tracks except the selected one are
107   disabled,
108 \item then drag the cursor over the adjacent track to enable the
109   attribute in the adjacent track.
110 \end{enumerate}
111
112 The 7 \textit{attributes} are described here next followed by the other available feature icons and their description.
113
114 \begin{description}
115 \item[Play Track] determines whether the track is rendered or
116   not. If it is off, the track is not rendered.  For example if you
117   turn it off in all the video tracks, the rendered media file will
118   have only audio tracks.  If the track is chained to any other tracks
119   by a shared track effect, the other tracks perform all the effects
120   in this shared track, regardless of play status of the shared track
121   that in this particular case affects the media output but not fade
122   and effects.
123 \item[Arm Track] determines whether the track is armed or not.
124   Only the armed tracks are affected by editing operations. Make sure
125   you have enough armed destination tracks when you paste or splice
126   material or some tracks in the material will get left out.  In
127   addition to restricting editing operations, the armed tracks in
128   combination with the active region determine where material is
129   inserted when loading files.  If the files are loaded with one of
130   the insertion strategies which do not delete the existing project,
131   the armed tracks will be used as destination tracks.
132 \end{description}
133
134 \begin{description}
135 \item[Gang Fader] cause the fader to track the movement of
136   whatever other fader you are adjusting by dragging either the fader
137   or the curve on the track.  It doesn't affect the editing made with
138   menu controls.  A fader is only ganged if the arm track is also on.
139   This is often used to adjust audio levels on all the tracks
140   simultaneously.  Gang also causes Nudge parameters to synchronize
141   across all the ganged tracks.
142 \item[Draw Media] determines if picons or waveforms are drawn on
143   the asset in the track.  You may want to disable this if you know
144   that the media/format takes a long time to draw on the timeline.  By
145   default it is set to on in order to see picons on the timeline.
146 \item[Don’t send to output] -- more commonly called
147   \textit{mute} -- causes the output to be thrown away once the track is
148   completely rendered. This happens whether or not \textit{Play track}
149   is on.  For example if you mute all the video tracks, the rendered
150   media file will have a blank video track.  Mute track is represented
151   on the timeline with a line that has the default color of a
152   pinkish-orange.  Use the pulldown \texttt{View $\rightarrow$ Mute} to
153   have the line displayed.  It is a keyframable attribute, but Mute
154   track keyframing is a toggle and it has only the two values of on or
155   off. If a track is part of a shared track effect, the output of the
156   track with the shared track effect is overlaid on the final output
157   even though it is routed back to another track (the shared track).
158   Mute track is used to keep the track with the shared track effect
159   from overlapping the output of the source track (the shared track)
160   where the shared track effect is not present.
161 \item[Track Data Height] this up/down toggle symbol to the immediate right
162 of the 5 attributes, is used to individually resize each track.  This makes
163 it very easy to temporarily expand or contract the size of that track either
164 by clickin with the left mouse button or using the middle wheel up/down.
165 \item[Master Track] Mark a track as \textit{master} serves when using \textit{Gang Channels} or \textit{Gang Media} mode. see ...
166 \item[Fader slider] fade values are represented on the timeline
167   with a pink (default color) curve that is keyframable.  All tracks have a fader, but
168   the units of each fader depend on whether it is audio or video.
169   Audio fade values are in dB. They represent relative levels, where 0
170   is the unaltered original sound level, -40 is silence, -80 the
171   minimum value set by default.  You can move fader and keyframes down
172   to -80 but the parameter's curve won't go below -40.  For your
173   convenience you can set a different fade range with the curve zoom.
174   Audio fader’s main purpose is to \textit{fade out} sound or to lower
175   the sound level smoothly to silence, or \textit{fade in} to make
176   sounds appear gradually instead of suddenly.  Video fade values are
177   the percentage of opacity of the image in normal overlay mode, the
178   percentage of the layer that is mixed into the render pipeline in
179   the other overlay modes.  Click and drag the fader to fade the track
180   in and out.  If it is ganged to other tracks of the same media type,
181   with the arm option enabled, the other faders should follow.  Hold
182   down the Shift key and drag a fader to center it on the original
183   source value (0 for audio, 100 for video).
184 \item[Mixer] in the expanded patchbay for that track designates
185   the multi-camera mixer mode.
186 \item[Overlay mode] in the expanded patchbay is used for
187   porter-duff operations and is full explained in
188   \nameref{cha:overlays} chapter.
189 \item[Nudge] is in the expanded patchbay.  The nudge value is
190   the amount the track is shifted left or right during playback. The
191   track is not displayed shifted on the timeline, but it is shifted
192   when it is played back. This is useful for synchronizing audio with
193   video, creating fake stereo, or compensating for an effect which
194   shifts time, all without altering any edits
195   (figure~\ref{fig:overlay}).
196
197   \begin{figure}[htpb] \centering
198     \includegraphics[width=0.65\linewidth]{overlay.png}
199     \caption{Video Overlay, audio Pan and Nudge.}
200     \label{fig:overlay}
201   \end{figure}
202
203   Enter the amount of time to shift to instantly shift the
204   track. Negative numbers make the track play later. Positive numbers
205   make the track play sooner. The nudge units are either seconds or
206   the native units for the track (frames or samples). Select the units
207   by right clicking on the nudge textbox and using the context
208   sensitive menu. Nudge settings are ganged with the Gang faders
209   toggle and the Arm track toggle. Use the mouse wheel over the nudge
210   textbox to increment and decrement the value.
211 \item[Pan] is available in the expanded patchbay for audio
212   tracks via a panning box. Position the pointer in the panning box
213   and click/drag to reposition the audio output among the speaker
214   arrangement. The loudness of each speaker is printed on the relative
215   icon during the dragging operation. The panning box uses a special
216   algorithm to try to allow audio to be focused through one speaker or
217   branched between the nearest speakers when more than 2 speakers are
218   used.
219 \end{description}
220
221 Press the Tab key while the cursor is anywhere over a track to
222 toggle the track arming status. Press Shift-Tab while the cursor is
223 over a track to toggle the arming status of every other track.
224
225 \paragraph{Automatic audio mappings} Several convenience functions
226 are provided for automatically setting the panning to several common
227 standards. They are listed in the Audio menu. These functions only
228 affect armed audio tracks. They are:
229
230 \begin{description}
231 \item[Audio~$\rightarrow$~Map 1:1] This maps every track to
232   its own channel and wraps around when all the channels are
233   allocated. It is most useful for making 2 tracks with 2 channels map
234   to stereo and for making 6 tracks with 6 channels map to a 6 channel
235   sound card.
236 \item[Audio~$\rightarrow$~Map 5.1:2] This maps 6 tracks to 2
237   channels. The project should have 2 channels when using this
238   function. Go to \texttt{Settings $\rightarrow$ Format} to set the
239   output channels to 2. This is most useful for down-mixing 5.1 audio
240   to stereo (for more information refer to Configuration, Settings and
241   Preferences section~\ref{sub:audio_out_section}).
242 \end{description}
243
244 \paragraph{Standard audio mappings} Although \CGG{} lets you map any
245 audio track to any speaker, there are standard mappings you should
246 use to ensure the media can be played back elsewhere. Also, most
247 audio encoders require the audio tracks to be mapped to standard
248 speaker numbers or they will not work.
249
250 In the channel position widget, the channels are numbered to
251 correspond to the output tracks they are rendered to. For stereo,
252 the source of channel 1 needs to be the left track and the source of
253 channel 2 needs to be the right track.  For 5.1 surround sound, the
254 sources of the 6 channels need to be in the order of center, front
255 left, front right, back left, back right, low frequency effects. If
256 the right tracks are not mapped to the right speakers, most audio
257 encoders will not encode the right information if they encode
258 anything at all. The low frequency effects track specifically can
259 not store high frequencies in most cases.
260
261
262 \section{Manipulating Tracks}%
263 \label{sec:manipulating_tracks}
264
265 Tracks in \CGG{} either contain audio or video.  There is no special
266 designation for tracks other than the type of media they contain.
267 When you create a new project, it contains three default tracks: one
268 video track and two audio tracks.  You can still add and delete
269 tracks from the menus.  The Tracks menu contains a number of options
270 for dealing with multiple tracks simultaneously.  Each track itself
271 has a popup menu which affects one track.
272
273 Operations in the \textbf{Tracks pulldown} affect only tracks which
274 are armed.
275
276 \begin{description}
277 \item[Move tracks up | Move tracks down] shift all the armed
278   tracks up or down the stack.
279 \item[Delete tracks] deletes the armed tracks.
280 \item[Delete last track] deletes the last track, whether it is
281   armed or not.
282 \item[Concatenate tracks] operation copies all the assets of
283   every disarmed but playable track and concatenates it by pasting
284   those assets at the end of the first set of armed tracks. They are
285   pasted one after the other, keeping the same order they have on the
286   stack. If there are two armed tracks followed by two disarmed
287   tracks, the concatenate operation copies the assets of the two
288   disarmed tracks and pastes them after the assets of the two armed
289   tracks. If there are three disarmed tracks instead, the assets of
290   two tracks are pasted after the assets of the armed tracks and the
291   assets of the third track are pasted at the end of the first armed
292   track. The destination track wraps around until all the disarmed
293   tracks are concatenated. Disarmed tracks that are not playable are
294   not concatenated.
295 \item[Append to project] allows for creating new tracks after
296   any existing tracks.
297 \item[Add subttl] will add a track for subtitles at the top of
298   the other tracks.
299 \end{description}
300
301 The \textbf{Audio} and \textbf{Video pulldowns} each contain an
302 option to add a track of their specific type. In the case of audio,
303 the new track is put on the bottom of the timeline and the output
304 channel of the audio track is incremented by one. In the case of
305 video, the new track is put on the top of the timeline. This way,
306 video has a natural compositing order. New video tracks are overlaid
307 on top of old tracks.
308
309 \subsection{Displaying tracks: Ganged mode}%
310 \label{sub:displaying_tracks_ganged}
311
312 Often users working on media where Audio is the main focus, want all of a media's audio channels, whether stereo or 5:1 channels, to be treated as a single unit. They are more familiar with working with a DAW (Digital Audio Workstation software) and find that it takes extra work and a lot more care to have to individually manage audio tracks rather than have them automatically edited as a ganged group.
313
314 To use this capability, there is a \textit{Gang Tracks} toggle button on the main timeline controls to switch between 3 modes of working with multiple channels so that the tracks are automatically edited as a single unit. Operations affected include edits such as cuts, moving sections, and adding plugins. Group masters are marked by the \textit{Master Track} toggle in the patchbays. A track gang group begins on a master track, and extends to but does not include the next master track. The 3 \textit{Gang Tracks} modes are:
315
316 \begin{enumerate}
317         \item \textbf{Gang None:} this is the default mode and is the traditional way Cinelerra operates. If you never toggle the "Gang Tracks" button, everything operates normally as it always has. In this mode, the button icon looks like 3 tracks with $\dots$ on the end and all tracks are visible on the timeline. See figure~\ref{fig:gang-track-01}.
318 \end{enumerate}
319
320 \begin{figure}[htpb]
321         \centering
322         \includegraphics[width=0.99\linewidth]{gang-track-01.png}
323         \caption{Gang None: only the video track is master. We see all tracks, both master and non-master (default).}
324         \label{fig:gang-track-01}
325 \end{figure}
326
327 \begin{enumerate}[start=2]
328         \item \textbf{Gang Channels:} in this mode, only the \textit{Master Tracks} and the first track of video, audio, or subtitles which are not master tracks are shown. Stereo tracks, or 5:1 channels/any number of audio tracks, are drawn as 1 audio track for the purpose of making changes on that single track which are then propagated to all of its other channel tracks automatically. This is the DAW-like mode. The \textit{Gang Tracks} button icon looks like 2 tracks and only the first video and first audio tracks will be shown. See figure~\ref{fig:gang-track-02}.
329 \end{enumerate}
330
331 \begin{figure}[htpb]
332         \centering
333         \includegraphics[width=0.99\linewidth]{gang-track-02.png}
334         \caption{Gang Channels: only the video track is master. We see the master tracks and the first of the non-master tracks.}
335         \label{fig:gang-track-02}
336 \end{figure}
337
338 \begin{enumerate}[start=3]
339         \item \textbf{Gang Media:} this mode only shows the \textit{Master Tracks} of the media but changes are propagated to the appropriate other related tracks (even if they are not visible). The \textit{Gang Tracks} button icon looks like a single track. See figure~\ref{fig:gang-track-03}.
340 \end{enumerate}
341
342 \begin{figure}[htpb]
343         \centering
344         \includegraphics[width=0.99\linewidth]{gang-track-03.png}
345         \caption{Gang Media: only the video track is master. We only see the master tracks.}
346         \label{fig:gang-track-03}
347 \end{figure}
348
349 The current \textit{Gang Tracks} mode is saved across sessions and will be saved in your project. Although most users will work in the \textit{Gang None} mode, those more familiar with DAW software will tend to use the \textit{Gang Channel}s mode.
350
351 To understand why certain aspects work the way they do in the gang modes, here is an explanation.
352 Adding in this DAW-like feature to long time existing code called for an exact algorithm because tracks are
353 not inherently bound or in a container. Because of this, there is a requirement that the tracks have to be
354 lined up at the beginning and this timeline alignment is what creates the binding and allows for ganging.  
355
356 Next, more details about master tracks are explained, which in addition to the alignment help to define the
357 scope of a grouped gang. Each patchbay has a \textit{Master Track} button on the extreme right of the patchbay. These mark which tracks of the media are master tracks. The span of tracks between the gang group masters are the gang track group. The master track toggles can be disabled/enabled as the user wishes to create the desired track groups. Normal file loads will mark the first stream of each file loaded as a master if the media is loaded with insertion strategy of\textit{ Replace current project}, \textit{Replace current project and concatenate tracks} or \textit{Append in new tracks}. Frequently, editing is done on video, audio, or audio/video groups to maintain timeline synchronization. By grouping related tracks, this procedure is much more automatic.
358
359 Previously existing projects created before the addition of ganged tracks, will have ALL tracks marked as master tracks and changing the \textit{Gang Tracks} button mode will have no effect. The user will have to properly designate which track is the master track and disabling the others in order to make use of the toggle modes.
360
361 There are no restrictions on how you use this feature and there may be variations for users not concerned about DAW-like workings that are very useful. Several methodologies are possible, but you have to know what you are doing.
362
363 NOTES:
364 \begin{itemize}
365         \item When in \textit{Gang Channels} or \textit{Gang Media} mode, if the first audio track is not disarmed, but         any of its connected channel tracks are, the disarm of those channels are ignored and all channels are treated as being armed. This is to be consistent with the purpose of using this mode; the purpose being that any edits to the first master track are automatically propagated to all other channels.
366         \item It may be better when using the \textit{Gang Channels} or \textit{Gang Media} mode to make any changes
367         to the first audio channel to be automatically duplicated before reverting to the \textit{Gang None} mode to make other changes. Once you start changing individual channels (that is, audio tracks) so that they are no longer coordinated in their edits/plugins, it may be more difficult to switch back to \textit{Gang Channels} mode and get the desired results since the channels may no longer be lined up.
368         \item When in Drag and Drop mode and you create a \textit{Permanent Group} as described in section
369 ~\ref{sub:grouping_edits} the grouping does not take precedence over ganging; i.e. they are ignored and only
370 the timeline alignment is honored.
371 \end{itemize}
372
373 \section{Two Screen Editing}%
374 \label{sec:two_screen_editing}
375
376 This is a fast way to construct a program out of movie files (in
377 other programs is called \textit{three points editing}). The idea
378 consists of viewing a movie file in one window and viewing the
379 program in another window. Subsections of the movie file are defined
380 in the viewer window and transferred to the end of the program in
381 the program window.  Two screen editing can be done simply by using
382 keyboard shortcuts.  To get familiar with which keys to use, move
383 the mouse pointer over the transport panel and a tooltip appears,
384 showing what key is bound to that button.
385
386 To begin a two screen editing session, load your media resources by
387 using the main menu \textbf{File pulldown} and choose \textit{Load
388   files}; make sure the insertion mode is set to \textit{Create new
389   resources only}.  This insertion strategy is to ensure that the
390 timeline stays unchanged while new resources are brought in. Go to
391 the Resources window and select the Media folder. The newly loaded
392 resources will appear. Double click on a resource or drag it from
393 the media side of the window over to the Viewer window.
394
395 Check to make sure there are enough armed tracks on the timeline to
396 put the subsections of source material that you want.  Usually this
397 would be one video track and two audio tracks, but if there are not
398 enough, just create new tracks or arm more tracks.
399
400 Now to start your 2 screen editing, in the viewer window, define a
401 clip from the media file:
402
403 \begin{enumerate}
404 \item Set the starting point with the In pointer button.  You
405   will see a left hand bracket on the timebar.
406 \item Move your cursor to the ending point of the clip you want
407   to use.
408 \item Set the ending point with the Out pointer right hand
409   bracket.
410 \item You will see a colored bar inside the brackets for easier
411   viewing.
412 \item Drag the In/Out point with the mouse to conveniently
413   change their position.
414 \end{enumerate}
415
416 These In/Out points define a clip.  You can now use this in a couple
417 of different ways.
418
419 \paragraph{Splice} The splice icon, or shortcut letter “\texttt{v}”,
420 inserts the selected area in the timeline after the insertion point.
421 After the splice has taken effect, the insertion point moves to the
422 end of the edit ready to be used as the next splice location. This
423 way you can continuously build up the program by splicing.  If an In
424 point or an Out point exists on the timeline the clip is inserted
425 after the In point or after the Out point. If both In and Out points
426 are set on the timeline, the clip is inserted after the In point. If
427 there are edits after your chosen splice location on the timeline,
428 they will be moved to the right.
429
430 \paragraph{Overwrite} The overwrite icon, or shortcut letter
431 “\texttt{b}”, overwrites the region of the timeline after the
432 insertion point with the clip. If an In point or an Out point exists
433 on the timeline the clip is overwritten after the In point or after
434 the Out point. If both In and Out points are set on the timeline,
435 the clip is inserted after the In point. If a region is highlighted
436 or both In and Out points exist they limit the region of the
437 overwriting and the clip may therefore be shortened. Here is a
438 detailed explanation to take advantage of this method.
439
440 To overwrite exactly on a precise region of the timeline:
441
442 \begin{enumerate} [noitemsep]
443 \item Arm only tracks to change.
444 \item Define the destination region on the timeline with [ and
445   ], the In and Out points.
446 \item You can achieve maximum precision by setting the active
447   region in the zoom panel.
448 \item Define the clip you want to use in the viewer with [ and
449   ], the In and Out points.
450 \item Overwrite from Viewer to the timeline.
451 \end{enumerate}
452
453 If the destination region is shorter than the clip defined in the
454 viewer, the portion of the clip longer than the destination region
455 won't be inserted and on the timeline the following edits won't
456 move.  If the destination region is longer than the clip defined in
457 the viewer, the destination region will shrink and on the timeline
458 the following edits will move to the left.
459
460 \paragraph{Clip} The clip icon, or shortcut letter “\texttt{i}”,
461 generates a new clip for the resource window containing the affected
462 region but does not change the timeline.  Every clip has an
463 optional/default title and description.
464
465 \paragraph{Copy} The copy icon, or shortcut letter “\texttt{c}”,
466 copies the selection into the copy buffer.
467
468 \subsection{Use Case – Working with Sequences}
469 \label{sub:use_case_working_sequences}
470
471 \textit{From the Viewer to the Timeline with the sequences imported
472   in a Master Project.}
473
474 A convenient methodology for working on a Master project along with
475 1 or more previously saved Sub projects or \textit{sequences} use
476 case is described here.  A sequence is an edited assembly of audio
477 and video clips generally consisting of a series of videos that
478 relate to the same activity. This use case explains how to work this
479 way and some things you need to be aware of.
480
481 \begin{enumerate}
482 \item First load your Master project, which you worked on and
483   saved earlier as an \texttt{.xml} file, using an Insertion strategy
484   of \textit{Replace current project}.  Generally this Master project
485   consists of media with any of the attributes of clips, autos,
486   possibly keyframes, and effects.  You will see your project on the
487   main timeline and the Media files that are part of this Master
488   project will be displayed in the Resources window in the Media
489   folder.
490 \item Previously you may have also saved a Sub project, which
491   will now be referred to as a Sequence, as an \texttt{.xml} file that
492   may contain any of the same such things: media, clips, autos,
493   keyframes, effects.  Second you will want to load the Sequence using
494   an Insertion strategy of \textit{Create new resources only}.  When
495   you do the load, this Sequence will show as a file in the Resources
496   window in the Clips folder.  The actual media will show in the Media
497   folder.
498 \item Now Drag and Drop the Sub project from the Clips folder to
499   the Viewer.
500 \item Set In and Out Pointers in the Viewer to the region of
501   interest in the Sub project and in the Timeline of the Main window
502   of your Master project, move the cursor position to where you would
503   like to insert this In/Out section.
504 \item Click on the \textit{Splice (v)} button in the Viewer to
505   insert this section into the Master project timeline.  All of the
506   attributes of the selected Sub project section will now be inserted
507   in the main timeline to include the autos, keyframes, effects, and
508   labels.
509 \item Alternatively, if you click on the \textit{Overwrite (b)}
510   button in the Viewer, you can see the Sub project In/Out section in
511   the timeline, but without its autos, effects, keyframes, etc.  If in
512   the timeline there were some autos, effects, and keyframes in that
513   Master project, they will be in effect for the new section.
514 \end{enumerate}
515
516 You can see the advantages of using Splice versus Overwrite to
517 either insert (splice) with all of the attributes of a specific
518 section of your Sequence or to overwrite without the attributes to
519 allow for the smooth operation on the timeline by retaining the
520 timeline’s attributes at that point.
521
522 NOTE: for correct operation of this use case, you should have the
523 same (or more) number of tracks in the Master project as you do in
524 the Sequence.  To avoid having to know how many tracks you need, you
525 can use the Nest feature as described in the Nesting section
526 (\ref{sub:nesting}).
527
528
529 \section{Cut and Paste Editing}%
530 \label{sec:cut_paste_editing}
531
532 This is the more traditional method of editing in \CGG{} and
533 therefore is the default.  To enable the cut and paste editing mode
534 on the timeline, select the I-beam toggle on the control bar at the
535 top of the main program window. You can copy edits in the same
536 track, copy from different tracks in the same instance, start a
537 second instance of \CGG{} and copy from one instance to the other or
538 load a media file into the Viewer and copy from there.
539
540 To start editing, load some files onto the timeline.  Select a
541 region of the timeline by click dragging on it and select the cut
542 button to cut it. Move the insertion point to another point in the
543 timeline and select the paste button.  Assuming no In/Out points are
544 defined on the timeline this performs a cut and paste operation.
545
546 Most editing operations are listed in the Edit pulldown. Some of
547 them have a button on the program control toolbar as well as a
548 keyboard shortcut.  The keyboard shortcut is in parenthesis here.
549
550 \begin{description}
551 \item [Split | Cut] (x) Delete the selected area and put it in
552   the cut buffer for future pasting.
553 \item[Copy] (c) Copy the selected area and put it in the cut
554   buffer for future pasting.
555 \item[Paste] (v) Paste the material that is in the cut buffer.
556 \item[Clear] (Del) Clear the selected area. If the insertion
557   point is over an edit boundary and the edits on each side of the
558   edit boundary are the same resource, the edits are combined into one
559   edit comprised by the resource. The start of this one edit is the
560   start of the first edit and the end of this one edit is the end of
561   the second edit. This either results in the edit expanding or
562   shrinking.
563 \item[Paste silence] (Shift+Space) Paste blank audio/video for
564   the length of the selected area. Following edits will be pushed to
565   the right.
566 \item[Mute Region] (m) Overwrite blank audio/video on the
567   selected area. Following edits don't move.
568 \item[Trim Selection] Delete everything but the selected region.
569 \item[Select All] (a) Select the whole timeline.
570 \end{description}
571
572 In Cut and Paste editing mode you can \textit{edit labels} as
573 well. By enabling Edit labels in the \textbf{Settings pulldown}, or
574 by disabling the Lock labels from moving button on the Program
575 Control Tool Bar, labels will be cut, copied or pasted along with
576 the selected regions of the armed tracks.
577
578 Using labels and In/Out points are useful in editing audio.  You can
579 set In/Out points for the source region of the source waveform and
580 set labels for the destination region of the destination
581 waveform. Perform a cut, clear the In/Out points, select the region
582 between the labels, and perform a paste.
583
584 \paragraph{In / Out Points} The In and Out bracket placement is
585 explained here to illustrate their usage.  Because of the shape of
586 the markers [ and ] you may assume that they are inclusive -- that
587 everything placed in between would be included in the clip, such as
588 in the case of being transferred to the timeline from the Viewer.
589 In reality, one of the two markers will not include the frame that
590 was visible at the time the marker was affixed. Depending on whether
591 the \textit{Always show next frame} option is used or not, it is the
592 In or Out marker that will not be inclusive.
593
594 To obtain a clip on the timeline exactly as you saw in the Viewer,
595 you must necessarily move the In mark back from the beginning before
596 the first desired frame or move the Out mark forward after the last
597 desired frame, depending on the \textit{Always show next frame}
598 setting.
599
600 Some of the confusion can be attributed to the fact that the Viewer
601 shows frames, while the markers determine spaces, i.e.\ times, that
602 are not visible between frames. You have to think of each frame as
603 being delimited by two spaces -- one preceding and one following.
604 The In mark is always placed before the displayed frame and the Out
605 mark is always placed after the displayed frame, while taking into
606 account in its calculations whether the \textit{Always show next
607   frame }option is used or not. If you just remember that the
608 reference of the markers is in the middle of the icon, you will
609 avoid confusion.
610
611 \paragraph{Overwrite} To perform overwriting within the timeline
612 paste on a selected region (highlighted or between In/Out
613 points). The selected region will be overwritten. If the clip pasted
614 from the clipboard is shorter than the selected region, the selected
615 region will be shrunk. Following edits will move. If the clip pasted
616 from the clipboard is longer than the selected region, the selected
617 region will be overwritten with the first part of the clip and the
618 remaining part of the clip will be written after the
619 overwriting. Following edits will move.
620
621 \paragraph{Tracks $\rightarrow$ Concatenate tracks} This operation
622 copies all the assets of every disarmed but playable track and
623 concatenates it by pasting those assets at the end of the first set
624 of armed tracks. They are pasted one after the other, keeping the
625 same order they have on the stack.
626
627 \paragraph{Split -- blade cut and hard edges:} You can cut the
628 tracks into 2 pieces on the timeline by putting the hairline cursor
629 on the place you want to do a cut and then using the character “x”
630 or the scissors tool (figure~\ref{fig:cut}).
631
632 \begin{wrapfigure}[16]{O}{0.3\linewidth}
633   \vspace{-2ex}
634   \centering
635   \includegraphics[width=0.9\linewidth]{cut.png}
636   \caption{Blade cut}
637   \label{fig:cut}
638 \end{wrapfigure}
639
640 A \textit{cut} uses a non-empty selection region, where the
641 \textit{blade cut} or \textit{split} has no duration in the
642 selection, just a hairline.  As usual the use of cut when a
643 selection is set, deletes/cuts the highlighted area.  In the case
644 where an In point or an Out point exists on the timeline, the clip
645 is split at the location of the In/Out point since it has priority
646 over the cursor location.  A blade cut simply splits the edit into
647 two edits.  In order to have the video and audio aligned, it works
648 best to have \texttt{Settings $\rightarrow$ Align cursor on
649   frames}.  When a blade cut occurs, the edges are created as
650 \textit{hard edges}.  These are edges that cannot be deleted by
651 track optimizations.
652 %
653 \CGG{} has built-in optimization on the timeline.  So that whenever
654 two parts on the timeline are sequential frames, it automatically
655 optimizes by making them into 1 item.  So if you are cutting,
656 dragging, editing, or whatever and somehow frame \# 40 ends up
657 right next to frame \# 41, it optimizes them together.  This
658 optimization affects many areas throughout the program code.  When
659 you do a blade cut/split, all armed tracks will be included in the
660 cut and green-colored triangles will show on the bottom of the
661 track on both the left and the right side of the cut.  This is a
662 \textit{hard edge} marker toggle, as opposed to the soft edge
663 designation for an ordinary edit.  The \textit{hard edge} marker
664 can be toggled off/on if so desired.  In order to not interfere
665 with the usual drag handles, only a few pixels are used for the
666 toggle so you have to be sure you have the cursor right over the
667 hard edge triangle -- when in position, it will be obvious because
668 you can see an arrow pointing to the corner.  Use Shift-left mouse
669 button 1 to toggle off/on the hard edge marker on all tracks
670 simultaneously.
671
672
673 \section{Drag and Drop Editing}%
674 \label{sec:drag_drop_editing}
675
676 To enable the drag and drop editing mode on the timeline, select the
677 arrow toggle on the control bar at the top of the main program
678 window.  Drag and drop editing is a quick and simple way of working
679 in \CGG{}, using mostly only the mouse. The basic idea is to create
680 a bunch of clips, then drag them in order into the timeline, thus
681 building prototype media that you can watch in the compositor. If
682 after watching it, you wish to re-arrange your clips, set effects,
683 add transitions or insert/delete material, just drag and drop them
684 on the timeline.
685
686 To simply get started, perform the following operations which are
687 useful for working in a drag and drop editing session.  First load
688 your media by using the main menu File pulldown and choose
689 \textit{Load files}; make sure the insertion mode is set to
690 \textit{Create new resources only}.  This loads the files into the
691 Resources window.
692
693 \begin{enumerate}
694 \item Create some video and audio tracks on the timeline using
695   the Video and Audio pulldowns.
696 \item Open the Media folder in the Resources window.  Make sure
697   the necessary tracks are armed and drag a media file from the
698   Resources window to the timeline. If the media has video, drag it
699   onto a video track or if just audio, drag it onto an audio
700   track. For a still image, drag it onto a video track.
701 \end{enumerate}
702
703 You can also drag multiple files from the Resources window. When
704 dropped in the timeline they are concatenated. If you have
705 \textit{Display Icons} selected in the Resources window, drawing a
706 box around the files selects contiguous files. If you have
707 \textit{Display Text} selected, Ctrl-clicking on media files selects
708 additional files one at a time; Shift-clicking on media files
709 extends the number of highlighted selections.  In addition to
710 dragging media files, if you create clips and open the clip folder
711 you can drag clips onto the timeline.
712
713 \CGG{} fills out the audio and video tracks below the dragging
714 cursor with data from the file. This affects what tracks you should
715 create initially and which track to drag the media onto. To drag and
716 drop a file on the Program window, you need to create on the
717 timeline the same set of tracks as your media file.
718
719 When you drag your chosen media from the media folder to the
720 timeline, your mouse pointer will drag a thumbnail and, once over
721 the timeline, the outline of a white rectangle, as big as the edit
722 you are going to have appears.  Drag the media to the desired
723 position of an empty track of the timeline and drop it.  If there
724 are other edits on that track, when you move the white outline over
725 an edit, you will see a bow tie symbol $\bowtie$ appearing at edit
726 boundaries. If you drop the media there, the new edit will start
727 from the edit boundary indicated by the center of the bow tie
728 $\bowtie$.
729
730 Since the mouse pointer is in the middle of the white outline, when
731 this rectangle is bigger than the visible part of the timeline, it
732 is quite cumbersome to precisely insert it for long
733 media. Lengthening the duration visible in the timeline by changing
734 the sample zoom in the zoom panel will reduce the size of the white
735 rectangle, making a precise insertion possible.
736
737 When you drag and drop edits within the timeline:
738
739 \begin{itemize}
740 \item If you drop an edit when bow ties $\bowtie$ are shown,
741   that edit will be cut and pasted starting at the edit boundary
742   indicated by the center of the bow tie $\bowtie$.  Following edits
743   on the same track will move.
744 \item If you drop an edit when there are no bow ties $\bowtie$
745   shown, the original edit will be muted and pasted where you dropped
746   it. No edits will move. A silence will appear in place of the
747   original edit.
748 \item If you have more armed tracks on the timeline than in the
749   asset you are dragging, only the following edits of the tracks
750   affected by the drag and drop operation will move to the right. This
751   will cause loss of synchronization. To restore it, disarm the tracks
752   affected by the drag and drop operation, highlight the just dropped
753   edit and paste silence over it using the Edit pulldown,
754   \textit{Paste Silence}.
755 \end{itemize}
756
757 Labels sometimes work differently in Drag and Drop editing mode in
758 that you can't drag and drop them. They might be locked to the
759 timebar, even with the Edit labels option enabled.  Although with
760 the Edit labels option enabled, if a selected area of a resource is
761 spliced from the Viewer to the timeline in a position before labels,
762 these labels will be pushed to the right for the length of the
763 selected area.
764
765 In/Out points can be used to perform Cut and Paste operations in
766 Drag and Drop mode as well as in Cut and Paste mode.  Use the Edit
767 pulldown to view the list and their keyboard shortcuts.
768
769
770 \subsection{Copy/Paste Behavior}%
771 \label{sub:copy_paste_behavior}
772
773 There are many options for moving, copying, pasting, inserting, and
774 deleting selected \textit{edits}, more commonly referred to by the
775 user as \textit{clips}, when in the Drag and Drop (arrow) editing
776 mode.  This makes it easier to avoid constantly having to disarm/arm
777 tracks.  To create a selection move the cursor over the clip and
778 just click the left mouse button; remove a selection by left mouse
779 button click again.  This will mark your selection with a colored
780 border which contains some red.  The easiest way to initially use
781 the various modes is to click on the middle mouse button when your
782 cursor is over a track and a popup displays the modes and shortcuts.
783 However, for those users who prefer the addition of the Ctrl key to
784 add multiple selections as is commonly done for listbox operations,
785 there is a preference in \texttt{Settings $\rightarrow$ Preferences
786   $\rightarrow$ Appearance} tab, called \textit{Clears before
787   toggle} that changes the behavior.
788
789 When an edit is marked as selected, it can be cut/copied into the
790 paste clip buffer.  The constructed clip buffer will begin with the
791 leftmost edit and end with the rightmost edit.  The edits may
792 contain media, or be silence, or skipped if they are not selected.
793 The clip tracks are copied from the first track with an active edit
794 selection to the last track with an active edit selection.  A clip
795 track can be completely empty if no selection was made on the track.
796 The word \textit{packed} means that the silent edits and empty
797 tracks are not included in the copy to the clip buffer, and all of
798 the elements are packed together, no gaps.  Packing a clip buffer
799 makes it easier to move \textit{blobs} of data around.  Once the
800 edits have moved and have a relative relationship applied, an
801 unpacked clip buffer allows the media to be copied with the relative
802 positions of the edits preserved.
803
804 The \textit{edits} popup is activated on a track and a red and
805 yellow colored reticle appears to temporarily mark the location when
806 you click on the middle mouse button.  An expanded explanation is
807 provided below.
808
809 \renewcommand{\arraystretch}{1.15}
810 \begin{center}
811   \begin{longtable}{p{0.3\textwidth-2\tabcolsep} p{0.7\textwidth-2\tabcolsep}}
812     \toprule
813     \textbf{Key} & \textbf{Operations}\\
814     \midrule
815     Drag & Hold down the Ctrl key while dragging to move a single
816            edit elsewhere.\\
817     Left mouse button & Selects and highlights the edit under the
818                         cursor with a red selection box. Left mouse
819                         button also will toggle that clip selection
820                         off if it is on.\\
821     \bottomrule
822   \end{longtable}
823 \end{center}
824
825 \begin{center}
826   \begin{longtable}{p{0.2\textwidth-2\tabcolsep}
827     p{0.2\textwidth-2\tabcolsep} p{0.6\textwidth-2\tabcolsep}
828     }
829     \toprule
830     \textbf{Popup Label} & \textbf{Key} & \textbf{Operation}\\ \midrule
831     \endhead
832     Clear Select & Ctrl-Shift-A & Deselect all selected edits --
833                                   ones that have the red lines
834                                   around them.\\
835
836     Copy & Ctrl-c & Copy the selected edits into the copy buffer.\\
837
838     Cut & Ctrl-x & Delete the selected edits after copying them into
839                    the buffer. The edits\\
840
841     Mute & Ctrl-m & Delete the selected edits after copying them
842                     into the buffer. The space previously occupied
843                     by the edits will be replaced with silence.\\
844
845     Copy Pack & Ctrl-Shift-C & Copy the selected edits into the
846                                buffer and remove any silent
847                                sections.\\
848
849     Cut Pack & Ctrl-z & Delete the selected edits after copying them
850                         into the buffer. The edits after the
851                         election will move left to occupy the
852                         vacated space.  The edits in the copy buffer
853                         will be packed together within each track.\\
854
855     Mute Pack & Ctrl-Shift-M & Delete the selected edits after
856                                copying them into the buffer.  The
857                                deleted edits will be replaced with
858                                silence.  The edits in the copy
859                                buffer will be packed together within
860                                each track.\\
861
862     Paste  & Ctrl-v & Paste contents of the copy buffer at the
863                       insertion point marked by the red \& yellow
864                       reticle of the popup menu or the position of
865                       the hairline cursor. This is a splice
866                       operation which creates space for the edits.\\
867
868     Overwrite & Ctrl-b & Paste contents of the copy buffer at the
869                          insertion point marked by the red \& yellow
870                          reticle of the popup menu or the position
871                          of the hairline cursor. This destroys the
872                          current edits in that space.\\
873
874     Overwrite & Ctrl-Shift-P & Pastes plugins that are in the Copy
875                                buffer to current location but no
876                                clip. Plugins.\\
877     \bottomrule
878   \end{longtable}
879 \end{center}
880 \renewcommand{\arraystretch}{1}
881
882 The copy/paste behavior respects the armed/disarmed tracks
883 state.  A paste of audio on a video track will fail and vice versa.
884 In addition if you attempt to paste edits consisting of more tracks
885 than what is available at that location it will not allowed.
886
887 Attaching transitions to multiple selected edits via the Video or
888 Audio pulldowns is also available.  The new transitions are attached
889 at the start of the edits, and will replace any existing attached
890 transitions.  As a side note, when in drag and drop mode the end
891 transition does not drag.
892
893 \subsection{Grouping edits}%
894 \label{sub:grouping_edits}
895
896 \CGG{} recognizes as a group, the edits of different armed tracks
897 that have aligned beginnings, regardless of whether they have the
898 same source or aligned ends.  You can drag these edits around on the
899 timeline to construct your movie by rearranging scenes. If more than
900 one track is armed, \CGG{} will drag any edits which start on the
901 same positions the edit the mouse pointer is currently over. Another
902 method of Grouping of edits is performed as follows:
903
904 \begin{enumerate}
905 \item Select each of the clips you would like to be part of a
906   group.
907 \item Use the desired Copy mode as described above to get into
908   the buffer.
909 \item Go to the Resources window Clip folder and right click on
910   an empty spot.
911 \item Choose the Paste Clip option.  Now you have a named clip
912   of the current selection.
913 \end{enumerate} A more traditional Grouping of edits which make a
914 Permanent Group works as described next.  A temporary group is just
915 a set of selected clips and works the same as a single selection.
916 \begin{enumerate}
917 \item Create a group:
918   \begin{itemize}[noitemsep]
919   \item Select multiple clips/edits with left mouse button
920     over the clip;
921   \item Hold down shift and left mouse click over any of the
922     selected clips to create a group;
923   \item A Group Id and color are assigned to this group making
924     it easy to distinguish.
925   \end{itemize}
926 \item Move a group:
927   \begin{itemize}[noitemsep]
928   \item Move your cursor over any of the clips within the
929     group; click to select the clip group.
930   \item Click and Hold down the left mouse button to drag.
931   \end{itemize}
932 \item Dissolve a permanent group:\\
933   To ungroup select any of the group edits/clips and shift left
934   mouse click to ungroup (same as creating).  The edits will be
935   ungrouped, and the current selection will be replaced with the
936   ungrouped clips.
937 \end{enumerate}
938
939 The color of the created groups are not muted and are assigned by
940 Group Id going sequentially through the number of 1 to 64.
941 Therefore if you dissolve a group and make it again, it will have a
942 different Group Id and a different color.
943
944 \subsection{Dragging Groups}%
945 \label{sub:dragging_groups}
946
947 Dragging while in \textit{Drop and Drag editing mode} (arrow mode)
948 is really easy.  Just select the clip or clips you want to drag
949 using the left mouse button, then put your cursor over one of them
950 and drag while holding down the left mouse button.  Keyframes,
951 autos, labels, and plugins will also be dragged.  Dragging honors
952 armed/disarmed tracks.  When you drag there will be some possible
953 colors as defined; depends on how the edges of edits and groups
954 interact:
955
956 \begin{itemize}
957 \item Green color means OK to drop in that position as it will
958   fit.
959 \item Yellow color means you can drop here and when you do it
960   will be exactly next to that existing edit.
961 \item Blue color means it overlaps something and this includes
962   overlapping itself.
963 \item Red color means can not drop here because it will not fit
964   in the space.
965 \item Orange color means the track types do not match so it can
966   not be dropped here.
967 \end{itemize}
968
969 Remember: With the \texttt{Shift} key on, it will always
970 \textit{overwrite}. Without the \texttt{Shift} key enabled, it
971 always \textit{inserts} only.
972
973 The original (older) method of dragging while in Arrow mode, lets
974 you just left mouse click on a single clip or aligned clips and just
975 drag.  This older method of dragging does not move any of its
976 effects with it at this time.  There will only be a white outline
977 while dragging and it will let you drop only if it fits.  You can
978 also perform some dragging and grouping while in the \textit{Cut and
979   Paste editing mode} (ibeam mode) by taking advantage of the Ctrl
980 button in conjunction with the left mouse button.
981
982 \begin{itemize}
983 \item Double click selects a column so you can move, for
984   example, the audio and video together by holding down the Ctrl key
985   and dragging.
986 \item A single clip can be dragged without any of its aligned
987   clips, by holding down and Ctrl key and drag.
988 \end{itemize}
989
990 This last section on Dragging, outlines the difference
991 between \textit{column selection} and \textit{marking selection}.
992 Column selection is available to make it easy to still be able to do
993 some dragging in I-beam mode whereas Marking selection makes it easy
994 to drag clips together that are not columnated.
995
996
997 \subsection{Selection Methods}%
998 \label{sub:selection_method}
999
1000 Concerning \textit{Selection} methods, the following information is
1001 partially pertinent to all editing, but is most important to keep in
1002 mind when using Drag and Drop Editing.
1003
1004 Originally, there was the column oriented timeline drag selection
1005 which can be seen in 1 of 3 ways:
1006
1007 \begin{enumerate}
1008 \item a highlighted vertical column
1009 \item the colored line region between the [~in and out~] marker
1010   labels
1011 \item a single flashing line
1012 \end{enumerate}
1013
1014 The selection priority works like this. When the highlighted
1015 vertical drag column is in use (1), it has the highest precedence
1016 and is used as the selection.  When the column is a single line (2),
1017 then the fall back selection is the [~in/out~] marker region, if
1018 they are set.  When they are not set, and the cursor is flashing,
1019 then the selection start=end and the selection is empty, but it does
1020 have a position on the timeline which can be used for editing.  This
1021 is input for the vertical style cut/paste drag/drop editing.
1022
1023 More recently, in addition to the column oriented timeline drag
1024 selection, there is now \textit{group} capabilities which have
1025 various \textit{edit} selections.  These are created in the Drag and
1026 Drop editing mode by clicking edits to toggle
1027 select/deselection.  These groups are input to a different (more
1028 modern) set of cut, paste and overwrite drag/drop editing.  You
1029 can see this set of operations when you click on an edit with the
1030 middle mouse button, and are also available using the shortcuts
1031 shown. They are more like text editor commands to include
1032 \texttt{ctrl+x=cut}, \texttt{ctrl+c=copy}, \texttt{ctrl+v=paste},
1033 and so on \dots The keyboard Delete key is not hooked to these
1034 operations, and is hooked to the original editing methods.
1035
1036 In this \textit{group} mode, if there are In/Out markers set, they
1037 enter the selection priority queue between the column selection and
1038 the cursor only. You can see the In/Out markers selected region
1039 colored line across the timebar (slightly underneath where the time,
1040 samples or frames show ) on the main timeline extending between the
1041 [ and ].  This means that when the highlighted cursor selection is
1042 empty, the In/Out selection will be used.
1043
1044
1045 \section{Inter-View Mode\;/\;Identifying Source Targets Editing}%
1046 \label{sec:inter-view_identifying_source_target_editing}
1047
1048 Inter-View mode provides a mapping of a particular media file to its
1049 timeline usages. It is somewhat similar to Two Screen Editing in
1050 that you make use of the Viewer. It makes it possible to precisely
1051 trace and indicate in the media the origin of a particular segment
1052 of the timeline and visually indicate the use and distribution that
1053 the timeline makes of a particular media.  A good example usage
1054 would be in the case of a 30 minute interview where you use a few
1055 short pieces to make a shorter 10 minute section, find out that you
1056 have made the timeline 12 minutes instead and need to cut out
1057 another 2 minutes. This feature provides the following capabilities:
1058
1059 \begin{itemize}
1060 \item You can see on the timeline all of the places where a
1061   particular piece of media was used.
1062 \item You can see which parts of that particular media are
1063   already used so you do not reuse that same piece again.
1064 \end{itemize} Figure~\ref{fig:inter-view01} shows an example of the
1065 Inter-View mode mapping preview mini-window.
1066 \begin{figure}[ht]
1067   \includegraphics[width=0.8\linewidth]{inter-view01.png}
1068   \caption{Inter-View mode: white bar$\rightarrow$source; red
1069     bar$\rightarrow$timeline}
1070   \label{fig:inter-view01}
1071 \end{figure}
1072
1073 Explanation of how to use Inter-View mode will be described here
1074 next.
1075
1076 \begin{itemize}
1077 \item Do your editing as usual on the timeline until you are
1078   ready to see what is used or unused.
1079 \item Make sure you are in any of the Preview modes in the
1080   Resources window; you enable the mode using the pulldown to the left
1081   of the word Search.  The option looks like this \quad
1082   \includegraphics[height=\baselineskip]{fullplay.png}.
1083 \item Middle mouse click on a thumbnail in the Resources window and
1084   a popup occurs of that media with a white colored bar at the top
1085   and a red colored bar at the bottom with black sections.
1086 \end{itemize}
1087
1088 The red/white bars represent the presence and the black sections
1089 represent the absence of where that media is used on the timeline.
1090 To get to a bigger representation, use the “\texttt{f}” key for a
1091 full screen.  Now you can operate the following buttons to display
1092 what you need to see and to move around.  It is important to note
1093 that \textit{locked tracks} will not be represented.  This makes it
1094 easy to ignore the audio track segments if you want so there is less
1095 confusion in the display.
1096
1097 \begin{itemize}
1098 \item Clicking on the top white or black spaces in the top time
1099   bar loads the Viewer with the source media, and sets the In/Out [
1100   and ] pointers to be the selection of that edit.
1101 \item Click on a location in the bottom red or black bar, and
1102   the main cursor and composer will re-position to the corresponding
1103   location on the session timeline.
1104 \item Dragging on the red/black bar will correspondingly update
1105   the position in the timeline and composer.
1106 \item Ctrl-click on the bottom bar and the timeline and composer
1107   are re-positioned to the beginning of that edit.
1108 \item Shift-click on the bottom bar and a \textit{selection} is
1109   made of that section in the timeline and the composer is updated
1110   with that start position.
1111 \end{itemize}
1112
1113 %\pagebreak
1114 Figure~\ref{fig:inter-view02} displays Inter-View window and its
1115 relation to the timeline, viewer, and compositor.
1116 \begin{figure}[ht]
1117   \centering
1118   \includegraphics[width=1.0\linewidth]{inter-view02.png}
1119   \caption{Inter-View mode and the timeline}
1120   \label{fig:inter-view02}
1121 \end{figure}
1122
1123 The Inter-View mode works for Media, Proxy, and User Bins.  When the
1124 preview window has only black bars on the top and bottom, it means
1125 that this particular media is not loaded in the timeline.  So when
1126 you are in Proxy, meaning that the Proxy files are loaded on the
1127 timeline, there will be only black bars for the corresponding Media
1128 file UNLESS there is an audio track associated with the video.
1129 Because audio tracks are not proxied, they will show for Media but
1130 not for Proxy.
1131
1132
1133 \section{Some Specific Editing Tools}%
1134 \label{sec:specific_editing_tools}
1135
1136 This section covers some more detailed editing tools and scenarios
1137 for edit management.
1138
1139 \subsection{Editing EDLs within a Project}%
1140 \label{sub:edit-edls}
1141
1142 To edit EDL that is included with your project as Clips, Nested
1143 Clips, Referenced File, or Xml you can use the option \textit{Open
1144   EDL} in the Resources window for the highlighted media.  Then with
1145 a simple button click you can return to your main timeline project.
1146 For example, if you have a nested clip that originally had several
1147 plugins added to it before it was nested, you can edit those plugin
1148 parameter values. Previously to make any changes to these types of
1149 EDL you had to remake the whole clip from scratch.
1150
1151 Here is how this works. In the Clip or Media folder or on a timeline
1152 EDL edit, the option \textit{Open EDL} for the highlighted clip or
1153 nested clip is available so that when you choose this option, that
1154 EDL will be brought up on the timeline superseding the current EDL
1155 that exists on the timeline.  Now, once the clip is open on the
1156 timeline, you can edit it however you want. The previous timeline
1157 EDL is \textit{pushed onto a stack} so it can be recalled by
1158 \textit{popping the stack} with a click of the left mouse button in
1159 the upper right hand corner of the timeline to the left of the
1160 \textit{shell cmds} icon.  Initially this button displays a 0 to
1161 indicate your initial timeline/project.  Then this button will read
1162 1 if you choose \textit{Open EDL} and then back to 0 and your
1163 original timeline with the left mouse click.  You can go several
1164 levels deep so instead of 1, it could be 2, 3, $\dots$ but this
1165 requires some thought to avoid potential confusion.
1166
1167 An example of a typical set of steps to follow is:
1168 \begin{enumerate}
1169 \item Load your media using insertion strategy of \textit{Replace
1170     current project}.  There will be \# 0 in the upper right hand corner
1171   of the main menu with the tooltip of \textit{Close EDL}.
1172 \item Highlight a selection on the timeline and press the
1173   \textit{To clip} icon and click the green checkmark OK.
1174 \item In the Resources window, open the Clip folder and you will
1175   see that Clip 1 is present.
1176 \item Highlight Clip1 and right mouse the item to bring up
1177   available options and select \textit{Open EDL}.
1178 \item Now you will see the timeline change from the original
1179   media to just the clip content and the \# in the upper right hand
1180   corner will change from 0 to 1.
1181 \item Add a visible effect, like AgingTV to the timeline.
1182 \item Click on the \# 1 in the main menu bar to see he timeline
1183   restored to the original media.
1184 \item Drag the clip from the Resources Clip folder to the
1185   timeline and you will see the AgingTV effect.
1186 \end{enumerate}
1187
1188 You can follow the same steps as above by first using the option
1189 \textit{Nest to media} in the Clip folder which nests the clip and
1190 moves it out of the Clip folder to the Media folder.  Then use
1191 \textit{Open EDL} on the Nested EDL in the media folder.  When you
1192 Open EDL and edit the changes, those changes will take affect on any
1193 and all occurrences of that nested clip on the current and/or
1194 original timeline. The option to unnest that clip and put that back
1195 into the Clip folder is the option \textit{EDL to clip}.  The nested
1196 clip is still in the Media folder.  It will now have a name of the
1197 next available Clip \# but the comment contains the previous name so
1198 you can tell where it came from.
1199
1200 Instead of using the \# number on the main menu to close the current
1201 EDL, both the Media and Clip folders have \textit{Close EDL} options
1202 with the left mouse button. Clicking on the \# number is quick and
1203 easy but for infrequent usage it is not obvious, whereas if you use
1204 \textit{Open EDL} you see \textit{Close EDL} right below that and so
1205 it is very obvious.  In addition in the case of where you have
1206 opened a EDL, and you no longer see that clip in the folder, the
1207 right mouse button where no media is highlighted will also display
1208 the Close EDL option.
1209
1210 %\pagebreak
1211 \begin{figure}[h]
1212   \centering
1213   \includegraphics[width=1\linewidth]{editing-img001.png}
1214   \caption{Once you have an Open EDL, the easiest way to close it.}
1215   \label{fig:open_edl}
1216 \end{figure}
1217 \relax
1218
1219 In addition to the \textit{Open EDL} option in the Resources menu,
1220 this option is available on the timeline when the cursor is on an
1221 EDL-type edit. To get to this option, click on the middle mouse
1222 button on that edit.  If it is not EDL, the option will not be
1223 shown.  In summary:
1224
1225 \begin{center}
1226   \begin{tabular}{ll}
1227     \toprule
1228     Media folder of Resources window & Open EDL for Nested or Referenced EDLs\\
1229     Clip folder of Resources window & Open EDL for clips\\
1230     Track timeline & Open EDL for Nested or Referenced EDLs\\
1231     \bottomrule
1232   \end{tabular}
1233 \end{center}
1234
1235 An aside -- when nesting and unnesting clips to take advantage of
1236 this feature, names of the media can lead to some confusion.  For
1237 example, if you nest a clip, the new name in the Media folder is the
1238 word \textit{Nested} followed by an underscore with the date and
1239 timestamp, another underscore, and then the clip name.  Then when
1240 you unnest this Media folder clip via the \textit{EDL to clip}
1241 option, the name will be changed in the Clip folder to the next
1242 available Clip \#.  However the comment field will reflect the
1243 nested clip name from which it was derived.  To avoid confusion you
1244 can easily change the name for these clips in either the Clip or
1245 Media folder because they are not real files at this point. To do
1246 so, highlight the clip name in Resources, click on Info and type in
1247 a new name.
1248
1249 For additional safety, the \textit{Open EDL} feature includes
1250 additional backup capabilities. Automatically \CGG{} saves a backup
1251 when certain changes are made or you can always use the shortcut `b'
1252 to do one yourself, although keep in mind it will be overwritten
1253 whenever \CGG{} wants to do another backup.  Now there is a shortcut
1254 for the backup shortcut `b' so you can keep your hand on the mouse
1255 instead of the keyboard.  Just click on the \# in the upper right
1256 hand corner of the main window.  If \# is at 0, it backs up to
1257 backup.xml, if at 1, it backs up to \texttt{backup1.xml} and so on
1258 \dots up to \texttt{backup9.xml}.
1259
1260 When \textit{Open EDL} is invoked, the current EDL and current undo
1261 stack are both \textit{pushed}, and the active session EDL is
1262 replaced with the target clip/nested edl.  A new undo stack is
1263 created, and the active \texttt{backup.xml} file name is decorated
1264 with the stack level.  So, \texttt{backup.xml} is
1265 \texttt{backup1.xml} when your edits are at stack level 1,
1266 \texttt{back\-up2\-.xml} at stack level 2, and so on.  This means
1267 that if you \textit{load backup} at stack level 1, the session will
1268 reload from history at stack level 1, not the main session.
1269
1270
1271 \subsection{Editing with File by Reference}%
1272 \label{sub:file-reference}
1273
1274 It is sometimes handy to have EDL assets not as a copy, but as a
1275 reference that is automatically updated into your project.  Suppose
1276 you have several short videos that at the end have the same credits
1277 which include the current year such as 2019.  But now it is 2020 and
1278 all of the videos would have to be individually updated with the new
1279 date.  By including a \textit{Referenced File} as the EDL file type
1280 when you create each of the videos, you can just change the one
1281 credits xml file and the next time you load one of the videos and
1282 render it, it will now automatically have the updated information.
1283
1284 The purpose of this feature is to be able to rework a smaller
1285 section of a global master project at any time, which can be done by
1286 an "assistant" (i.e. external software like GIMP or Inkscape, $\dots$) and then this work is automatically reflected in the
1287 global master project.  It is for \textbf{advanced usage only}.
1288
1289 Up until the addition of this feature, \CGG{} has always used copies
1290 and no direct reference in order to ensure original data is never
1291 compromised.  In the usual case, subprojects as xmls are copied into
1292 a master project where subprojects had been inserted, so that if you
1293 change something in a subproject or delete a subproject, it would
1294 have no affect on the master project.  But now with \textit{File by
1295   Reference}, any project that uses a referenced file will
1296 automatically include any changes made to the referenced file when
1297 loaded.  At the same time, if you use the EDL file NOT as a
1298 referenced file in a project since it is then just a copy, it will
1299 not be updated.  Because of this difference, the user needs to be
1300 very aware of what using this feature could do.
1301
1302 \textbf{Use with extreme caution}.  However, there are several
1303 built-in safety features and a warning that should never be turned
1304 off even though it gives you the option to do so.  These include:
1305
1306 \begin{enumerate}
1307 \item When the \texttt{File, Load files} menu is opened, the EDL
1308   strategy will always be set to just EDL as default.  Although, if
1309   you use Apply and leave the Load Menu open, it will stay changed to
1310   what you selected until it is re-opened.
1311 \item When an EDL is opened as \textit{Reference}, the color of
1312   that file name in the Resources Media folder is different in order
1313   to serve as a reminder that it is special.
1314 \item A warning message is displayed in a popup window when you
1315   load a \textit{File by Reference} that reads “Other projects can
1316   change this project and this can become a broken link”.  Although
1317   you can check the warning box to never see this warning again, you
1318   would be well advised to not do so.  It is a great reminder of
1319   consequences and you will not want to be cavalier about the warning.
1320   Instead just use the X to dismiss the warning.
1321 \end{enumerate}
1322
1323 Here is a step by step example of how you can use \textit{File by
1324   Reference}:
1325 \begin{enumerate}
1326 \item Start up \CGG{} and use the Title plugin to create a new
1327   credits file.  Save as credits.xml.
1328 \item Start a New project and then load an existing master
1329   project to the timeline.
1330 \item Load the credits file you created in step 1 with a Load
1331   Strategy of Create Resources Only and with EDL Strategy as
1332   \textit{Reference}.
1333 \item Note the color change in the credits.xml filename and the
1334   reference comment in the Resources Media folder.
1335 \item Drag the credits file to an empty spot on the timeline.
1336   Save this new master project and quit.
1337 \item Start \CGG{} up again.  Load credits.xml and make a change
1338   to the Title and save again.
1339 \item Exit \CGG{}; restart \CGG{}; load your master project and
1340   now you will automatically see on the timeline the changes you just
1341   made in the previous step.
1342 \end{enumerate}
1343
1344
1345 \subsection{Edit Length}%
1346 \label{sub:edit-lenght}
1347
1348 To set the length of an edit in the timeline, select the region
1349 which contains the edit to be modified. Now select the menu bar
1350 \texttt{Edit $\rightarrow$ Edit Length}\dots menu item to activate
1351 the \textit{edit length} popup (figure~\ref{fig:lenght}).  The
1352 duration of the edit can be reset by entering the desired edit
1353 length in seconds.  Pressing OK will change all of the selected
1354 edits (in armed tracks) to the specified length.
1355
1356 \begin{figure}[htpb]
1357     \centering
1358     \includegraphics[width=0.5\linewidth]{lenght.png}
1359     \caption{Edit Length window}
1360     \label{fig:lenght}
1361 \end{figure}
1362
1363 \subsection{Align Edits}%
1364 \label{sub:align_edits}
1365
1366 When loading media, a common problem is that the various audio/video
1367 tracks do not always have exactly the same lengths. For example, you
1368 might load audio/video recordings from your camera and be dismayed
1369 to see that the audio for each segment is a half second longer than
1370 the video. If you load a large set of media clips by concatenation,
1371 the audio and video will be more skewed as more media is
1372 loaded. Align Edits makes it possible to adjust the edits so the
1373 audio and/or video align by adjusting
1374 the edits so that the track lengths are consistent. To use this
1375 feature, load all of the desired media and select a region which
1376 contains all of the edits to be aligned in the timeline. Now select
1377 the menu bar \texttt{Edit $\rightarrow$ Align Edits} menu item to
1378 operate the change. The topmost armed track is used as a template
1379 reference, and the rest of the tracks are either cut or padded to
1380 align the edit boundaries.  Besides aligning audio with the video,
1381 you can also align video with the audio if the first armed track is
1382 audio. The code performs the following algorithm:
1383
1384 \begin{itemize}
1385 \item Use the first armed track as the master track (it must
1386   contain data).
1387 \item Collect the \textit{edit project start times} on the
1388   selected master track. Only edits that are 100\% inside the selected
1389   area will be used.
1390 \item Set all other tracks to match the \textit{edit times} of
1391   the template track, either by putting in silence or cutting the
1392   region to align the edits on the \textit{edit times} of the master
1393   track.
1394 \end{itemize}
1395
1396 The start time sequence of media and silence edits
1397 along the master track are collected as the target alignment
1398 boundaries. All armed tracks after the master track are modified so
1399 that if the next edit edge is too soon, it adds silence; if it is
1400 too late, edits are shortened or deleted past the point of the next
1401 target alignment boundary time.  Align Edits works best if there are
1402 an equal number of Video and Audio sections.  Also, it is better to
1403 use cuts instead of adding silence -- if there are silence edits
1404 together, the algorithm will combine the silence edits into a single
1405 edit and results may not be as desired.
1406
1407 The first two screenshots in figure~\ref{fig:align} show the Before,
1408 the Highlighted Edits to be manipulated, and the After results for
1409 the Align Edits. The third screenshot \textit{adds silence} in the
1410 second section as noted in red letters.
1411
1412 \begin{figure}[htpb] \centering
1413   \includegraphics[width=1.0\linewidth]{align.png}
1414   \caption{Align edits}
1415   \label{fig:align}
1416 \end{figure}
1417
1418
1419 \subsection{Reverse Edits}%
1420 \label{sub:reverse_edits}
1421
1422 The Reverse Edits can be useful to change the order of 2 edits in
1423 the case where you would like to put a \textit{teaser} section that
1424 occurred in the middle of a movie at the beginning instead, that is,
1425 reversed positions.  To operate, highlight completely the edit areas
1426 you would like reversed and then use the pulldown \texttt{Edit
1427   $\rightarrow$ Reverse Edits}.
1428
1429 Figure~\ref{fig:reverse01} shows the selected / highlighted area to
1430 which Edits will be applied.  Note the first edit is 0002, followed
1431 by 0003, 0004, and 0005 in that order.
1432
1433 \begin{figure}[htpb]
1434   \centering
1435   \includegraphics[width=0.9\linewidth]{reverse01.png}
1436   \caption{Selected area for Reverse Edits}
1437   \label{fig:reverse01}
1438 \end{figure}
1439
1440 Figure~\ref{fig:reverse02} shows the results of executing
1441 \textit{Reverse Edits}.  Now you will see the reversed order of
1442 0005, 0004, 0003, and last 0002.
1443
1444 \begin{figure}[htpb]
1445   \centering
1446   \includegraphics[width=0.9\linewidth]{reverse02.png}
1447   \caption{Results of the Reverse Edits}
1448   \label{fig:reverse02}
1449 \end{figure}
1450
1451
1452 \subsection{Shuffle Edits}%
1453 \label{sub:shuffle_edits}
1454
1455 The file pulldown \texttt{Edit $\rightarrow$ Shuffle Edits} will
1456 randomly exchange the location of the edits.  This feature can be
1457 used to change the order of the music like you would do from your
1458 MP4 player where you have a playlist of your favorite music.  Or
1459 perhaps you are creating an advertisement background, you can
1460 randomly change it, thus the viewer sees a different order of scenes
1461 each time shown.
1462
1463 Figure~\ref{fig:shuffle} illustrating Shuffle Edits of the
1464 highlighted area of the first screenshot on the page.  Note the
1465 permutation of the fragments resulting in 0002 now being first, then
1466 0004, 0003, and 0005 last.
1467
1468 \begin{figure}[htpb]
1469   \centering
1470   \includegraphics[width=0.9\linewidth]{shuffle.png}
1471   \caption{Shuffle edits: the edits are permutated}
1472   \label{fig:shuffle}
1473 \end{figure}
1474
1475
1476 \subsection{Drag Handle Management / Trimming}%
1477 \label{sub:drag_handle_management_trimming}
1478
1479 With some edits on the timeline it is possible to do trimming. By
1480 trimming you shrink or grow the edit boundaries by dragging them. In
1481 drag and drop mode or cut and paste mode, move the cursor over an
1482 edit boundary until it changes shape. The drag handle shows as a
1483 left or right facing fat arrow when you cursor near the clip start
1484 or end.  If the cursor faces left, the dragging operation affects
1485 the beginning of the edit. If the cursor faces right, the dragging
1486 operation affects the end of the edit.
1487
1488 The effect of each drag operation not only depends on the behavior
1489 button but whether the beginning or end of the edit is being
1490 dragged. When you release the mouse button, the trimming operation
1491 is performed.
1492
1493 For all file formats, other than still images, the extent of the
1494 trimming operation is limited to the source file length. Attempting
1495 to drag the start of the edit beyond the start of the source, limits
1496 it to the source start. In all trimming operations, all edits which
1497 start on the same position as the cursor when the drag operation
1498 begins are affected. You have to disarm tracks in order to prevent
1499 edits from being affected.
1500
1501 You have 6 different choices of which mouse button to use for
1502 specific types of editing while using the drag handle.  You change
1503 the drag handle mouse effects by using the \texttt{Settings
1504   $\rightarrow$ Preferences  $\rightarrow$ Interface} tab and
1505 modifying the Editing section as shown in the next
1506 figure~\ref{fig:trim}. The drag handle affects not only the clip you
1507 are working on but also frequently the entire duration of all clips
1508 on the timeline.
1509
1510 \begin{figure}[htpb]
1511   \centering
1512   \includegraphics[width=0.6\linewidth]{trim.png}
1513   \caption{Default choices for mouse: Ripple for button 1; Roll
1514     for button 2; Slip for button 3}
1515   \label{fig:trim}
1516 \end{figure}
1517
1518 A description of the fundamental/common terminology for choices
1519 follows.
1520
1521 \begin{description}
1522 \item[All Edits (ripple)] shorten or lengthen the start or end
1523   of a single piece of media while moving all media to the right of
1524   that clip up or down on the timeline correspondingly.  Timeline
1525   duration is modified.  In a drag \textit{All Edits} operation, the
1526   beginning of the edit either cuts data from the edit if you move it
1527   forward or pastes new data from before the edit if you move it
1528   backward. The end of the edit pastes data into the edit if you move
1529   it forward or cuts data from the end of the edit if you move it
1530   backward. All the following edits shift. If you drag the end of the
1531   edit past the start of the edit, the edit is deleted.
1532 \item[One Edit (roll)] move the in and out point of a single
1533   clip without changing the timeline duration. In a drag \textit{One
1534     Edit} operation, nothing is cut or pasted. If you move the beginning
1535   or end of the edit forward, the source reference in the edit shifts
1536   forward. If you move the beginning or end of the edit backward, the
1537   source reference shifts backward. The edit remains in the same spot
1538   in the timeline but the source shifts.
1539 \item[Src Only (slip)] move the in and out point of a single
1540   clip without changing the timeline duration. In a drag \textit{Src
1541     Only} operation, nothing is cut or pasted. If you move the beginning
1542   or end of the edit forward, the source reference in the edit shifts
1543   forward. If you move the beginning or end of the edit backward, the
1544   source reference shifts backward. The edit remains in the same spot
1545   in the timeline but the source shifts.
1546 \item[Slide] a single clip is moved but retains its current in
1547   and out point; however the out point of the clip to the left changes
1548   and the in point of the clip to the right also changes.  Timeline
1549   duration remains the same.
1550 \item[Edge Left/Right] moves the edge of the clips.
1551 \item[No effect] no changes are made.  You might want to use
1552   this choice to prevent accidental movements.
1553 \end{description}
1554
1555 The next table displays the options and results
1556 with the Key Table here first.
1557
1558 \begin{lstlisting}[style=sh]
1559     s = src media start
1560     p = proj position
1561     l = length
1562     c = cut distance
1563     rest == p+=c: for rest of clips
1564     01 = flags edits_moved, rest_moved
1565 \end{lstlisting}
1566
1567 \renewcommand{\arraystretch}{1.15}
1568 \begin{table}[ht]
1569   %\caption{}
1570   %\label{tab:}
1571   % Tell table to adjust font to fix on the page using \resize
1572   \resizebox{\textwidth}{!}{%
1573     \begin{tabular}{lllll}
1574       \toprule
1575       &  & \textbf{Drag Left} & \textbf{Drag Right} &\\
1576       \midrule
1577       \multicolumn{2}{l}{\textit{curr s += c, l -= c; + rest}} & $\leftarrow$ & $\rightarrow$ & \textit{rest}\\
1578       abc12345xyz & \textbf{Ripple} left edge 11 $\rightarrow$ & abc012345xyz & abc2345xyz &\\
1579       \midrule
1580       \multicolumn{2}{l}{\textit{curr l += c; + rest}} & $\leftarrow$ & $\rightarrow$ & \textit{rest}\\
1581       abc12345xyz & \textbf{Ripple} right edge 01 $\rightarrow$ & abc1234xyz & abc123456xyz &\\
1582       \midrule
1583       \multicolumn{2}{l}{\textit{prev l += c; curr ps+= c, l -= c}} & $\leftarrow$ & $\rightarrow$ &\\
1584       abc12345xyz & \textbf{Roll} left edge 00 $\rightarrow$ & ab012345xyz & abcd2345xyz &\\
1585       \midrule
1586       \multicolumn{2}{l}{\textit{curr l += c; next ps+= c, l -= c}} & $\leftarrow$ & $\rightarrow$ &\\
1587       abc12345xyz & \textbf{Roll} right edge 00 $\rightarrow$ & abc1234wxyz & abc123456yz &\\
1588       \midrule
1589       \multicolumn{2}{l}{\textit{s -= c}} & $\leftarrow$ & $\rightarrow$ &\\
1590       abc12345xyz & \textbf{Slip} left edge 10 $\rightarrow$ & abc23456xyz & abc01234xyz &\\
1591       \midrule
1592       \multicolumn{2}{l}{\textit{s -= c}} & $\leftarrow$ & $\rightarrow$ &\\
1593       abc12345xyz & \textbf{Slip} right edge 10 $\rightarrow$ & abc23456xyz & abc01234xyz &\\
1594       \midrule
1595       \multicolumn{2}{l}{\textit{prev l += c; curr p+= c; next ps += c, l -= c}} & $\leftarrow$ & $\rightarrow$ &\\
1596       abc12345xyz & \textbf{Slide} left edge 10 $\rightarrow$ & ab012345wxyz & abcd12345yz &\\
1597       \midrule
1598       \multicolumn{2}{l}{\textit{prev l += c; curr p+= c; next ps += c, l -= c}} & $\leftarrow$ & $\rightarrow$ &\\
1599       abc12345xyz & \textbf{Slide} right edge 10 $\rightarrow$ & ab12345wxyz & abcd12345yz &\\
1600       \midrule
1601       \multicolumn{2}{l}{\textit{curr s -+= c, l += c; + rest}} & $\leftarrow$ & $\rightarrow$ & \textit{rest}\\
1602       abc12345xyz & \textbf{Edge} left edge 11 $\rightarrow$ & abc2345xyz & abc0123456xyz &\\
1603       \midrule
1604       \multicolumn{2}{l}{\textit{curr l -+= c; + rest}} & $\leftarrow$ & $\rightarrow$ & \textit{rest}\\
1605       abc12345xyz & \textbf{Edge} right edge 01 $\rightarrow$ & abc1234xyz & abc123456xyz &\\
1606       \bottomrule
1607     \end{tabular}
1608   }
1609 \end{table}
1610 \renewcommand{\arraystretch}{1}
1611
1612 Next, a more immediate and colorful view shows these trimming
1613 options (figure~\ref{fig:trim-color}).
1614
1615 \begin{figure}[htpb]
1616     \centering
1617     \includegraphics[width=0.8\linewidth]{trim-color.png}
1618     \caption{The 5 types of Trim: note the different lengths of the results.}
1619     \label{fig:trim-color}
1620 \end{figure}
1621
1622 \paragraph{How to do a J-cut or L-cut} A J-cut is a split edit film
1623 editing technique in which the audio from a following scene overlaps
1624 the picture from the preceding scene, so that the audio portion of
1625 the later scene starts playing before its picture as a lead-in to
1626 the visual cut.  An L-cut is a different split edit film editing
1627 technique in which the audio from preceding scene overlaps the
1628 picture from the following scene, so that the audio cuts after the
1629 picture, and continues playing over the beginning of the next scene
1630 (figure~\ref{fig:j-cut}). To do either a J-cut or an L-cut, you
1631 first shorten the first or second video a little.  Then you block
1632 the audio tracks from changing by disarming the appropriate tracks.
1633 Finally use \textit{One Edit (roll)} the cutting edge off the
1634 videos.  Moving to the right creates a J-cut and moving to the left
1635 creates an L-cut.
1636
1637 \begin{figure}[htpb]
1638     \centering
1639     \includegraphics[width=0.8\linewidth]{j-cut.png}
1640     \caption{J-cut to left and L-cut to right}
1641     \label{fig:j-cut}
1642 \end{figure}
1643
1644
1645 \subsection{Split View in Compositor Using the Drag Handle with Trim}%
1646 \label{sub:split_view_compositor_using_drag_trim}
1647
1648 The Trim Feature using the drag handle provides some good ways to
1649 view your video while editing.  The playback position in the
1650 compositor is updated live and the view in the compositor can be
1651 split so that in the left half of the compositor you can see the
1652 last frame of the left clip and in the right half the first frame of
1653 the right clip.  Dragging edits can not be extended past the
1654 beginning or the end.
1655
1656 First familiarize yourself with button operation; check your setup
1657 by executing the following step.  In the \texttt{Settings
1658   $\rightarrow$ Preferences $\rightarrow$ Interface} tab, Editing
1659 section, clicking on the edit boundaries can be set for Button 1, 2,
1660 3 as one of the following:
1661
1662 \textit{Ripple}; \textit{Roll}; \textit{Slip}; \textit{Slide};
1663 \textit{Edge} or \textit{No effect}
1664
1665 Now to use this feature, create a track with edits that have trims
1666 on the left and/or the right. The edit boundary can be modified
1667 using \textit{drag handles} at the boundary between the edits
1668 (figure~\ref{fig:trim-display}).
1669
1670 \begin{figure}[htpb]
1671   \centering
1672   \includegraphics[width=1\linewidth]{trim-display.png}
1673   \caption{Split compositor screen showing the result of the Trim feature}
1674   \label{fig:trim-display}
1675 \end{figure}
1676
1677 \begin{description}
1678 \item[Left Mouse Button (LMB) usage:] If you grab the edit
1679   handle from the right side, you will see a left arrow and dragging
1680   the boundary will modify the right edit playback starting time. If
1681   you grab the edit handle from the left side, you will see a right
1682   arrow and dragging the boundary will modify the left edit playback
1683   ending time. In both cases, the composer will show the edit endpoint
1684   of the changed edit.
1685 \item[Shift LMB usage:] The effect on the edits is the same as
1686   described above, but the composer will show a split screen of the
1687   left and right edits as they appear at the drag handle
1688   boundary. Dragging will only change one of the two images, since
1689   only one edit is being changed.
1690 \item[Middle Mouse Button (MMB) usage:] Both the left and the
1691   right edit ending/starting times are updated.  The image shown in
1692   the compositor will be drawn from the side of the drag grab, that is
1693   the left if it is grabbed from the left, and the right if it is
1694   grabbed from the right.
1695 \item[Shift MMB usage:] The effect on the edits is the same as
1696   described above, but the composer will show a split screen of the
1697   left and right edits as they appear at the drag handle boundary.
1698   Dragging will change both of the two images, since both edits are
1699   being changed.
1700 \item[Right Mouse Button (RMB) usage:] The start/end point of
1701   the current edit is moved, but the edit length is unchanged only one
1702   image changes since only one edit endpoint is view is updated.
1703 \item[Shift RMB usage:] The effect on the edits is the same as
1704   described above, but the composer will show a split screen of the
1705   left and right edits as they appear at the drag handle boundary.
1706   Dragging will only change one of the two images, since only one edit
1707   is being changed.
1708 \end{description}
1709
1710
1711 \subsection{Snapping while Cutting and Dragging}%
1712 \label{sub:snapping_cutting_dragging}
1713
1714 \paragraph{Cutting/Snapping edits} cuts from an edit handle to the
1715 insert point.  There are Edit Panel buttons which normally are used
1716 to move to the previous or next edit handle/label.
1717
1718 \begin{wrapfigure}[3]{r}{0.2\linewidth}
1719   \vspace{-2ex}
1720   \centering
1721   \includegraphics[width=0.7\linewidth]{snap.png}
1722 \end{wrapfigure}
1723
1724 They look like tags and the letter E on the menu bar and are
1725 oriented forward/backward.  These same buttons can be used to
1726 \textit{cut} from the insert pointer to the previous or next
1727 edit/label when the ctrl+alt keys are both pressed when the buttons
1728 are used.  They \textit{snap} off the media instead of doing the
1729 standard re-positioning.  This is useful to minimize the number of
1730 operations necessary to cut between edits/labels.
1731
1732 Instead of using the edit panel buttons, you can more easily use the
1733 following keyboard shortcuts to perform the same functions:
1734
1735 \begin{center}
1736   \begin{tabular}{lll}
1737     \toprule
1738     snap\_right\_edit & ctrl+alt+ '.' &\\
1739         snap\_left\_edit & ctrl+alt+ ',' &\\
1740     snap\_right\_label & ctrl+alt +shift '.' & shift+period is the > sign on US keyboards\\
1741     snap\_left\_label &  ctrl+alt +shift',' & shift+comma is the < sign on US keyboards\\
1742     \bottomrule
1743   \end{tabular}
1744 \end{center}
1745
1746 \paragraph{Drag Snapping} if you hold down the Ctrl + Alt keys while
1747 dragging using the mouse, once the clip gets near to an edit, a
1748 label, an in/out pointer or the start/end of the timeline, the
1749 dragged clip will snap next to that marker.  The 2 will now be
1750 exactly aligned with no gap and no overlap.  As you drag the clip
1751 close to one of the markers, when they are within a short distance
1752 they start to stick and stay that way until you move further away
1753 from that distance.  Also, the line will turn color from green to
1754 yellow while in the sticky phase.  In addition, this works for a
1755 plugin while dragging so that it will be the same length as the edit.
1756
1757
1758 \subsection{Nesting}%
1759 \label{sub:nesting}
1760
1761 \paragraph{Nested Assets} A nested asset is an EDL session that
1762 embeds an existing EDL session, all tracks, all plugins, editing,
1763 and effects into a media object that appears as one audio/video
1764 media object, no plugins, editing, or effects.  It is as if the
1765 existing EDL was rendered, and loaded in its place.  This has
1766 several interesting side effects.  First, you don’t have to render
1767 the entire media file to see any portion.  Second, it requires no
1768 rendering compute time or storage.  Third, it changes the precedence
1769 of the composer so that you get more control over the projection and
1770 automation, so that the results can be sent into another rendering
1771 step, not simply part of the current stack.  It groups the plugin
1772 stack in much the same way that an arithmetic expression is grouped
1773 by parenthesis.
1774
1775 The EDL session and the rendered output are visually equivalent.
1776 Nested assets allow for complex grouping and stacking of effects,
1777 and makes media access much more flexible.  This feature can be used
1778 recursively, that is, any number of sessions may be stacked and
1779 referenced as an asset, as long as all of the rendering resources
1780 are available.  Nested assets are added to the timeline by using the
1781 pulldown \texttt{File $\rightarrow$ Load files}\dots on the main
1782 menu and selecting the \textit{Insertion strategy} of \textit{Nest
1783   asset}. The file will be pasted into the timeline over the current
1784 selection or at the insertion point.
1785
1786 It is somewhat important to note that nested assets and nested clips
1787 will have index files automatically created.  These index files can
1788 start to clutter up your \texttt{\$HOME/.bcast5} directory with
1789 files named \texttt{Nested\_\#\#\#.idx} and you may want to
1790 periodically delete any index files which are no longer in use.
1791
1792 \paragraph{Nested Clips} It is also possible to create
1793 \textit{clips} and convert them to \textit{nested edl}.  This is
1794 done by first creating a clip using the standard cut, clipboard,
1795 paste, and/or edit panel buttons.  Now, using the resources
1796 \textit{clip} folder, select a clip to be nested, and use the right
1797 mouse button to select a clip.  This activates the clip popup menu.
1798 Select the \textit{Nest to media} menu item, and the clip will be
1799 converted to a \textit{Nested: Clip} and put in Media
1800 folder. Conversely, you can select a \textit{Nested: Clip}, use the
1801 \textit{EDL to clip} menu item, and the clip will be reverted to a
1802 \textit{Clip}.  This works similarly to the group / un-group editing
1803 features of many graphic design editing programs, but in this case
1804 the groups are rendered compositions (figure~\ref{fig:nesting}).
1805
1806 Nested clips can be proxied and when they are, the resulting files
1807 are placed in the user's \$HOME/Videos directory by default.  This
1808 can be modified by changing
1809
1810 \texttt{Settings $\rightarrow$ Preferences $\rightarrow$ Interface}
1811 tab, Nested Proxy Path.
1812
1813 \begin{figure}[htpb]
1814   \centering
1815   \includegraphics[width=1.0\linewidth]{nesting.png}
1816   \caption{Nested clips in Timeline and Resources window}
1817   \label{fig:nesting}
1818 \end{figure}
1819
1820 \paragraph{Usage Examples of Nested Clips}
1821
1822 \begin{description}
1823 \item[Example 1:] You want to make a flashback/rewind at the end
1824   of your video that represents a quick summary of the entire video in
1825   black and white. On he timeline, you have 60 seconds of edits with
1826   clips, cuts, zoom in, zoom out and any other edits. Now you want to
1827   get this 60 seconds \textit{compressed} to 10 seconds, play in
1828   reverse, and in black and white at the end of your video.  You would
1829   copy the 60 seconds in a clip, nest the clip in the Clip folder of
1830   the Resources window and drag it to the timeline. You will see only
1831   a clean clip without all of the edits that were used to create it
1832   because nesting display a clip without having to actually use the
1833   Render menu.  Now you can add a Reverse effect, Color3way plugin for
1834   black and white, and use the Speed auto to get the 60 seconds down
1835   to only 10 seconds.
1836 \item[Example 2:] You are working on a complex project with a
1837   team in a separate location. You create some sub projects, i.e.\
1838   sequences, that you or the team will use in the Master project to
1839   merge the sequences in the right order and to make the final color
1840   correction steps.
1841 \end{description}
1842
1843 In each of the examples you can see the benefit of nesting to create
1844 clean looking timelines because of the automatic rendering
1845 capability of nesting.
1846
1847
1848 \subsection{Copy/Paste clips/medias across Multiple Instances}%
1849 \label{sub:copy_paste_multiple_instances}
1850
1851 It is easy to copy/paste clips/media within a single instance of
1852 \CGG{} or across multiple instances.  The reason this works is
1853 because there are hidden X cut buffers and these are used to
1854 transmit EDL from 1 instance to another.
1855
1856 Steps to copy from a source timeline and paste to a target timeline:
1857
1858 \begin{enumerate}
1859 \item highlight a selection on the timeline in 1 instance of \CGG{}
1860 \item use the Copy icon (shortcut c) on the main menu bar to copy
1861   into a buffer
1862 \item move the pointer to another instance of \CGG{} and set an
1863   insertion point in its timeline
1864 \item use the Paste icon (shortcut v) to paste the clip to that
1865   other instance selection target
1866 \end{enumerate}
1867
1868
1869 \section[ShuttlePROv2 and ShuttleXpress Jog Wheels for Editing]{ShuttlePROv2 and ShuttleXpress Jog Wheels for Editing\protect\footnote{programmatic specifications from Eric Messick}}%
1870 \label{sec:shuttle_jog_wheels_editing}
1871
1872 The ShuttlePROv2 and ShuttleXpress are affordable jog wheels which
1873 can be useful for working with Cin, especially if you do a lot of
1874 playing forward/backward, fast/slow/normal, and single frames
1875 (figure~\ref{fig:shuttle}).
1876 %
1877 Directions for using the ShuttlePROv2 and the ShuttleXpress with
1878 \CGG{} are described next. These devices work by sending keystrokes
1879 used in Cin, corresponding to the shuttle action, to the keyboard
1880 buffer. The shuttle has been fully integrated into the \CGG{} code
1881 so that after the one initial setup, no further intervention is
1882 required.  The multi-speed outer wheel works the same and has the
1883 same number of S positions on both shuttles but the shuttle Xpress
1884 has only 5 keys.  Since the majority of user operations will most
1885 likely be with the use of the 2 wheels, the slightly smaller Xpress
1886 could be a better choice with its 5 easy to reach keys.  The Pro is
1887 approximately $4\times7$\,inches whereas the Xpress is about
1888 $4\times4$\,inches.
1889
1890 \begin{figure}[htpb]
1891   \centering
1892   \includegraphics[width=0.9\linewidth]{shuttle.png}
1893   \caption{ShuttlePROv2 and ShuttleXpress}
1894   \label{fig:shuttle}
1895 \end{figure}
1896
1897 The vendor supplied \textit{string} device names for the shuttles
1898 are currently:
1899
1900 \texttt{/dev/input/by-id/usb-Contour\_Design\_ShuttlePRO\_v2-event-if00}\\
1901 \texttt{/dev/input/by-id/usb-Contour\_Design\_ShuttleXpress-event-if00}\\
1902 \texttt{/dev/input/by-id/usb-Contour\_Design\_ShuttlePro-event-if00}
1903
1904 Only 1 necessary initial setup is required due to permission
1905 settings for non-root usage. As root, just copy a file that provides
1906 the necessary permissions to use the shuttle, then reboot, Example
1907 copy:
1908
1909 \begin{lstlisting}[style=sh]
1910 sudo cp {cindat_path}/doc/99-ShuttlePRO.rules /etc/udev/rules.d/
1911 \end{lstlisting}
1912
1913 then the next time after you reboot, the permissions should be
1914 correct. This file only needs to contain one of the following lines
1915 depending on which shuttle version you have/use, but all will be in
1916 the file.
1917
1918 \begin{lstlisting}[style=sh]
1919 # for  newer PRO model
1920 ATTRS{name}=="Contour Design ShuttlePro" MODE="0644"
1921 # for older PRO model
1922 ATTRS{name}=="Contour Design ShuttlePRO v2" MODE="0644"
1923 # for the Xpress model
1924 ATTRS{name}=="Contour Design ShuttleXpress" MODE="0644"
1925 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0020", MODE="0666"
1926 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0030", MODE="0666"
1927 \end{lstlisting}
1928
1929 If you swap your shuttle, for example upgrade from an Xpress to a
1930 PROv2, just stop Cin, unplug the original shuttle, plug in the
1931 replacement shuttle, and restart Cin.  If you start the \CGG{}
1932 program and the shuttle does not function as before, stop \CGG{} and
1933 then simply unplug it and plug it in again.  There are a couple of
1934 reasons why it may stop functioning.  One is because \CGG{} was not
1935 stopped with the usual Quit command and the shuttle was improperly
1936 shut down when there was a crash.  The other possibility is that a
1937 static discharge occurred in the area.
1938
1939 A default shuttlerc file is automatically used when a shuttle device
1940 is plugged in when Cin is started. This file sets up the key
1941 bindings for \CGG{} to use. You can override any default settings by
1942 having a local file in your \texttt{\$HOME} directory, named
1943 \texttt{.shuttlerc} to reflect your personal preferences.
1944
1945
1946 \subsection{How to Modify the Default Key Settings}%
1947 \label{sub:modify_default_key_settings}
1948
1949 Detailed information on how to modify your local \texttt{.shuttlerc}
1950 file is described next, but if you need help you can request more
1951 information in the forum at {\small
1952   \url{https://cinelerra-gg.org}}. In the \texttt{shuttlerc} file, a
1953 \# always represents a comment and blank lines are ignored.  The
1954 first thing you must do is copy the system supplied
1955 \texttt{shuttlerc} file to your \texttt{\$HOME} directory and rename
1956 it as \texttt{.shuttlerc} (with a period).
1957
1958 The \texttt{shuttlerc} file has sections that in the case of \CGG{},
1959 represent different windows allowing you to set the keys, K1-K15 for
1960 the Pro and K5-K9 for the Xpress, the shuttle wheel positions of
1961 S0/S1/S-1 for stop, S2 through S7 for wheeling to the right, and S-7
1962 through S-2 for wheeling to the left for reverse.  Then there is JR
1963 to jog right (clockwise) and JL to jog left (counter-clockwise) for
1964 the inner smaller wheel for single frame movement.  See the key
1965 arrangement on a later page for location of the keys for each of the
1966 two different shuttles.
1967
1968 The sections are surrounded by brackets for windows such as \CGG{}
1969 (the main window), Viewer, Composer, Resources, Load, and Default.
1970 If you want the keys to be defined the same in every window, you can
1971 bracket each window on lines one right after the other and then just
1972 define one set of keys.  The other lines will have the key
1973 name/shuttle position followed by its assigned value.  The values
1974 you use for the keys are usually shortcuts and have to be
1975 operationally defined within \CGG{}. For example, the shortcut “f”
1976 to go fullscreen is defined so can be used; however the shortcut “h”
1977 is not defined so will not do anything.  You can check the file,
1978 shortcuts.html, for some options to use.
1979
1980 Next are a few actual examples from the default
1981 \texttt{{cindat\_path}/shuttlerc} file.
1982
1983 The next brackets represent sections. Default, Resources, Load
1984 windows all use the same key values.
1985
1986 \begin{lstlisting}[style=sh]
1987 [Default]
1988 [Resources]
1989 [Load]
1990 K5 XK_Home
1991 K6 XK_Button_1 # same as mouse button 1
1992 K7 XK_Button_2 # same operation as mouse button 2
1993 K8 XK_Button_3
1994 K9 XK_End
1995 # for example, in the Load menu, use scroll up to get to the next file name
1996 JL XK_Scroll_Up
1997 JR XK_Scroll_Down
1998 \end{lstlisting}
1999
2000 Cinelerra with brackets around it next, is the section with some key
2001 definitions for the main window.
2002
2003 \begin{lstlisting}[style=sh]
2004 [Cinelerra]
2005
2006 # Most useful functions have to be on K5-K9
2007 # because Xpress only has 5 keys
2008 K5 XK_Home      # Beginning
2009 K6 XK_KP_6      # Reverse, or if playing Stop
2010 K7 XK_KP_0      # Stop
2011 K8 XK_KP_3      # Play, or if playing Stop
2012 K9 XK_End       # End
2013 ...
2014 S-7 REV_16      # Next 6 are reverse keys
2015 S-6 REV_8       #  the number on the end represents speed
2016 S-5 REV_4       #  number can be decimal up to 64
2017 S-4 REV_2       #  2 means 2x or double speed
2018 S-3 REV_1
2019 S-2 REV_0.5     #  0.5 represents 1/2 speed
2020 S-1 XK_KP_0     # Because the Shuttle does not generate S0,
2021                 #   have to use S-1
2022 S0  XK_KP_0     # Hardware does not generate S0
2023 S1  XK_KP_0     # Because the Shuttle does not generate S0,
2024                 #   have to use S1
2025 S2  FWD_0.5
2026 S3  FWD_1
2027 ...
2028 \end{lstlisting}
2029
2030 An explanation for the above REV and FWD key symbol values is
2031 necessary to facilitate user preferences.  Obviously REV stands for
2032 reverse and FWD for forward.  You can set any speed up to and
2033 including 64x (that is, 64 times the normal speed) on any of the S
2034 keys.  First in the line is the key name such as S-3 and then the
2035 key direction of FWD or REV followed by the symbol for underscore
2036 (\_) and then the numerical value to use.  For example, if you want
2037 the $5^{th}$ forward position, S5, to play 10$\frac{1}{2}$ times
2038 faster, you would use the statement \texttt{S5 FWD\_10.5}.  Integer
2039 or decimal numbers are legal.
2040
2041 For the Viewer, you may want keys defined to do a Splice or an
2042 Overwrite so define differently.  Note that assignments that contain
2043 single character letters must be enclosed in quotes.
2044
2045 \begin{lstlisting}[style=sh]
2046 [Viewer]
2047 # Splice - Viewer only; may be defined
2048 # differently than Composer or Cinelerra
2049 K2 "v"
2050 K4 "b"          # Overwrite
2051 \end{lstlisting}
2052
2053 To change any key value to an alternative value, just edit the file
2054 and make the changes.  Besides just keys and alphabetic letters of
2055 numbers, you can also use any \CGG{} value that contains the
2056 combination with Shift, Alt, and Ctrl.  For keys that are not
2057 printable characters, you can look up the symbol name to use for a
2058 specific operation in the file called:
2059 \texttt{/usr/include/X11/keysymdef.h}. Some examples:
2060
2061 \begin{lstlisting}[style=sh]
2062 K10 Alt-XK_Left   # Go to previous edit \\
2063 K13 Ctrl-XK_Right # Go to next label
2064 \end{lstlisting}
2065
2066 For sequences of one or more \textit{printable} characters, you can
2067 just enclose them in double quotes.  For example in the
2068 \texttt{[Composer]} section, to go into or out of fullscreen mode,
2069 automatically start playing and put a label there, you could define
2070 a key like this:  K7 “f~l” - that is printable character f, a space,
2071 and printable character l.
2072
2073 After modifying \texttt{.shuttlerc}, the next time you use the
2074 shuttle, your changes will automatically take affect without even
2075 having to stop and restart Cin.  However, the first thing to try if
2076 problems is to stop \CGG{}, unplug the shuttle, wait a few seconds,
2077 plug it in again, and then restart cin.  If for some reason, the
2078 shuttle keys still do not work after that, you may have an incorrect
2079 setup and you will have to correct that first.  For example, if you
2080 define S5 twice within the \CGG{} setup, it will fail.  It is
2081 suggested that if you make changes, you should initially uncomment
2082 DEBUG in the \texttt{.shuttlerc} file and start up \CGG{} from a
2083 terminal window so that you can make sure it is working and has no
2084 output errors.  An error might look like:
2085
2086 \begin{lstlisting}[style=sh]
2087 dupl key name: [Cinelerra]K1
2088 shuttle config err file: /root/.shuttlerc, line:37
2089 \end{lstlisting}
2090
2091 Keep in mind when changing the values, that the ShuttleXpress has
2092 fewer buttons so if you define K1 it will only work for the
2093 ShuttlePro.
2094
2095 Any time you are having trouble with your shuttle, you can copy the
2096 default \texttt{shuttlerc} file from
2097 \texttt{{cindat\_path}/shuttlerc} to your local \texttt{.shuttlerc}
2098 file, and edit that to\ switch to DEBUG mode by removing the \#
2099 comment from the DEBUG line.  But you will have to have started Cin
2100 from a terminal window to see the key values. The first time you use
2101 the shuttle or after you change the file, the current assignments
2102 will show in the terminal window so will look something like:
2103
2104 \begin{lstlisting}[style=sh]
2105 [Cinelerra] # 1
2106 K5[D]: XK_KP_0/U
2107 K5[U]: XK_KP_0/U
2108 \end{lstlisting}
2109
2110 When you are in DEBUG mode and are just working away, what you will
2111 see is something like this:
2112
2113 \begin{lstlisting}[style=sh]
2114 key: 0058 1
2115 key: 0055 0
2116 \end{lstlisting}
2117
2118 or:
2119
2120 \begin{lstlisting}[style=sh]
2121 shuttle:  00 00 00 00 00
2122 key: XK_Home 0
2123 \end{lstlisting}
2124
2125 When you change the focus from one window to another, you will see
2126 something like this:
2127
2128 \begin{lstlisting}[style=sh]
2129 new focus: 04c00137
2130 new translation: Viewer
2131 key: 0059 1
2132 \end{lstlisting}
2133
2134 You can also set an environment variable to temporarily use an
2135 alternative shuttle configuration file for testing as in:
2136
2137 \begin{lstlisting}[style=sh]
2138 export SHUTTLE_CONFIG_FILE=/tmp/shuttlerc_test
2139 \end{lstlisting}
2140
2141 The shuttle wheel occasionally will not \textit{stop} after you have
2142 wheeled it to play forward.  This is a documented known problem from
2143 the original code so you just have to joggle it a little in the
2144 other direction and then it will stop.  S0 does not always generate
2145 a signal to do a stop and that is why S1 and S-1 have to be used to
2146 relay the stop instead.  Also, if you have a fullscreen Composer or
2147 Viewer up and the regular one also, the fullscreen takes precedence.
2148
2149
2150 \subsection{Troubleshooting auxilliary information}%
2151 \label{sub:troubleshooting_auxilliary_information}
2152
2153 In order to see if you hardware was recognized by the operating
2154 system, key in:
2155
2156 \begin{lstlisting}[style=sh]
2157 lsusb -v -d 0b33:0030  # for the Shuttle Pro or PROv2\\
2158 lsusb -v -d 0b33:0020  # for the Shuttle Xpress
2159 \end{lstlisting}
2160
2161 \paragraph{Note 1} Currently, the keys K14 and K15 do not function
2162 on the \textit{Contour Design ShuttlePro} but do on the
2163 \textit{Contour Design ShuttlePRO v2} due to a Report Descriptor
2164 error.  You can workaround this by uncommenting \texttt{USB\_DIRECT}
2165 in your local \texttt{.shuttlerc} file.  This directly uses libusb
2166 rather than the generic Linux hid driver.  \texttt{USB\_DIRECT}
2167 works for any of the currently tested shuttles.
2168
2169 \paragraph{Note 2} If you are not sure if your shuttle is fully
2170 functional, you can verify that the hardware device has been seen by
2171 your operating system with this procedure.
2172 \begin{enumerate}
2173 \item From a terminal window as an ordinary user key in: lsusb (the
2174   first character is a lower case L for list).  You will see
2175   something like the following depending on which usb device you
2176   have the ShuttlePro plugged into:
2177 \begin{lstlisting}[style=sh]
2178 Bus 003 Device 002: ID 0b33:0030 Contour Design, Inc. ShuttlePro v2
2179 \end{lstlisting}
2180 \item To make sure you have usbmon installed key in:
2181 \begin{lstlisting}[style=sh]
2182 sudo modprobe usbmon
2183 \end{lstlisting}
2184 \item Next key in the following:
2185 \begin{lstlisting}[style=sh]
2186 sudo od -tx1 /dev/usbmon3
2187 \end{lstlisting}
2188   where the last 3 is the same \# as the Bus in above.  If it lists
2189   \texttt{Bus 002}, then use \texttt{/dev/usbmon2} instead.
2190 \item Now with focus in that same terminal window, press any shuttle
2191   key just to see what happens and should see about 12 lines similar
2192   to these below -- a new set every time you press a single key or
2193   the wheel.  The lines are usually not important, just the fact
2194   that you get a response is.  However if you have multiple devices
2195   on the same bus, you will get responses from any and all of them.
2196   Attempt to isolate your shuttle by temporarily unplugging
2197   unnecessary devices on the same bus or plug the shuttle into a
2198   different usb port that has fewer devices.
2199     \begin{lstlisting}[style=sh]
2200 0000000 80 70 99 75 53 8c ff ff 43 01 81 02 03 00 2d 00
2201 0000020 4e 61 5c 5c 00 00 00 00 8d 2c 06 00 00 00 00 00
2202 0000040 05 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00
2203 0000060 01 ff 00 00 00 80 70 99 75 53 8c ff ff 53 01 81
2204 0000100 02 03 00 2d 3c 4e 61 5c 5c 00 00 00 00 b1 2c 06
2205 0000120 00 8d ff ff ff 05 00 00 00 00 00 00 00 00 00 00
2206 0000140 00 00 00 00 00 80 70 99 75 53 8c ff ff 43 01 81
2207 0000160 02 03 00 2d 00 4e 61 5c 5c 00 00 00 00 3d d7 09
2208 0000200 00 00 00 00 00 05 00 00 00 05 00 00 00 00 00 00
2209 0000220 00 00 00 00 00 00 ff 00 00 00 80 70 99 75 53 8c
2210 0000240 ff ff 53 01 81 02 03 00 2d 3c 4e 61 5c 5c 00 00
2211 0000260 00 00 64 d7 09 00 8d ff ff ff 05 00 00 00 00 00
2212 \end{lstlisting}
2213 \item Next press the key that you want to verify is functioning --
2214   if no new lines show up, then the key is non-functional so there
2215   is a hardware problem.  If you get output, then perhaps there is a
2216   problem with your software setup.
2217 \item Use Ctrl-C on the terminal window when done to get back to the
2218   prompt.
2219 \end{enumerate}
2220
2221 \paragraph{Note 3} Another method for testing to make sure your
2222 model of the Shuttle does not have different key definitions than
2223 the one that \CGG{} was coded for is to do the following.
2224
2225 \begin{enumerate}
2226 \item Locate the shudmp.C program in your \CGG{} directory.
2227 \item Compile that with the command:  \texttt{c++ shdmp.C -o shudmp}
2228 \item Make the file executable with the command:  \texttt{chmod +x shudmp}
2229 \item Execute:
2230 \begin{lstlisting}[style=sh]
2231 sudo ./shdmp /dev/input/by-id/usb-Contour\_Design\_ShuttlePro-event-if00 # substitute your shuttle
2232 \end{lstlisting}
2233 \end{enumerate}
2234
2235 Then press your shuttle key that is having problems and check the
2236 results.  They should look like:
2237
2238 \begin{lstlisting}[style=sh,caption={Example for K7}]
2239 event: (4, 4, 0x90007)  #The last number, 7, is the expected Key number.
2240 event: (1, 262, 0x1)
2241 event: (0, 0, 0x0)
2242 event: (4, 4, 0x90007)
2243 event: (1, 262, 0x0)
2244 event: (0, 0, 0x0)
2245 \end{lstlisting}
2246
2247 \begin{lstlisting}[style=sh,caption={Example for K15}]
2248 Example for K15:
2249 event: (4, 4, 0x9000f)  #The last number f is 15 in hexadecimal and is the expected Key.
2250 event: (1, 270, 0x1)
2251 event: (0, 0, 0x0)
2252 event: (4, 4, 0x9000f)
2253 event: (1, 270, 0x0)
2254 event: (0, 0, 0x0)
2255 \end{lstlisting}
2256
2257 When done, you will have to Ctrl-C to get out of the program.
2258
2259 \paragraph{Note 4} For developers, if you have a pre-UEFI Secure
2260 Boot kernel it is also possible to do the following for further in
2261 depth testing:
2262
2263 \begin{lstlisting}[style=sh]
2264 ls /sys/kernel/debug/hid   \# to locate numerical value of the shuttle, e.g. 0003:0B33.0030.0006
2265 cat "/sys/kernel/debug/hid/0003:0B33.0030.0006/rdesc"  # substitute your own numerical value
2266 cat "/sys/kernel/debug/hid/0003:0B33.0030.0006/events"  # press keys to see the results
2267 \end{lstlisting}
2268 %\begin{enumerate}
2269     %\item \texttt{ls /sys/kernel/debug/hid   \# to locate numerical value of the shuttle, e.g. 0003:0B33.0030.0006}
2270     %\item \texttt{cat “/sys/kernel/debug/hid/0003:0B33.0030.0006/rdesc”    \# substitute your own numerical value}
2271     %\item \texttt{cat “/sys/kernel/debug/hid/0003:0B33.0030.0006/events”  \# press keys to see the results}
2272 %\end{enumerate}
2273
2274 \subsection{Shuttle key default arrangement for \CGG{} / Composer / Viewer:}%
2275 \label{sub:shuttle_key_default_cinelerra}
2276
2277 The following is the default setting for the ShuttlePROv2 and
2278 ShuttleXpress (table~\ref{tab:shuttleprov2} and
2279 table~\ref{tab:xpress}):
2280
2281 \renewcommand{\arraystretch}{1.15}
2282 \begin{table}[ht]
2283   \caption{ShuttlePROv2 key default arrangement for \CGG{} /
2284     Composer / Viewer}
2285   \label{tab:shuttleprov2}
2286   % Tell table to adjust font to fix on the page using \resize
2287   \resizebox{\textwidth}{!}{%
2288     \begin{tabular}{c c c c c c c}
2289       \toprule
2290       K1 & K2 & & K3 & K4 & &\\
2291       Label & Future use & & Future use & Clip & &\\
2292          & Splice (viewer) & & Copy  & Overwrite (viewer) & &\\
2293       \midrule
2294       K5 & K6 & K7 & K8 & K9 & &\\
2295       Home & Reverse & Stop & Play & End & &\\
2296          & & Fullscreen & & & &\\
2297          & & (viewer / compositor) & & & &\\
2298       \midrule
2299       Home(Defaults) & MouseBtn1(D) & MouseBtn2(D) & MouseBtn3(D) & End(Defaults) & &\\
2300       \midrule
2301       \multicolumn{7}{c}{Shuttle Outer Wheel}\\
2302       \multicolumn{7}{c}{Play forward (first row) or Play reverse (second row)}\\
2303       S1=Stop  & S2=1/2 & S3=Normal  & S4=2x & S5=4x & S6=8x & S7=16x\\
2304       S-1=Stop &  S-2=1/2 & S-3=Normal & S-4=2x & S-5=4x & S-6=8x & S-7=16x\\
2305       \midrule
2306       K14 & & Jog Left & (Inner Wheel) & Jog Right & & K15\\
2307       Toggle In & & Frame reverse & & Frame forward & & Toggle Out\\
2308          & & Scroll up(Defaults) & & Scroll down(Defaults) & &\\
2309       \midrule
2310          & & K10  & &  K11 & &\\
2311          & & Previous Edit & & Next Edit & &\\
2312          & & Future Use(Viewer) & & Future Use(Viewer) & &\\
2313       \midrule
2314          & & K12  & &  K13 & &\\
2315          & & Previous Edit & & Next Edit & &\\
2316          & & Previous Label & & Next label & &\\
2317       \bottomrule
2318     \end{tabular}}
2319 \end{table}
2320
2321 \begin{table}[ht]
2322   \caption{ShuttleXpress key default arrangement for \CGG{} / Composer / Viewer}
2323   \label{tab:xpress}
2324   % Tell table to adjust font to fix on the page using \resize
2325   \resizebox{\textwidth}{!}{%
2326     \begin{tabular}{c c c c c c c}
2327       \toprule
2328       K5 & K6 & K7 & K8 & K9 & &\\
2329       Home & Reverse & Stop & Play & End & &\\
2330          &         & Fullscreen & & & &\\
2331          &         & (viewer / compositor) & & & &\\
2332       \midrule
2333       Home(Defaults) & MouseBtn1(D) & MouseBtn2(D) & MouseBtn3(D) & End(Defaults) & &\\
2334       \midrule
2335       \multicolumn{7}{c}{Shuttle Outer Wheel}\\
2336       \multicolumn{7}{c}{Play forward (first row) or Play reverse (second row)}\\
2337       S1=Stop &   S2=1/2 &   S3=Normal  &  S4=2x  &  S5=4x  &  S6=8x &   S7=16x\\
2338       S-1=Stop &  S-2=1/2 &  S-3=Normal &  S-4=2x &  S-5=4x &  S-6=8x  & S-7=16x\\
2339       \midrule
2340          & & Jog Left & (Inner Wheel) & Jog Right & &\\
2341          & & Frame reverse & & Frame forward & &\\
2342          & & Scroll up(Defaults) & & Scroll down(Defaults) & &\\
2343       \bottomrule
2344     \end{tabular}}
2345 \end{table}
2346
2347
2348 %%% Local Variables:
2349 %%% mode: latex
2350 %%% TeX-master: "../CinelerraGG_Manual"
2351 %%% End: