View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004174||ardour||bugs||public||2011-07-12 19:43||2011-09-29 21:47|
|Summary||0004174: plugins or inserts screw up latency compensation of recordings from HW input across other tracks...|
|Description||...in that the audio is recorded too early.|
I first noticed this when I used a latency corrected hardware insert (for a HW reverb) on a mixbus in Harrison Mixbus and overdubbing some vocals to the built-in click, but using a plugin (with high latency) on a regular track in any version of Ardour I tested causes the same behaviour, wich renders Ardour and Mixbus almost unusable for overdubbing.
Assuming jack is started with right settings so that the hardware roundtrip is corrected under normal conditions (no plugins), here are the...
...steps to reproduce:
- Create a new session with four tracks
- put the artificial latency plugin on the first track and set it to 100 ms (other settings work as well but yield in different results)
- bounce the click internally to the second track wich should align to the grid perfectly
- connect tracks 3 and 4 to a hardware input where you can receive the return of the click and tracks you send to external hardware
- mute track 2 and record the click through the hardware to track 3
- mute track 3, turn of the click and unmute track 2, then record the click from track 2 through the hardware to track 4
- bypass the plugin and redo the recordings to verify
Observations (with my setup - see below):
- Without the plugin (or insert) or with the plugin bypassed all recordings should align perfectly (assuming jack is setup correctly for HW roundtrip)
- with the plugin enabled and set to 100 ms...
- ...bounces from the built-in click are early by about 179 ms
- ...bounces from track to track are early by (only) about 79 ms
- while bypassing the plugin does work around this behaviour, using "Options -> Performance -> Do not run plugins while recording" does not!
- the higher the latency of the plugin the higher is the offset
- I did this test on Debian Squeeze with 2.0-ongoing build from rev. 9847 using jackd 0.118.0. The log window of qjackctl reported the following jack command: "/usr/bin/jackd -t2000 -dalsa -dhw:0 -r48000 -p1024 -n2 -H -M -I100".
- On Squeeze I also tested with Mixbus 1.5.1 and 2.0.3 wich show the same behaviour.
- I also tested on Arch Linux with both jackd 0.121.2 and 1.9.7 - Ardour 2.8.11, 2.0-ongoing (a little earlier rev. than on Squeeze) and 3.0 from SVN (some revisions ago) and both Versions of Mixbus.
- Both distributions are 64 bit.
- Ardour 2.8.11 and Mixbus 1.5.1 of course exhibited the additional latency bug, wich was corrected in the newer versions.
|Tags||No tags attached.|
most-simple-session-A2-ongoing-rev9847.ardour (16,430 bytes)
ardour.rc (2,280 bytes)
In a conversation with paul on IRC we gathered that 100 ms of offset (click -> track via external hardware - according to the described test setup) stem from the fact that the click (in contrary to regular tracks) currently is not latency compensated (see my new bug report/feature request 0004181). The cause of the additional 79 ms offset was not clear at this point.
Some further testing showed that the offset is dependent on the highest cumulative latency of a track - tested with multiple plugs on a track as well as with plugs with different settings on multiple tracks.
Some additional numbers wich hopefully help to determine the cause:
offset latency factor
979 @1000 0,979
479 @500 0,958
179 @200 0,895
154 @175 0,88
129 @150 0,86
104 @125 0,832
79 @100 0,79
54 @75 0,72
29 @50 0,58
19 @40 0,475
14 @35 0,4
9 @30 0,3
4 @25 0,16
1 @22 0,0454545
0 @21 and below completely aligned
So when the max latency is 21 ms or below the recordings are perfectly (sample accurate) aligned.
Other things still to test:
- how does it behave with different sample rates?
- ...at different buffer sizes?
I also checked A3 (rev. 9869) again and noticed that it only exhibits the offset caused by the nonexisting latency compensation of the click but doesn't show the additional offset. Track to track is perfectly aligned in A3! :)
||Some further testing with different sample rates and buffer sizes showed that the offset occurs as soon as the plugin latency exceeds the latency with wich jack has been started. With hardware inserts this will of course allways be the case.|
||this should be fixed in current 2.0-ongoing SVN. i would appreciate a test. it was a lot of work! :)|
2.0-ongoing has a fix for the remaining issue. I was accidentally/inadvertently reversing the route list order during latency computation, causing the routes to be executed in the opposite order than intended, thus causing the appearance of latency.
a3 didn't have this problem because the order of the route list is mostly irrelevant there.
your testing assistance would be lovely.
||more fixes now update latency and capture alignment properties on transport stop, plugin add/remove etc, as used to happen.|
||How are things with 2.8.12?|
Using the simple test setup from above this specific issue seems to be fixed (using SVN rev. 10158), but in a slightly more complex session there still seems to be something massively wrong with latency correction in general. I'm still investigating... :(
Maybe this report should be closed and I'll open a new one and get on IRC when I manage to narrow things down a little more.
|2011-07-12 19:43||the_CLA||New Issue|
|2011-07-12 19:43||the_CLA||File Added: Bildschirmfoto-most-simple-session-A2-ongoing-rev9847 - Ardour.png|
|2011-07-12 19:44||the_CLA||File Added: most-simple-session-A2-ongoing-rev9847.ardour|
|2011-07-12 19:45||the_CLA||File Added: ardour.rc|
|2011-07-13 22:08||the_CLA||Note Added: 0011122|
|2011-07-14 21:16||the_CLA||Note Added: 0011127|
|2011-09-14 20:01||paul||Note Added: 0011509|
|2011-09-14 21:52||cth103||cost||=> 0.00|
|2011-09-14 21:52||cth103||Target Version||=> 2.8.12|
|2011-09-20 17:58||paul||Note Added: 0011544|
|2011-09-21 16:47||paul||Note Added: 0011551|
|2011-09-28 11:35||cth103||Note Added: 0011594|
|2011-09-28 11:35||cth103||Status||new => feedback|
|2011-09-29 21:47||the_CLA||Note Added: 0011623|
|2011-09-29 21:48||the_CLA||Note Edited: 0011623|