Play-through latency comparison between TAAE and libPD

Hi all,

I made a comparison of play-through latencies with the "simplest possible" play-through programs using TAAE and libPD. I don't know if the methodology is correct, but it makes sense. You can find a detailed description with graphs etc on this page:

but a rough description would be:

I connected two guitar cables to the two audio inputs of a Presonus Firebox sound card. Input 1 was the “test signal” and input 2 the “ground-truth” signal. For testing the latency introduced by libPD and TAAE, the “test signal” was connected to an iPhone 6 before reaching the sound card. For a sanity-check of the process, I also tested both inputs driven directly (without iPhone intervention) into the sound card – just to make sure that there is no inherent latency between the two inputs of the sound card.

For comparing the difference between input 1 (test signal) and input 2 (ground truth), I recorded the both signal in two separate channels in Ableton Live. At some point during the recording I made both cables touch each other, producing an impulse peak in both channels. Then I extracted both signals in separate wav files, imported them in Matlab to measure the distance between the peaks in both signals. I considered this distance (in samples or seconds) as the value of latency introduced by using the iPhone.

Results were:

libPD latency: 2335 samples — 0.0529 seconds
TAAE latency: 742 samples — 0.0168 seconds

TAAE wins!

I'll be very happy to hear your comments, thoughts, suggestions etc...



  • Hey max; you need to be comparing apples with apples here: Make sure you've set the IO buffer duration for AVAudioSession the same for both libraries.

  • edited June 2016

    Hi Michael,

    thanks for the hint! I was thinking that there should be a way to define buffer duration for lipPD too, but couldn't find out how. I'll set it up through the AVAudioSession as you suggested. I guess that it's done this way:

    AVAudioSession *session = [AVAudioSession sharedInstance];
    NSTimeInterval bufferDuration =.005;
    NSError *audioSessionError = nil;
    [session setPreferredIOBufferDuration:bufferDuration error:&audioSessionError];

    I'll report back the soonest possible!

  • Yep, that's right

  • Thanks again Michael, I just did the adjustment and it seems that they are both almost equally awesome!

    TAAE latency: 742 samples -- 0.0168 seconds
    libPD latency: 797 samples -- 0.0181 seconds

    Next weekend I will do a CPU-wise comparison.

  • Yup, that's what I expected.

    I don't know how useful a CPU comparison would be, because they're such different tools; TAAE is mostly about audio routing and mixing - it's high level, and you write your own effect code (or use Apple's). PD is all about effects and audio manipulation, a totally different beast - in fact, you might even want to use them together; TAAE for the high level audio signal flow, PD for manipulation. I don't think they're really comparable.

Sign In or Register to comment.