Record audio in advance from the midi

Hello,

In ardour 4 and 5 I use a midi track who control an Analog Rytm and I record the sound at the same time in an audio track in Ardour.

It work very fine but the audio signal is recorded in advance with 32th of a beat in Ardour 4 and 64th of a beat with Ardour 5.

Can I set this somewhere in preference ?

Thank you very much in advance for your help,

Philippe

Did you use the calibration tools in Ardour’s Audio/MIDI setup dialog to ensure that the program knows the precise audio and MIDI latency your signal flow?

It is ok now !
I stetted the buffer size on 32 in Ardour 5 and on 128 in Jack (frequency on 96 000 Hz and period on 2) and midi/audio are exactly at the same time.
Thanks for the help !

Hum … after reflexion, it work fine with the setting on top, but in Ardour 4, if I have a lot of tracks, like now, 43 audio + 27 midi (for now the midi are not actives) with jack buffer size on 128 I have a lot of xrun. It work fine with buffer size on 512 or 1024. So at 512 or 1024 it is not exactly at the same place.
With 2 track (audio+midi) Ardour 5 can work fine with jack buffer size on 128.
I have to finish a music with Ardour 4 but after I will use and test Ardour 5.

With the larger buffer sizes, you should be able to calibrate and correct for the latency as Paul advised, and then you should not have delays or xruns.

you should understand that at 96kHz (and even at 48kHz), 32 samples per buffer (or even 128) requires a very finely tuned combination of hardware and software. Please read: http://www.manual.ardour.org/setting-up-your-system/the-right-computer-system-for-digital-audio/

Thank again, this page is very interesting, a lot of thing to check but I understand better !
My configuration is ssd disk 256 Samsung pro + i7 + ddr3 2400 Hz + multiface 2 (+ pci card) + Ubuntu studio optimized (need to study more or maybe try another distribution, in the past I had my own Slackware with Ardour 1 and 2, it worked so fine, I made an album with it with a laptop ram = 512 + pentium cpu 2Ghz, I had sometime 50 track at the same time).

I rebooted my computer with my proper optimized rt kernel, and went in the bios to set some parameters, need to study more (…). And I opened my Ardour 4 session (43 audio + 27 midi ) with Ardour 5. I recorded in same conditions the Analog Rytm.
Buffer size Jack setted on:
-128 the audio is almost at the same time than the midi, maybe 1/1000 but sometime I have some xrun (especially when I stop the record)
-256 It is very good too, the difference between midi and audio is 256th of a beat and I have no xrun or very very rarely. I will choose this setting to continue to work.
-512 the difference is 128th (also good) of a beat without any xrun.

I also made a record of the Analog Rytm during 7 minutes with one of the 27 midi track (the kick) with the jack buffer size on 256. It worked fine without any xrun.

Ardour 5 seem to work really better than Ardour 4 because before I had to set Jack buffer size to 512 or 1024 (96 000 Hz).