]> Shamusworld >> Repos - ardour-manual/blob - _manual/19_synchronization/01_on-clock-and-time.html
add sync & latency chapter
[ardour-manual] / _manual / 19_synchronization / 01_on-clock-and-time.html
1 ---
2 layout: default
3 title: On Clock and Time
4 ---
5
6 <h2>On Clock and Time</h2>
7
8 <p>
9 Synchronisation in multimedia involves two concepts which are often confused: <strong>clock</strong> (or speed) and <strong>time</strong> (location in time).
10 </p>
11
12 <p>
13 A <em>clock</em> is the mechanism by which two systems <em>tick</em> simultaneously.
14 In the audio world this is generally referred to as <a href="http://en.wikipedia.org/wiki/Word_clock" title="http://en.wikipedia.org/wiki/Word_clock">Word_clock</a>.
15 It does not carry any absolute reference to a point in time: A clock is used to keep a systems sample rate constant, regular and accurate.
16 Word clock is usually at the frequency of the sample-rate - ie at 48KHz, its period is about 20μs. Word Clock is the most common &#039;sample rate&#039; based clock but other clocks do exist such as Black and Burst, Tri-Level and DARS. Sample rates can also be derived from these clocks as well.
17 </p>
18
19 <p>
20 Time – or <em>timecode</em> – on the other hand specifies an absolute relationship or position on a timeline e.g. <code>01:02:03:04</code> (expressed as Hours:Mins:Secs:Frames). It is actual data and not a clock-signal per se.
21 The granularity of timecode is <strong>Video Frames</strong> and is an order of magnitude lower than, say, Word Clock which is counted in <strong>samples</strong>. A typical frame-rate is 25 fps with a period of 40ms.
22 In the case of 48kHz and 25fps, there are 1920 samples per video frame.
23 </p>
24
25 <p>
26 An interesting point to note is that LTC (Linear Time Code) is a Manchester Encoded, Frequency Modulated signal that carries both &#039;Clock&#039; and &#039;Time&#039;. It is possible to extract absolute position data and speed from it.
27 </p>
28
29 <p>
30 The concept of clock and timecode is reflected in JACK and Ardour:
31 </p>
32
33 <p>
34 JACK provides clock-synchronization and is not concerned with time-code (this is not entirely true, more on jack-transport later).
35 Within software, jackd provides sample-accurate synchronization between all JACK applications.
36 On the harware side JACK uses the clock of the audio-interface. Synchronization of multiple interfaces requires hardware support to sync the clocks.
37 If two interfaces run at different clocks the only way to align the signals is via re-sampling (SRC - Sample Rate Conversion) - which decreases fidelity.
38 </p>
39
40 <p>
41 Timecode is used to align systems already synchronized by a clock to a common point in time, this is application specific and various standards and methods exist to do this.
42 </p>
43
44 <p>
45 NB. to make things confusing, there are possibilities to synchronize clocks using timecode. e.g. using mechanism called <em>jam-sync</em> and a Phase-Locked-Loop.
46 </p>
47
48