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