]> Shamusworld >> Repos - ardour-manual/commitdiff
rework content of the sync chapter
authorRobin Gareus <robin@gareus.org>
Fri, 15 Feb 2013 23:49:44 +0000 (00:49 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 15 Feb 2013 23:49:44 +0000 (00:49 +0100)
_manual/19_synchronization/01_on-clock-and-time.html
_manual/19_synchronization/02_latency-and-latency-compensation.html
_manual/19_synchronization/03_timecode-generators-and-slaves.html
_manual/19_synchronization/04_overview-of-timecode-related-settings.html

index e0bf469912f6d7c6d8441660d3066f0dc0d9c50c..a87682445b8279f09f11e091e77cb594a78ae191 100644 (file)
@@ -20,10 +20,6 @@ The granularity of timecode is <strong>Video Frames</strong> and is an order of
 In the case of 48kHz and 25fps, there are 1920 samples per video frame.
 </p>
 
-<p>
-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.
-</p>
-
 <p>
 The concept of clock and timecode is reflected in JACK and Ardour:
 </p>
@@ -43,4 +39,7 @@ Timecode is used to align systems already synchronized by a clock to a common po
 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.
 </p>
 
+<p>
+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.
+</p>
 
index 4e049d084e89cff28d742b980e57183f621fbcb5..deccb312d446ce75a188357228ef476a52de38a8 100644 (file)
@@ -20,7 +20,7 @@ In order to achieve exact time synchronization all sources of latency need to be
 </li>
 <li><strong>Digital-to-Analog and Analog-to-Digital conversion</strong>: electric signals travel quite fast, so their propagation time is negligible in this context, but the conversions between the analog and digital domain take a comparatively long time to perform, so their contribution to the total latency may be considerable. Fast converters are, for instance, one of the factors that distinguishes a quality audio interface from a cheap one, along with other features like low noise, low distortion, etc.</li>
 <li><strong>Digital Signal Processing</strong>: digital processors tend to process audio in chunks, and the size of that chunk depends on the needs of the algorithm and performance/cost considerations. This is usually the main cause of latency when you use a computer and one you can try to predict and optimize.</li>
-<li><strong>Computer I/O Architecture</strong>: a computer is a general purpose processor, not a digital audio processor. This means our audio data has to jump a lot of fences in his path from the outside to the CPU and back, contending in the process with some other parts of the system vying for the same resources (CPU time, bus bandwidth, etc.) Thanks to the combined efforts of kernel, audio driver and jackd developers, you are in position to tune your system a bit more towards the digital audio processing task, but don&#039;t expect miracles. Remember you can use your computer also to write documents, surf the net, save some lemmings… Polyvalence comes at a cost.</li>
+<li><strong>Computer I/O Architecture</strong>: a computer is a general purpose processor, not a digital audio processor. This means our audio data has to jump a lot of fences in its path from the outside to the CPU and back, contending in the process with some other parts of the system vying for the same resources (CPU time, bus bandwidth, etc.) Thanks to the combined efforts of kernel, audio driver and jackd developers, you are in position to tune your system a bit more towards the digital audio processing task, but don&#039;t expect miracles. Remember you can use your computer also to write documents, surf the net, save some lemmings… Polyvalence comes at a cost.</li>
 </ul>
 
 <p><img src="/ardour/manual/html/diagrams/latency-chain.png"  title="Latency chain" alt="Latency chain" /></a></p>
@@ -45,7 +45,7 @@ But this division is an implementation detail of no great interest. What really
 </p>
 
 <p>
-It is important to note that <strong>processing latency in a jackd is a matter of choice</strong>: It can be lowered within the limits imposed only by the hardware and audio driver. But the lower it is, the more likely the system will fail to meet its processing deadline and the <em>dreaded</em> <strong>xrun</strong> will make its appearance more often, leaving its merry trail of clicks, pops and crackles.
+It is important to note that <strong>processing latency in a jackd is a matter of choice</strong>: It can be lowered within the limits imposed only by the hardware (audio-device, CPU and bus-speed) and audio driver. Lower latencies increase the load on the computer-system because it needs to process the audio in smaller chunks which arrive much more frequently. The lower the latency, the more likely the system will fail to meet its processing deadline and the <em>dreaded</em> <strong>xrun</strong> (short for buffer over-run and buffer under-run) will make its appearance more often, leaving its merry trail of clicks, pops and crackles.
 </p>
 
 <p>
@@ -53,19 +53,11 @@ The digital I/O latency is usually negligible for integrated or <acronym title="
 </p>
 
 <p>
-The <a href="http://jackaudio.org" title="http://jackaudio.org">JACK</a> Audio Connection Kit has a few parameters to configure the latency. However the settings are constrained by hardware (audio-device, CPU and bus-speed). Lower latencies increase the load on the computer-system (it needs to process the audio in smaller chunks which arrive much more frequently). If the system can not keep up: an <em>x-run</em> (short for buffer over-run and buffer under-run) occurs which usually results in audible clicks or dropouts.
+Low-latency is <strong>not</strong> always a feature you want to have. It comes with a couple of drawbacks: the most prominent is increased power-consumption because the CPU needs to process many small chunks of audio-data, it is constantly active and can not enter power-saving mode (think fan-noise). Furthermore, if more than one application (sound-processor) is involved in processing the sound, each of these needs to run for a short time well defined time for each audio-cycle which results in a much higher system-load and an increased chance of x-runs. Reliable low-latency (≤10ms) on GNU/Linux can usually only be achieved by running a <a href="https://rt.wiki.kernel.org/" title="https://rt.wiki.kernel.org/">realtime-kernel</a>.
 </p>
 
 <p>
-Low-latency is not always a feature you want to have. It comes with a couple of drawbacks: the most prominent is increased power-consumption because the CPU needs to process many small chunks of audio-data, it is constantly active and can not enter power-saving mode. Furthermore, if more than one application (sound-processor) is involved in processing the sound, the operating system performs a context-switch to run each of these for each audio-cycle which results in a much higher system-load and an increased chance of x-runs.
-</p>
-
-<p>
-Reliable low-latency (≤10ms) on GNU/Linux can usually only be achieved by running a <a href="https://rt.wiki.kernel.org/" title="https://rt.wiki.kernel.org/">realtime-kernel</a>.
-</p>
-
-<p>
-Yet there are only few situations where a very low-latency is really important, because they require very quick response from the computer. Some examples that come quickly to mind are:
+Yet there are only few situations where a low-latency is really important, because they require very quick response from the computer. Some examples that come quickly to mind are:
 </p>
 <ul>
 <li><strong>Playing virtual instruments</strong>: a large delay between the pressing of the keys and the sound the instrument produces will throw-off the timing of most instrumentalists (save if they are church organists, whom we believe are awesome latency-compensation organic systems.)</li>
@@ -79,16 +71,16 @@ In many other cases - such as playback, recording, overdubbing, mixing, masterin
 </p>
 
 <p>
-To explain the last statement: during mixing or mastering you don&#039;t care if it take 10 or 100ms between the instant you press the <em>play button</em> and sound coming from the speaker. The same is true when recording.
+To explain that statement: During mixing or mastering you don&#039;t care if it takes 10ms or 100ms between the instant you press the <em>play button</em> and sound coming from the speaker. The same is true when recording with a count in.
 </p>
 
 <p>
-During tracking, it is however important that the sound that is currently played back is internally aligned with the sound that is being recorded.
+During tracking it is important that the sound that is currently being played back is internally aligned with the sound that is being recorded.
 </p>
 
 <p>
-This is where latency-compensation comes into play: There are two possibilities to compensate for latency in a DAW: <em>read-ahead</em> the DAW actually starts playing a bit early. So that the sound hits the speakers a short time later, it is exactly aligned with the timecode of the material that is being recorded.
-and <em>write-behind</em> since we know that the sound that is being played back has latency, the incoming audio can be delayed by the same amount to line things up again.
+This is where latency-compensation comes into play. There are two possibilities to compensate for latency in a DAW: <em>read-ahead</em> the DAW actually starts playing a bit early (relative to the playhead), so that when the sound hits the speakers a short time later, it is exactly aligned with the material that is being recorded.
+And <em>write-behind</em> since we know that the sound that is being played back has latency, the incoming audio can be delayed by the same amount to line things up again.
 </p>
 
 <p>
@@ -96,7 +88,7 @@ As you may see the second approach has various issues implementation issues rega
 </p>
 
 <p>
-NB. this is also one of the reasons why many projects start at timecode <code>01:00:00:00</code>. When compensating for output-latency the DAW will need to read data from before the start of the session so that the audio arrives in time at the output when the timecode hits <code>01:00:00:00</code>. Ardour3 does handle the case of <code>00:00:00:00</code> properly but not all systems/software/hardware that you may inter-operate with may behave the same.
+As a side note, this is also one of the reasons why many projects start at timecode <code>01:00:00:00</code>. When compensating for output-latency the DAW will need to read data from before the start of the session so that the audio arrives in time at the output when the timecode hits <code>01:00:00:00</code>. Ardour3 does handle the case of <code>00:00:00:00</code> properly but not all systems/software/hardware that you may inter-operate with may behave the same.
 </p>
 
 
@@ -122,14 +114,14 @@ In above figure, clients A and B need to be able to answer the following two que
 </ul>
 
 <p>
-JACK includes an <acronym title="Application Programming Interface">API</acronym> that allows applications to determine the answers to above questions. However JACK can not know about the additional latency that is introduced by the computer architecture, operating system and soundcard. These values indicated by <code>-I</code> and <code>-O</code> and vary from system to system but are generally constant values. On a general purpose computer system the only way to accurately learn about the total latency is to measure it.
+JACK features an <acronym title="Application Programming Interface">API</acronym> that allows applications to determine the answers to above questions. However JACK can not know about the additional latency that is introduced by the computer architecture, operating system and soundcard. These values are indicated by <code>-I</code> and <code>-O</code> and vary from system to system but are constant on each. On a general purpose computer system the only way to accurately learn about the total (additional) latency is to measure it.
 </p>
 
 
 <h2>Calibrating JACK Latency</h2>
 
 <p>
-Linux DSP guru Fons Adriaensen wrote a tool called <code>jack_delay</code> to accurately measure the roundtrip latency of a closed loop audio chain, with sub-sample accuracy. JACK itself includes a variant of this called <code>jack_iodelay</code>.
+Linux DSP guru Fons Adriaensen wrote a tool called <code>jack_delay</code> to accurately measure the roundtrip latency of a closed loop audio chain, with sub-sample accuracy. JACK itself includes a variant of this tool called <code>jack_iodelay</code>.
 </p>
 
 <p>
@@ -137,7 +129,7 @@ Jack_iodelay allows you to measure the total latency of the system, subtracts th
 </p>
 
 <p>
-jack_[io]delay works by emitting some rather annoying tones, capturing them again after a round trip through the whole chain, and measuring the difference in phase so it can estimate with great accuracy the time taken. This is not a theoretical estimation, jack_delay is a measuring tool that will provide very accurate answers.
+jack_[io]delay works by emitting some rather annoying tones, capturing them again after a round trip through the whole chain, and measuring the difference in phase so it can estimate with great accuracy the time taken. This is not a theoretical estimation, jack_delay is a measuring tool that provides very accurate answers.
 </p>
 
 <p>
@@ -145,7 +137,7 @@ You can close the loop in a number of ways:
 </p>
 <ul>
 <li>Putting a speaker close to a microphone. This is rarely done, as air propagation latency is well known so there is no need to measure it.</li>
-<li>Connecting the output of your audio interface to its input using a patch cable. This can be an analog or a digital loop, depending on the nature of the input/output you use. A digital loop won&#039;t factor in the converters latency.</li>
+<li>Connecting the output of your audio interface to its input using a patch cable. This can be an analog or a digital loop, depending on the nature of the input/output you use. A digital loop won&#039;t factor in the <acronym title="Analog to Digital, Digital to Analog">AD/DA</acronym> converter latency.</li>
 </ul>
 
 <p>
@@ -153,9 +145,8 @@ Once you have closed the loop you have to:
 </p>
 <ol>
 <li>Launch jackd with the configuration you want to test.</li>
-<li>Launch jack_delay.</li>
+<li>Launch <code>jack_delay</code> on the commandline.</li>
 <li>Make the appropriate connections between your jack ports so the loop is closed.</li>
 <li>Adjust the playback and capture levels in your mixer.</li>
 </ol>
 
-
index 362ad2d5020348e83f50d4abc52fe6b7e331a7e2..33a9141440472eb5f336170c7900a4c898075531 100644 (file)
@@ -35,15 +35,22 @@ Combining the timecode slave and generator modes, Ardour can also translate time
 <h2>Ardour Timecode Configuration</h2>
 
 <p>
-Each Ardour session has a specific timecode frames-per-second setting which is configured in <code>session &gt; properties &gt; timecode</code>.
+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.
 </p>
 
+<p>
+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.</p>
+</p>
+
+<p>
+The video-pullup modes change the effective samplerate of Ardour to allows for changing a film soundtrack from one frame rate to another. The scope is beyond 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.
+</p>
 
 <h2>Ardour Timecode Generator Configuration</h2>
 
 <p>
 This is pretty straight forward: simply turn it on. The MTC and MIDI-Clock generator do not have any options.
-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.
+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.
 </p>
 
 <p>
@@ -55,7 +62,7 @@ The timecode is sent to jack-ports <code>ardour:MTC out</code>, <code>ardour:MID
 </p>
 
 <p>
-Note that -as of writing- only the LTC generator supports latency compensation. This is due to the fact the ardour MIDI ports are not yet latency compensated.
+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.
 </p>
 
 <p>
@@ -63,6 +70,9 @@ In <code>session &gt; properties</code> it is possible to define an offset betwe
 </p>
 
 
+<p>
+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).
+<p>
 
 <h3>MTC Generator</h3>
 
@@ -82,6 +92,9 @@ The volume of the LTC signal can be conigured in in the <code>Preferences &gt; T
 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.
 </p>
 
+<p>
+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.
+
 
 <h2>Ardour Slave Configuration</h2>
 
@@ -114,7 +127,7 @@ In both cases the first option is preferred: clock sync + same FPS setting.
 <h3>Frames-per-second</h3>
 
 <p>
-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.
+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.
 </p>
 
 <p>
@@ -130,7 +143,7 @@ When enabled the external timecode source is assumed to use 29.970000 fps instea
 <h3>Clock Sync Lock</h3>
 
 <p>
-As described in the introduction, 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.
+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.
 </p>
 
 <p>
@@ -206,11 +219,7 @@ Ardour supports vari-speed and backwards playback but will only follow MTC speed
 </p>
 
 <p>
-While 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.
-</p>
-
-<p>
-A global offset between incoming timecode and ardour&#039;s transport can be configured in <code>Session &gt; Properties</code>.
+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.
 </p>
 
 
index c9e486a0ef955e9d180aaa394ccfda463abddff1..623cbf07f71c4d5b002e9d54cd921a4d11046775 100644 (file)
@@ -34,8 +34,12 @@ Timecode related settings are accessed from the menu:
 <ul>
 <li><strong>External timecode source</strong> – select timecode source: JACK, LTC, MTC, MClk</li>
 <li><strong>Match session video frame rate to external timecode</strong> – This option controls the value of the video frame rate <em>while chasing</em> an external timecode source. <strong>When enabled</strong> the session video frame rate will be changed to match that of the selected external timecode source. <strong>When disabled</strong> 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.</li>
-<li><strong>External timecode is sync locked</strong> – <strong>When enabled</strong> indicates that the selected external timecode source shares sync (Black &amp;amp; Burst, Wordclock, etc) with the audio interface.</li>
+<li><strong>External timecode is sync locked</strong> – <strong>When enabled</strong> indicates that the selected external timecode source shares sync (Black &amp; Burst, Wordclock, etc) with the audio interface.</li>
 <li><strong>Lock to 29.9700 fps instead of 30000/1001</strong> – <strong>When enabled</strong> the external timecode source is assumed to use 29.97 fps instead of 30000/1001. SMPTE 12M-1999 specifies 29.97df as 30000/1001. The <acronym title="specification">spec</acronym> 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 has zero timecode drift.</li>
+<li><strong>LTC incoming port</strong> – offers a session agnostic way to retain the LTC port connection.</li>
+<li><strong>Enable LTC generator</strong> – does just what it says.</li>
+<li><strong>Send LTC while stopped</strong> – <b>When enabled</b> Ardour will continue to send LTC information even when the transport (playhead) is not moving. This mode is intended to drive analog tape machines which unspool the tape if no LTC timecode is received.</li>
+<li><strong>LTC generator level</strong> – Specify the Peak Volume of the generated LTC signal in dbFS. A good value is  0dBu ^= -18dbFS in an EBU calibrated system</li>
 </ul>