]> Shamusworld >> Repos - ardour-manual/blob - include/timecode-generators-and-slaves.html
Tiny mistake in Status Bar
[ardour-manual] / include / timecode-generators-and-slaves.html
1
2
3 <p>
4   Ardour supports three common timecode formats:
5   <abbr title="Linear/Longitudinal Time Code"><dfn>LTC</dfn></abbr>,
6   <abbr title="MIDI Time Code"><dfn>MTC</dfn></abbr>, and
7   <dfn>MIDI Clock</dfn>, as well as
8   <dfn>JACK-transport</dfn>, a JACK-specific timecode implementation.
9 </p>
10 <p>
11   Ardour can generate timecode and thus act as timecode <dfn>master</dfn>,
12   providing timecode information to other applications. Ardour can also be
13   <dfn>slaved</dfn> to some external source in which case the playhead
14   follows the incoming timecode.<br>
15   Combining the timecode slave and generator modes, Ardour can also
16   <dfn>translate</dfn> timecode. e.g create LTC timecode from incoming MTC.
17 </p>
18
19
20 <h2>Ardour Timecode Configuration</h2>
21
22 <p>
23   Each Ardour session has a specific timecode frames-per-second setting which
24   is configured in <kbd class="menu">session &gt; properties &gt;
25   timecode</kbd>. The selected timecode affects the timecode ruler in the main
26   window as well as the clock itself.
27 </p>
28
29 <p>
30   Note that some timecode formats do not support all of Ardour's available
31   fps settings. MTC is limited to 24, 25, 29.97 and 30 fps.
32 </p>
33
34 <p>
35   The video pull-up modes change the effective samplerate of Ardour to allow
36   for changing a film soundtrack from one frame rate to another. The concept is
37   beyond the scope of this manual, but Wikipedia's entry on
38   <a href="http://en.wikipedia.org/wiki/Telecine">Telecine</a>
39   may be a good start.
40 </p>
41
42 <h2>Ardour Timecode Generator Configuration</h2>
43
44 <p>
45   This is pretty straightforward: simply turn it on. The MTC and MIDI-Clock
46   generator do not have any options. The LTC generator has a configurable
47   output level. JACK-transport cannot be <em>generated</em>. Jack itself is
48   always synced to its own cycle and cannot do varispeed&mdash;it will
49   always be synced to a hardware clock or another JACK master.
50 </p>
51
52 <p>
53   The relevant settings for timecode generator can be found in
54   <kbd class="menu">Edit &gt; Preferences &gt; MIDI Preferences</kbd> (for MTC,
55   MC) and
56   <kbd class="menu">Edit &gt; Preferences &gt; Transport Preferences</kbd>
57   (for LTC).
58 </p>
59
60 <p>
61   The timecode is sent to jack-ports <code>ardour:MTC out</code>,
62   <code>ardour:MIDI clock out</code> and <code>ardour:LTC-out</code>. Multiple
63   generators can be active simultaneously.
64 </p>
65
66 <p class="note">
67   Note that, as of Jan 2014, only the LTC generator supports latency
68   compensation. This is due to the fact the Ardour MIDI ports are not
69   yet latency compensated.
70 </p>
71
72 <p>
73   In <kbd class="menu">Session &gt; Properties</kbd>, it is possible to
74   define an offset between Ardour's internal time and the timecode sent.
75   Currently only the LTC generator honors this offset.
76 </p>
77
78 <p>
79   Both LTC and MTC are limited to 30&nbsp;fps. Using frame rates larger
80   than that will disable the generator. In both cases also only 24, 25,
81   29.97df (drop-frame) and 30&nbsp;fps are well defined by specifications (such as
82   SMPTE-12M, EU and the MIDI standard).
83 </p>
84
85 <h3>MTC Generator</h3>
86 <p>
87   The <dfn>MTC generator</dfn> has no options. Ardour sends full MTC
88   frames whenever the transport is relocated or changes state (start/stop).
89   MTC <dfn>quarter frames</dfn> are sent when the transport is rolling and
90   the transport speed is within 93% and 107%.
91 </p>
92
93 <h3>LTC Generator</h3>
94 <p>
95   The level of the <dfn>LTC generator</dfn> output signal can be configured
96   in in the <kbd class="menu">Preferences &gt; Transport</kbd> dialog. By
97   default it is set to -18&nbsp;dBFS, which corresponds to 0dBu in an EBU
98   calibrated system.
99 </p>
100 <p>
101   The LTC generator has an additional option to keep sending timecode even
102   when the transport is stopped. This mode is intended to drive analog tape
103   machines which unspool the tape if no LTC timecode is received.
104 </p>
105 <p>
106   LTC is sent regardless of Ardour's transport speed. It is accurately
107   generated even for very slow speeds (&lt;5%) and only limited by the
108   soundcard's sampling-rate and filter (see
109   <a
110   href="http://en.wikipedia.org/wiki/Gibbs_phenomenon#Signal_processing_explanation">Gibbs phenomenon</a>)
111   for high speeds.
112 </p>
113
114
115 <h2>Ardour Slave Configuration</h2>
116 <p>
117   The timecode source can be switched with the button just right of
118   Ardour's main clock. By default it is set to <kbd
119   class="menu">Internal</kbd> in which case Ardour will ignore any external
120   timecode. The button allows to toggle between Internal and the configured
121   timecode source which is chosen in <kbd class="menu">Edit &gt; Preferences
122   &gt; Transport</kbd>.
123 </p>
124 <p>
125   When Ardour is <dfn>chasing</dfn> (synchronizing to) an external timecode
126   source, the following cases need to be distinguished:
127 </p>
128 <ol>
129   <li>the timecode source shares the clock</li>
130   <li>the timecode source is independent (no wordclock sync)</li>
131 </ol>
132 <p>and</p>
133 <ol>
134   <li>the timecode source uses the same FPS setting as Ardour</li>
135   <li>the timecode source runs at different frames-per-second</li>
136 </ol>
137 <p>
138   In both cases the first option is preferred: clock sync + same FPS setting.
139 </p>
140
141 <h3>Frames-per-second</h3>
142 <p>
143   If the frames-per-second do not match, Ardour can either re-calculate
144   and map the frames, or the configured FPS (<kbd class="menu">Session &gt;
145   Properties</kbd>) can be changed automatically while the slave is active.
146   The behavior is configured with the checkbox <kbd class="option">Edit
147   &gt; Preferences &gt; Transport &gt; Match session video frame rate to
148   external timecode</kbd>.
149 </p>
150 <p>
151   When enabled, the session video frame rate will be changed to match that
152   of the selected external timecode source. When disabled, the session video
153   frame rate will not be changed to match that of the selected external
154   timecode source. Instead the frame rate indication in the main clock will
155   flash red, and Ardour will convert between the external timecode standard
156   and the session standard.
157 </p>
158 <p class="warning">
159   29.97 drop-frame timecode is another corner case. While the SMPTE 12M-1999
160   specifies 29.97df as 30000/1001 frames per second, not all hardware devices
161   follow that standard. The checkbox
162   <kbd class="option">Lock to 29.9700 fps instead of 30000/1001</kbd> allows
163   to use a compatibility mode for those devices.<br>
164   When enabled, the external timecode source is assumed to use 29.970000 fps
165   instead of 30000/1001. SMPTE 12M-1999 specifies 29.97df as 30000/1001. The
166   <abbr title="specification">spec</abbr> further mentions that drop-frame
167   timecode has an accumulated error of -86&nbsp;ms over a 24-hour period.
168   Drop-frame timecode would compensate exactly for a NTSC color frame rate
169   of 30 * 0.9990 (ie 29.970000). That is <em>not</em> the actual rate. However,
170   some vendors use that rate&mdash;despite it being against the
171   specs&mdash;because the variant of using exactly 29.97 fps yields zero
172   timecode drift.
173 </p>
174
175 <h3>Clock Sync Lock</h3>
176 <p>
177   As described in the
178   <a href="@@on-clock-and-time">On Clock and Time</a>
179   chapter, timecode and clock are independent. If the external timecode
180   source is not in sample-sync with the audio hardware (and JACK), Ardour
181   needs to run at varispeed to adjust for the discrepancy.
182 </p>
183 <p>
184   The checkbox <kbd class="option">External timecode is sync locked</kbd>
185   allows to select the behavior according to the setup. When enabled, it
186   indicates that the selected external timecode source shares sync (Black
187   &amp; Burst, Wordclock, etc) with the audio interface.
188 </p>
189 <p>
190   In other words: if enabled, Ardour will only perform initial
191   synchronization and keep playing at speed 1.0 instead of vari-speed
192   adjusting to compensate for drift.
193 </p>
194 <p class="note">
195   Note that vari-speed is unavailable when recording in Ardour, and all
196   tracking happens at speed 1.0. So in order to record in sync with
197   external timecode it must be sample-locked or it will drift over time.
198 </p>
199
200 <h3>MIDI Clock</h3>
201 <p>
202   <dfn>MIDI Clock</dfn> is not a timecode format but tempo-based time. The
203   absolute reference point is expressed as beats-per-minute and Bar, Beat
204   and Tick. There is no concept of sample-locking for MIDI clock signals.
205   Ardour will vari-speed if necessary to chase the incoming signal.
206 </p>
207 <p>
208   Note that the MIDI Clock source must be connected to the
209   <code>ardour:MIDI clock in</code> port.
210 </p>
211
212 <h3>LTC&mdash;Linear Timecode</h3>
213 <p>
214   The <dfn>LTC</dfn> slave decodes an incoming LTC signal on a JACK audio
215   port. It will auto-detect the frame rate and start locking to the signal
216    once two consecutive LTC frames have been received.
217 </p>
218 <p>
219   The incoming timecode signal needs to arrive at the
220   <code>ardour:LTC-in</code> port. Port-connections are restored for each
221   session and the preference dialog offers an option to select it for all
222   sessions.
223 </p>
224 <p>
225   Ardour's transport is aligned to LTC-frame start/end positions according
226   to the SMPTE 12M-1999 specification, which means that the first bit of an
227   LTC-Frame is aligned to different Lines of a Video-Frame, depending on the
228   TV standard used. Only for Film (24fps) does the LTC-Frame directly match
229   the video Frame boundaries.
230 </p>
231
232 <figure class="center">
233   <img src="/images/ltc-transport-alignment.png" alt="LTC frame alignment">
234   <figcaption>
235     LTC frame alignment for the 525/60 TV standard
236   </figcaption>
237 </figure>
238
239 <p>
240   Ardour supports vari-speed and backwards playback but will only follow
241   speed changes if the <kbd class="optoff">sync locked</kbd> option is
242   disabled.
243 </p>
244 <p>
245   While Ardour is chasing LTC, the main transport clock will display the
246   received Timecode as well as the delta between the incoming signal and
247   Ardour's transport position.
248 </p>
249 <p>
250   A global offset between incoming timecode and Ardour's transport can be
251   configured in <kbd class="menu">Session &gt; Properties</kbd>.
252 </p>
253 <p>
254   The user-bits in the received LTC frame are ignored.
255 </p>
256
257 <h3>MTC&mdash;MIDI Timecode</h3>
258 <p>
259   Ardour's MTC slave parses <dfn>full timecode messages</dfn> as well as
260   MTC <dfn>quarter-frame messages</dfn> arriving on the
261   <code>ardour:MTC in</code> port. The transport will only start rolling
262   once a complete sequence of 8 quarter frames has been received.
263 </p>
264 <p>
265   Ardour supports vari-speed and backwards playback but will only follow
266   MTC speed changes if the <kbd class="optoff">sync locked</kbd> option
267   is disabled.
268 </p>
269 <p>
270   When Ardour is chasing MTC, the main transport clock will display the
271   received Timecode as well as the delta between the incoming signal and
272   Ardour's transport position.
273 </p>
274
275 <h3>JACK Transport</h3>
276 <p>
277   When slaved to jack, Ardour's transport will be identical to
278   JACK-transport. As opposed to other slaves, Ardour can be used to control
279   the JACK transport states (stopped/rolling). No port connections need to
280   be made for jack-transport to work.
281 </p>
282 <p>
283   JACK-transport does not support vari-speed, nor offsets. Ardour does not
284   chase the timecode but is always in perfect sample-sync with it.
285 </p>
286 <p>
287   JACK-transport also includes temp-based-time information in Bar:Beats:Ticks
288   and beats-per-minute. However, only one JACK application can provide this
289   information at a given time. The checkbox
290   <kbd class="option">Session &gt; Properties &gt; JACK Time Master</kbd>
291   configures Ardour to act as translator from timecode to BBT information.
292 </p>