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