You are here

Digital Clocking Explained

Published April 2003
By Hugh Robjohns

Most home studio owners now rely heavily on digital audio recording and processing, but you could be sacrificing the quality of your recordings if your system isn't clocked correctly.

Digital Clocking ExplainedIt is probably fair to say that the vast majority of audio is recorded, manipulated, post-produced and replayed using digital audio equipment of one form or another. And, whereas a decade and a half ago such equipment was the costly preserve of professional studios and mastering rooms, today digital mixers and signal processors are available at almost bargain-basement prices. In the analogue world, you pretty much got what you paid for: the highest-quality products were extremely expensive — the old law of 'diminishing returns' applied in a very audible way — and cheap products usually sounded, well, not too good usually!

The very nature of digital audio has changed all that, though. Once an analogue signal has been digitised, there is no fundamental reason why a £1000 digital mixer should sound any different to a £250000 digital mixer, or a top-flight Sony 3348 multitrack should sound different to an Alesis hard disk recorder. Sure, in all these cases there will be very significant operational differences, and there may be reliability and maintenance issues, but basically the audio quality is locked into a digital signal, and you can't accidentally mess that up... or can you?

The most important part of the paragraph above is the phrase 'once an analogue signal has been digitised'. It is the A-D conversion process which defines the quality of a digital signal. Mess that conversion up and there is absolutely nothing you can do to recover the original quality. So, that means choosing an appropriate sample rate and bit resolution, and setting the analogue signal level so that true signal peaks don't exceed the maximum level of the converter.

It is reasonable to assume that the more expensive converters will do a better job of this critical A-D process than budget converters, and all other things being equal this is generally true — although the differential is small and getting smaller all the time. High-end converters will certainly have better analogue circuitry, though, and the sampling and quantising sections of the converter are likely to be more accurate and consistent. Having said that, the almost universal use of oversampling and delta-sigma topologies has reduced the performance differential in that regard enormously in recent years.

The Importance Of Digital Clocking

Without doubt, the major difference between high-end and budget converters is the quality, stability, and consistency of the internal clock circuitry — the part that determines when a sample is taken. If this reference clock is not particularly stable then the interval between samples — which should be absolutely precise — will vary. This problem is known as jitter, and it affects many different aspects of digital audio systems, but is of particularly critical importance in A-D and, arguably to a less critical extent, D-A conversion.

Figure 1. Jittered samples in relation to the required sampling instants. The amplitude error caused by the jitter is shown in red.Figure 1. Jittered samples in relation to the required sampling instants. The amplitude error caused by the jitter is shown in red.If the clock is jittery in an A-D converter, for example, then the analogue audio waveform is likely to be measured at the wrong moments in time — either slightly too early or too late, relative to the correct sampling instants. It may not seem immediately obvious, but measuring the waveform at the wrong time produces exactly the same kind of sample amplitude error as measuring inaccurately at the right time. In both cases, the quantised sample will be described with an incorrect amplitude value and, since the size of the error will vary more or less randomly, this will sound like added noise — the bigger the error, the greater the noise. Moreover, once these amplitude errors have been introduced, there is nothing that can be done to remove them, so having a really accurate and totally stable clock is absolutely essential when converting between the analogue and digital domains.

It is also important to have a stable clock when converting from digital back to analogue as well, since, although the size of the sample is provided by the digital data, if the regenerated samples are output at the wrong moments, the resulting analogue waveform will differ from the original. However, as I hinted at above, poor performance here is arguably less critical, since an inaccurate converter (or reference word-clock source) can always be replaced with more accurate equipment, if necessary, and the full audio quality represented by the digital stream can subsequently be retrieved.

Effects Of Clock Jitter

At this stage you may be thinking that you can't hear any unwanted noise from your converters, so what's the problem? In fact, if you're using 24-bit converters, the noise floor of the recorded analogue audio signal is almost certainly higher than any jitter noise created by the level of converter clock instability even in a typical budget converter. So even if there were jitter noise present, I doubt you'd hear it — but that doesn't mean there isn't still a problem! The random sample amplitude errors caused by jitter also cause more audible problems, although they are often not immediately obvious.

Rather than thinking about a single analogue signal being converted to the digital domain, consider a stereo signal instead. The apparent spatial position of a signal source in a stereo sound stage is determined by the relative amplitude and timing of that signal between the two channels. As we have seen, an unstable A-D clock causes samples to be measured at the wrong time and therefore with the wrong amplitude. These amplitude inaccuracies are very small in relation to the foreground audio (although still significant), but are large compared with the very small ambient signals — things like sound reflections which help to define an acoustic space.

So, the effect of jitter errors is to impose a slight vagueness or loss of focus in the stereo image, as well as making the recorded acoustic environment appear less real. This ease with which this effect can be heard will depend very heavily on the ability of the monitor loudspeakers to recreate an accurate, three-dimensional sound stage in the first place — which is not something to be taken for granted with budget monitors. Where it is possible, switching between the A-D analogue input signal and the output of the complete A-D-A chain will reveal immediately the loss of spatial resolution caused by jitter (monitors permitting). However, I should say that this loss of spatial resolution is usually fairly subtle, and is easily overlooked amongst the other more obvious problems encountered when recording musicians! Subconsciously, though, we are usually aware that there is something wrong, and I suspect that many of those who complain about the 'unnatural' and 'lifeless' sound of digital systems are often referring, unknowingly, to the effects of jitter.

I should state here that the problem of jitter is certainly not restricted to budget converters. For, while high-end professional A-D converters can usually afford to employ superbly stable and accurate internal clock circuits, they don't always achieve the necessary precision. A very well-known professional DAW used in recording studios around the world had a notorious jitter problem with its own converters, for example, which is why 'golden-eared' operators preferred to use third-party interfaces instead.

Clocking In

Figure 2. The top diagram shows a basic daisy-chain clocking configuration, although this can suffer from errors if propagation delays are introduced in the chain. The lower two configurations avoid this problem, and which you use depends on which of your units have a fixed 75Ω termination.Figure 2. The top diagram shows a basic daisy-chain clocking configuration, although this can suffer from errors if propagation delays are introduced in the chain. The lower two configurations avoid this problem, and which you use depends on which of your units have a fixed 75Ω termination.So, I hope it is clear that a stable, accurate, jitter-free clock is a prerequisite for proper A-D conversion. The next logical question is where do we get such a clock? In the case of very high-end converters — such as the likes of Prism, DCS, and so on — it is a pretty safe bet that their internal clocks are about as good as they come. All you have to do is select the required sample rate and bit depth, feed in the analogue audio, and pass the resulting digital output to the recorder, mixer or whatever. Job done.

But what if you have several converters all running at the same time? Whether feeding a digital multitrack or console, it is essential that all the digital outputs are synchronised to each other — which means referencing to the same word clock. This is the reason why quality A-D converters almost always have an external word-clock input facility. Typically, you would allocate one converter as the 'word-clock master' (switched to operate at the required sample rate), and connect its word-clock output to the word-clock input of the next unit, which would be switched to reference the external clock.

If there are more than two converters to link together, you have a number of choices, shown in Figure 2. The first is to 'daisy-chain' the units together, and the second is to connect them using BNC T-pieces. Which approach offers the best performance will depend on the design of the equipment, and you should refer to the handbook for the particular equipment to see what the manufacturer recommends.

Figure 3. A simple clocking arrangement, where the mixer acts as the clock master and the A-D is slaved to it using a separate word-clock cable. The D-A here slaves to the clock derived from the mixer's digital audio output signal.Figure 3. A simple clocking arrangement, where the mixer acts as the clock master and the A-D is slaved to it using a separate word-clock cable. The D-A here slaves to the clock derived from the mixer's digital audio output signal.The daisy-chain system connects the master word-clock output of the first A-D to the external clock input of the next converter, and then from the clock output of that machine to the external clock input of the next, and so on. The potential advantage of this method is that the clock signal passed between each pair of converters is regenerated in each unit. One disadvantage is the possibility of a propagation delay as the clock passes down the line, so the last A-D may not be correctly synchronised to the first.

Another issue to be aware of is how the jitter on the clock signal changes as it is passed from input to output. In a well-designed system, the regeneration circuitry will reduce the incoming jitter, so the output clock signal might be better than the source. However, if the PLLs (phase-locked loops) which are used to detect and regenerate the clock are poorly designed, they could just as easily make the jitter worse!

Figure 4. A central word-clock master provides the clock reference for all equipment except where it is more practical to use the clock embedded within the audio signal (as with the D-A shown here). Equipment which cannot be synchronised must be passed through a sample rate converter in order to enable its output to be synchronised with the clocks of other digital sources.Figure 4. A central word-clock master provides the clock reference for all equipment except where it is more practical to use the clock embedded within the audio signal (as with the D-A shown here). Equipment which cannot be synchronised must be passed through a sample rate converter in order to enable its output to be synchronised with the clocks of other digital sources.The alternative arrangement is to use BNC T-pieces to route the word-clock signal output from the master converter to each unit in turn. Word clock is normally output on a video-style 75Ω BNC connector, and BNC T-pieces are commonly available which allow the input and output cable to be connected to the arms of the 'T', while the base of the 'T' splits the signal out to the clock input of a converter.

The advantage of this connection strategy is that the master reference word-clock signal is routed more or less directly to each subsequent converter, so there's no possibility of propagation delays or increased jitter. The disadvantage is that, since word clocks require a constant-impedance interface, all but the converter at the end of the cable have to provide a high-impedance input, rather than the normal 75Ω loading. If the converters do not offer this facility, this form of interfacing cannot be used, as the clock signal will suffer reflections and loss of amplitude, resulting in an unreliable system.

 Digital Clocks & Video 
 When working with video, the video syncs and digital word clock must be synchronised to each other. Since timecode counts video frames, it too will then be synchronous with the digital word clock.When working with video, the video syncs and digital word clock must be synchronised to each other. Since timecode counts video frames, it too will then be synchronous with the digital word clock.For those who are involved in audio for video, or who use SMPTE/EBU timecode for machine synchronisation, the issue of digital clocking has a further (slight) complication. Digital video recorders expect to see an integral number of samples within each video frame period (with one special exception I'll come back to shortly), so that means that the digital word clock has to be synchronised to the video frame rate. Furthermore, since timecode, by its very definition, counts video frames, it too must be synchronised to the digital word clock. Thus we have a kind of menage trois between video, word clock, and timecode.

To ensure this inter-relationship is maintained, a professional post-production area would probably reference the master clock generator which controls the digital audio equipment from a video master sync pulse generator (which will be controlling the video equipment in much the same way). However, video SPGs are even more expensive than digital clock generators! A cheaper alternative is to find a digital master clock generator — such as the Aardvark Aardsync II, for example — which has the facility to generate a reference video sync alongside the word clock (performed by an optional card in the case of the Aardsync). This reference video would be used to synchronise the video replay machine with the digital clocks.

The reason this is so important can be seen if you think about trying to dub a musical score onto a digital video recorder carrying a TV programme. The synchronisation between music and picture is maintained by the timecode (originally supplied with the pictures). This is doing two things: it says 'this is where you need to be', and 'you have to play at this speed'. In the analogue world, that is fine — there are no conflicts between those things. However, in a digital environment the requirement to 'play at this speed' is determined by the word clock, which controls how many samples are reproduced in each second.

So, if the timecode is allowed to drift in relation to the word clock you have a problem: either the music will gradually drift out of sync or, if synchronisation is maintained somehow, the rule about having a whole number of samples per picture frame will be broken, which will result in lots of digital clicks and splats all over the audio. Neither is desirable! In contrast, if the timecode and word clock are synchronised (along with the video frame rate) to each other, then there is no problem. Both the word clock and timecode are saying 'play at this speed', while the timecode also establishes where the music should be in relation to the pictures.

Finally, there's the case I mentioned earlier where there aren't a whole number of samples in a video frame. Well, at a 48kHz sample rate (the international standard for television and film audio tracks) you can fit 2000 samples onto a 24fps (frames per second) film; 1920 samples for 25fps PAL video; and 1600 samples for 30fps black and white NTSC video. However, NTSC colour video runs at the bizarre frame rate of 29.97fps, which would require 1601.6 samples. The solution (some would say bodge) is to encode digital samples in a group across five NTSC frames, (8008 samples), which has further implications for where edits can be performed... but that's another topic entirely!

 

Overclocking

It is worthwhile noting that the performance of even the best jitter-free converter can be seriously degraded by clocking it with a poor-quality external word clock — and conversely, the quality of a poor converter can often be improved by providing a better reference clock source. The latter is of particular relevance to home studios using budget equipment, of course. If you have a digital unit which is known to have a particularly accurate internal clock, you may be able to use this as the 'reference' for the rest of your equipment. Some people set their digital mixer up as the clock master, for example, and synchronise everything else to that.

Remember that you can synchronise clocks in digital equipment with more than just the classic BNC cable. Both AES-EBU and S/PDIF (coax and optical) signals carry clock information within the audio data stream, for example, and so recorders can often be synchronised using their input signals, rather than having to use dedicated word-clock cables. Professional digital studios generally employ a master clock generator to provide word-clock signals to each and every piece of equipment in the studio. There are several reasons for taking this approach. One is that everything is guaranteed to operate at the correct rate, and with perfect clock synchronisation. Another is that the entire studio can easily be synchronised to an external word-clock source — a facility which is important in applications involving video, for example. But the most important reason (as far as a budget studio is concerned) is that, by purchasing the highest-quality master clock generator, the performance of less accurate equipment can be enhanced to a high and uniform standard.

The Drawmer M-Clock is particularly well-suited to home-studio clocking duties, as it combines a high-quality master clock source with four sample rate converters. This means that you can not only synchronise professional devices directly, but you can also synchronise semi-pro equipment which cannot otherwise be locked to an external clock source.The Drawmer M-Clock is particularly well-suited to home-studio clocking duties, as it combines a high-quality master clock source with four sample rate converters. This means that you can not only synchronise professional devices directly, but you can also synchronise semi-pro equipment which cannot otherwise be locked to an external clock source.Photo: Mike CameronMaster clock generators are made by companies such as Aardvark, Audio Design, C-Lab, Drawmer, Lucid, Probel, Rosendahl and others. Most are priced around £1000 and the facilities they provide can vary considerably. For example, some can be referenced to external video signals directly, while others only accept an external word-clock input, and some cannot be referenced to an external clock at all. Some provide a large number of both word-clock and AES-EBU or S/PDIF outputs to synchronise studio equipment, whereas others have very few outputs and require the use of digital distribution amplifiers. Some offer simultaneous standard and overclocked word-clock outputs, enabling use with Pro Tools Super Clock, for example. The bottom line here is that, before buying a master clock generator, you have to decide what facilities are required — both now and in the future — and how the equipment will be interfaced.

Another issue of very practical relevance, where budget digital equipment is being used, is that not all digital products can be synchronised to a digital word clock — although all digital recorders will happily synchronise to their digital input while recording. If you have equipment which cannot be locked to an external word clock, the offending product will have to be connected through a sample rate converter, which itself can be synchronised to the external master clock. The Drawmer M-Clock master clock generator — which is aimed squarely at the typical digital home studio — is unusual in that it incorporates four sample rate converters specifically for this purpose.

Published April 2003