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