]> Shamusworld >> Repos - ardour-manual/blob - _manual/22_synchronization/01_on-clock-and-time.html
6c86377d292ac045aaddd8739e91546fbfd196bd
[ardour-manual] / _manual / 22_synchronization / 01_on-clock-and-time.html
1 ---
2 layout: default
3 title: On Clock and Time
4 ---
5
6 <p>
7   <dfn>Synchronization</dfn> in multimedia involves two concepts which are 
8   often confused: <dfn>clock</dfn> (or speed) and <dfn>time</dfn> (location 
9   in time).
10 </p>
11
12 <p>
13   A <dfn>clock</dfn> determines the speet at which one or more systems 
14   operate. In the audio world this is generally referred to as 
15   <a href="https://en.wikipedia.org/wiki/Word_clock" title="https://en.wikipedia.org/wiki/Word_clock">Word Clock</a>.
16   It does not carry any absolute reference to a point in time: A clock is 
17   used to keep a system's sample rate regular and accurate.
18   Word clock is usually at the frequency of the sample rate &mdash; 
19   at 48&nbsp;kHz, its period is about 20&nbsp;μs. Word Clock is the most 
20   common sample rate based clock but other clocks do exist such as Black and 
21   Burst, Tri-Level and DARS. Sample rates can be derived from these clocks as well.
22 </p>
23
24 <p>
25   Time or <dfn>timecode</dfn> specifies an absolute  position on a timeline, 
26   such as <code>01:02:03:04</code> (expressed as Hours:Mins:Secs:Frames). It is 
27   actual <em>data</em> and not a clock <em>signal</em> per se.
28   The granularity of timecode is <dfn>Video Frames</dfn> and is an order of 
29   magnitude lower than, say, Word Clock which is counted in 
30   <dfn>samples</dfn>. A typical frame rate is 25&nbsp;<abbr title="frames
31   per second">fps</abbr> with a period of
32   40&nbsp;ms.
33   In the case of 48&nbsp;kHz and 25&nbsp;fps, there are 1920 audio samples 
34   per video frame.
35 </p>
36
37 <p>
38   The concepts of clock and timecode are reflected in JACK and Ardour:
39 </p>
40
41 <p>
42   JACK provides clock synchronization and is not concerned with time code 
43   (this is not entirely true, more on jack-transport later).
44   On the software side, jackd provides sample-accurate synchronization 
45   between all JACK applications.
46   On the hardware side, JACK uses the clock of the audio-interface. 
47   Synchronization of multiple interfaces requires hardware support to sync 
48   the clocks.
49   If two interfaces run at different clocks the only way to align the 
50   signals is via re-sampling (SRC - Sample Rate Conversion), which is
51   expensive in terms of CPU usage and may decreases fidelity if done
52   incorrectly.
53 </p>
54
55 <p>
56   Timecode is used to align systems already synchronized by a clock to 
57   a common point in time, this is application specific and various 
58   standards and methods exist to do this.
59 </p>
60
61 <p class="note">
62   To make things confusing, there are possibilities to synchronize clocks 
63   using timecode. e.g. using mechanism called <dfn>jam-sync</dfn> and a 
64   <dfn>phase-locked loop</dfn>.
65 </p>
66
67 <p>
68   An interesting point to note is that LTC (Linear Time Code) is a 
69   Manchester encoded, frequency modulated signal that carries both 
70   clock and time. It is possible to extract absolute position data 
71   and speed from it.
72 </p>
73