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