On Wed, Jul 14, 2010 at 08:09:29PM +0200, Ralf Mardorf wrote:
On Wed, 2010-07-14 at 19:56 +0200, Arnout Engelen
wrote:
On Wed, Jul 14, 2010 at 03:23:03PM +0200, Ralf
Mardorf wrote:
I disconnected all audio connections for JACK and
connected hw MIDI in
to hw MIDI out. connected the DX7 MIDI out directly to the D4 MIDI in and
then I reconnected to the PCI card.
The difference is alarming :(.
Yamaha DX7 --> Alesis D4 results in a 100% musical groove.
Yamaha DX7 --> PC --> Alesis D4 results in extreme latency
So here you're directly routing the MIDI IN to the MIDI OUT, and
experiencing latency. Are you using JACK here, or directly ALSA? In other
words, are you connecting 'in' to 'out' in the qjackctl 'MIDI'
tab or in
the 'ALSA' tab?
I'm connecting MIDI in the Qtractor (quasi QjackCtl) ALSA MIDI tab.
OK, if that's causing noticable latency, there's something odd going on - and
we should first see if we can fix this: layering more stuff (jack, a2j,
fluidsynth, qtractor etc) on top of this (apparently) weak foundation will
just confuse us.
Before finding out how to prevent 'noticable latency' for this use case, I'd
say it would be good to try and quantify this for a bit.
I took a MIDI Keyboard (m-audio keystation) and a Synth (Yamaha VL70-m),
connected them to each other directly, put a mic close to the keyboard, and
hit a key repeatedly with my nail.
The recording has a nice plastic 'tick' of me hitting the key with my nail,
and the softsynth sound starting a fraction of a second later. Looking with
audacity, the total nail-to-synthsound latency is about 20-26ms.
Then I plugged the synth into my USB audio/MIDI card (Edirol UA-25EX) and
connected the MIDI keyboard to my laptop (directly with USB).
Did the same test again, recorded it, and the nail-to-synthsound latency now
seems to be rougly in the 23-26ms range.
To *me*, this doesn't really seem to be a very noticable/problematic latency -
but I'm not a keyboard player, I might not be so sensitive. I remember playing
a MIDI wind controller at different latencies (I'm a saxophone player) - I'm
not sure if I could *hear* it, but I could sure *feel* the difference.
The wavs are at
http://arnout.engelen.eu/files/dev/linuxmusicians/latencytests/
for your enjoyment. Such beautiful music!
It might be interesting if you could make similar recordings - see what kind
of latency gets unacceptable, if the latency is mostly constant or very
jittery, if it's much bigger than here or that you're just more sensitive than
me, etc.
Arnout
(the laptop used in these tests is a 2ghz single-core debian machine without
much tuning - the kernel doesn't even have preemption enabled, let alone the
-rt patch)