Audio/Midi drift
When using Qtractor with its default settings, I got time drift between the audio and the midi music.
In the beginning of the song it's just a little but after two minutes, +500 ms of drift is no way to go.
So I had a little conversation with the developer, here's an extract:
Audio/Midi drift
> On my fresh AVLinux install, I get the following messages in (the by
> default installed) Qtractor 4.3:
>
> 20:12:32.349 qtractorMainForm::
transportPlay()
> qtractorMidiEngine::drift(): iAudioTime=1921 iMidiTime=1914 (7) iTimeDrift=7
> qtractorMidiEngine::drift(): iAudioTime=3841 iMidiTime=3829 (6)
> iTimeDrift=12
> 20:12:34.799 qtractorMainForm::transportBackward()
> qtractorMidiEngine::drift(): iAudioTime=1921 iMidiTime=1912 (9) iTimeDrift=9
> qtractorMidiEngine::drift(): iAudioTime=3841 iMidiTime=3829 (4)
> iTimeDrift=12
> qtractorMidiEngine::drift(): iAudioTime=5761 iMidiTime=5744 (6)
> iTimeDrift=17
>
> I checked out the latest svn version and built it with ./configure
> --enable-debug
> and renamed my old /home/username/.config/rnbc.org/qtractor.conf
> > file.
> The drifting now stops when I hit the transport Backward button:
>
<snip>
>
> Is this a bug or should I adjust something somewhere ?
> I attached the config.log from the qtractor-svn directory.
>
the audio/midi time drift messages are only there displayed when built
with --enable-debug; time units are expressed in midi ticks so it
depends on current tempo and midi timer resolution.
drifting is indeed unavoidable, there's no perfect system and there are
no two clocks in the universe that are in perfect sync. the purpose of
the messages are to let you know how much are the audio and midi clocks
drifting apart.
qtractor does compensate continuously for the drifting. you don't have
to worry that much with those messages, unless those numbers start to
get huge and/or explosive. that may happen when timers are broken or
less than optimal.
now that you know about that little secret ;) try changing some options
in effect in View/Options.../MIDI/Playback/Queue timer (resolution) and
check which one might give you better results (fewer messages, with
lesser drift times)
cheers
--
rncbc aka Rui Nuno Capela
This "Queuer timer (resolution)" setting is activated by loading a session and indeed, when I leave it at (default), the time drift keeps ascending. When I set the Queuer timer to PCM playback 1-0-0 (slave) , the time drift goes from -1 to 0 to 1 and that's it. The other PCM's also work well, sometimes even no drift at all but I didn't test them too hard yet. (And YMMV)