[ardour-dev] testing plugin latency compensation and alignment

philicorda philicorda at ntlworld.com
Mon Aug 1 16:52:36 PDT 2005


On Mon, 2005-08-01 at 17:53 -0400, Paul Davis wrote:
>> Record Click to track with input 'ardour click out 1'
>> Recorded Click is early. First beat's attack is missing. Second is at
> 
> yes, this caused me significant headaches when i was working on the
> code. the problem, if it really is a problem, is that ardour does a
> declick fade-in and fade-out at transport start/stop which affects
stuff
> like this. 

Fine. 

> 
>> 20002 frames rather than 22050 where it should be.
> 
>you had the wrong alignment choice for recording the click. thats OK
for
> the purposes of this test.
> 
> > Record Click to track with loopback input 'alsa pcm capture:1'
> > Recorded Click is late. First beat is at 190 frames rather than 0.
> 
> 190 frames sounds about right for the D/A and A/D converters in your
> system, assuming its not an all-digital unit. let me know.

I'm using an analog loopback.

> 
> > Test 2: Recording the click. 
> > Ardour settings: align recorded material with exact time recorded.
> > 
> > Record Click to track with input 'ardour click out 1'
> > Recorded click is exactly in time.
> 
> as expected.
> 
> > Record Click to track with loopback input 'alsa pcm capture:1'
> > Recorded Click is late. First beat is at 2238 frames rather than 0.
> 
> yes, it should be late, 1 period + (in your case) about 190 frames.
> perfect.
> 
> > 
> > Test 3: Re-recording the recorded exactly in time click track to a
new
> > track. 
> > Ardour settings: Align recorded material with existing material.
> > 
> > Record Click to track with loopback input 'alsa pcm capture:1'
> > Recorded Click is late. First beat faded in (see misc notes).
> > Second beat is at 22240 frames rather than 22050.
> 
> again, about 190 frames - D/A + A/D delays, i hope.

Good. I did a test with jdelay and qjacklam latency testers with a 2048
frames/period setting in jack and got:
2048 (direct loopback connection via jack, exactly right)
4285 (Analog loopback)
4285-4096=189 frames.

And at 256 frames/period:
256 (direct loopback connection via jack)
701 (Analog loopback)
701-512=189 frames

The 189 frames delay did not change at 48k sample rate either, so it
does appear to be a constant d/a a/d delay. The Gina is rather an old
card, so 2ms odd is acceptable.

> 
> > Test 4: Re-recording the recorded exactly in time click track. An
> > artificial latency plugin set to 400ms is inserted on an unused
audio
> > track.
> > Ardour settings: Align recorded material with existing material.
> > 
> > Record to track with loopback input 'alsa pcm capture:1'
> > Recorded Click is late. First beat is at 2238 frames rather than
zero.
> 
> as above, perfect given the assumption about converter delays.

Is this perfect? Shouldn't it still be only 190ish frames out rather
than 2238? Surely the extra 2048 frames should not be there as I am
using 'Align recorded material with existing material'.

This is what I meant by my last comment/test about the plugin latency
being compensated for, but not the jack period latency.




More information about the Ardour-Dev mailing list