Monday, May 4, 2009

Tech Beat: marking time digitally...

I've been experimenting with this shareware tuner which I have hooked up to my 'everyday' Windows audio interface (a mobo based Sounblaster clone)... but I'd been frustrated because it seemed way 'out of tune' from my virtual synths or from guitars tuned to the tuner plug in in my DAW. (I keep the DAW (and v-synths) routed to my MOTU 828mkII.)

I figured this was because of presumed slightly different clock rates, as we expect from the crystal controlled clocks at the heart of almost all contemporary converters.

Now, crystals can be tuned with great precision, but the greater the precision, generally, the greater the cost. It's almost literally a matter of shaving off parts of the crystal to 'tune' it. I've never had a crystal controlled wrist watch, for instance, as accurate as the over fifty year old wind-up (actually 'self-winding' through motion) Omega I inherited from my grandfather. [And yet I gave up tape. Actually, when I was a kid in the early 60s, I think Nagra had an incredibly expensive portable deck where the transport was run by a wind up clock mechanism. It was a couple grand, back then, meaning the equivalent, I'm guessing, of about $25-$30K at 2009 prices.]


My goal was to be able to tune using the desktop mic always plugged into my machine's mobo card, since I don't always have a studio mic hooked to the MOTU.

And, helpfully, the tuner software has a calibration utility.


I used Sound Forge to generate a tone at 440 Hz and routed it out through the DA of the MOTU. I left the tuner connected to the mobo card (so I can use my desktop mic on an ad hoc basis).

I played the 440 over the MOTU and out the speakers and let the tuner do its analysis.

I knew the two converters' timing was off, still, I was surprised to find that it was 36 cents off! To hit 440 Hz (as 'defined' by the MOTU, that is) I had to recalibrate the mobo-connected tuner so that A had a value of ~ 449 Hz -- as rendered by my mobo-based SB cloen chip.


Of course, the mobo interface is basically just a lowball commodity chip and has no capability of accepting external clock sync -- and you'd like to think no one would want to try to use if for anything 'serious.'

But that really significant timing gap does, I think, illustrate why multiple converters must have a designated master clock (either one of the converters or an outside source) when they are run in tandem. This is a tonal/pitch difference that is very significant. Try to play with your guitar 36 cents out from your buddy's guitar and you'll see what I mean.


Of course, there are two timing issues with clocking. There is what we might call long scale accuracy -- analogous to a band beginning and ending on the same beat -- as well as short scale, internal 'interstitial' timing accuracy -- how regular the timing is between samples.

When we synchronize a formerly standalone converter to an external device, we're asking that converter's clock circuitry to do an extra difficult job of using a phase locked loop to keep sync with the exteranl clock source. But our now-slaved converter's crystal clock is still in the game, but now the PLL must continually readjust the circuit to 'mediate' between the external clock signal and the internal crystal-controlled sample timing.

For that reason, slaving to an external clock may improve long scale accuracy -- assuming the master clock is closer to 'standard' time (as measured, presumably by the Atomic Clock? ) but it will almost always tend to decrease sample-to-sample regularity, which we describe as increased jitter.


[Hmmm... this seemed much more interesting when I decided to write about it... oh well.]