Nat! bio photo


Senior Mull.

Twitter RSS


Garageband Latency, excellent

I was wondering how much latency there is when using Garageband. If I am playing with the metronome, the metronome sound bits get "rendered" into a buffer. That incurs a little lag as sounds are usually rendered a few samples each.

So the lag (I think) is 1s / #samplerate * (samples_per_output). If the buffer is 128 samples long, the lag should be 1 / 44100 * 128 = 3 ms. Then the sounds travels to my ear currently at around 350 m/s. It's hot and humid here in Bochum. As my speakers are a bit more than 50 cm distant from me that should be around 2 ms lag.

Interestingly one can observe this with Garageband or in this case Cacaphony a shareware Sampler. The left channel is the directly miced click from the metronome and the right (lower) channel is miced from a distance. Sound does indeed take some time to travel.

Then my brain has to process the signal and tell my fingers to move. One can only imagine how much lag that means.

Finally a note is sounded, the strings excite the pickups and a signal gets transmitted with a speed close to that of light (good ol' analog technology) to the line input of my G5. There it is sampled at a rate of 44.1Khz and sent to Garageband in small packets each. So this is the same situation in reverse, that I described at output time.

So to measure the latency of my setup, I directly miced the speakers and recorded the result with Garageband again. As there was almost no air distance and no human brain involved, the latency would be incurred by the output and input buffers only. As you can see, there is no significant latency.

I wanted to record this with my iSight, but you can't use the iSight with Garageband. iSight samples with 48 Khz and Garageband needs 44.1 Khz. Pretty lame.