Music becoming out of sync with click


I am not entirely sure if the issue I am experiencing is called latency, or audio drift.

Machine : Dual core AMD x64 Phenom 555BE w/ 8 gigs ram running 64 bit Ubuntu Studio 12.04, EMU 1212m PCI audio card.


I recorded a 4 minute song in Ardour to the click. I then programmed drums in Hydrogen. The two programs sync up , and play back in conjunction. Very pleased about this. However, at about 2 minutes, the music starts to mismatch the click track and drums.

My questions:

Am I experiencing latency or audio drift?

If latency, what are your suggestions to reduce? I have changed settings in qjackctl to 128 Frames /Period and force 16 bit is checked. In Ardour, I have changed the Jack settings to the lowest possible value.

Would reducing some of the processes running in the background affect the quality of my recordings?

Would upgrading the processor make any difference?

So close to freeing myself of the Windows hassle for my DAW, but this makes me nervous…

Other than that Ardour is a beautiful piece of software!

Thanks in advance for your input.

Also, thank you for a wonderful product.

I have used Linux for years for personal and business usage, and am so happy to finally get rid of my windows partition!

Its likely to be unrelated to any of the above. Hydrogen and Ardour do not share “click” information. They will not run precisely in sync unless they do their math in an identical fashion, which is unlikely.


If I take Hydrogen out of the equation, my ears can hear the mismatch between recorded audio in Ardour and the click in Ardour.

This is what concerns me the most.

I will just import a .wav from Hydrogen for a final product, but It’s neat that the two sync to make it easy to program.

Also, would trimming running processes make a noticeable impact in the system performance?

Currently have rsyslog collecting log files from a router, and vsftpd running as well as cupsd, and lmsensors providing hardware info. These could be killed off if need be…

What about Pulse Audio? It seems to play nicely with jack, but perhaps it should be killed during recording?

Should mention that I have no xrunsat all, and the audio sounds nice and clean.

I am determined not to give another cent to either Steinberg or Microsoft…

Ok I have been reading for close to 6 hours to figure out why I am having this issue.

qjackctl reports 5.33 ms latency, which from what I read is acceptable.

So why are my tracks (20 ATM) coming out of alignment?

Thoroughly confused here…

Ok I think I am closer to understanding why I have this issue.

Is this a case where i/o latency must be set properly in jack ?

No. it is not. This is not a “bug” in either program. There is no way for them to remain in sync. JACK provides sample-accurate sync, but it does not provide a way to share the computation of musical time based on sample time. Tiny differences in the computation used by each program will lead them going out of sync over a relatively short period of time if what you are comparing are the results of each program deciding where the next beat is. By contrast, they will remain precisely in sync for audio itself.

Basically, what you are doing is not really a workflow that any of the tools (ardour, hydrogen or JACK) support.

(edited to add the word “not” to make it clear that JACK doesn’t do what is necessary here)

Does Hydrogen support MIDI clock? Is this a situation which will work with Ardour 3 due to the new MIDI support, by using MTC or MIDI clock to synchronize the two programs?

I am sorry Paul, I think we are speaking of two different issues.

Take Hydrogen out of the equation.

Guitar tracks that I would record to Ardour’s click track were affected by latency,. I would record something, and then notice that it did not match up with the click. Of course, I could manually move each individual track, but that is ridiculous.

I solved this by running jack_iodelay, and dividing the extra latency by two, and then adding that value to the input / output latency area in jack setup.

This has solved the issue. Tracks that I listen to to overdub, are now in time with the click. Best of all, is that there are no xruns, and jack is operating at a relatively low latency!

I am using hydrogen to program drums, with ardour running as a reference point, and then exporting a .wav file from hydrogen, and importing that into Ardour, and mixing from there.

I have successfully completed a song using Ardour, and am more than stoked!

I thank you for your replies.