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