Ralf Mardorf | 14 Mar 16:52 2012
Picon

Re: [LAU] midi backend not working in qjackctl?

On Tue, 2012-03-13 at 12:00 +0000,
linux-audio-user-request@... wrote:
> Message: 18
> Date: Mon, 12 Mar 2012 19:17:32 -0400
> From: Paul Davis <paul@...>
> Subject: Re: [LAU] midi backend not working in qjackctl?
> To: Arnold Krille <arnold@...>
> Cc: linux-audio-user@...
> Message-ID:
>         <CAFa_cKk7SEon2cT0s=TEdu9n26P6U5P4uN0Mz6zFS2OsYbyygA@...>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On 3/12/12, Arnold Krille <arnold@...> wrote:
> You should use a2jmidid even with the ALSA backend.

Especially in combination with Jack2's -Xalsarawmidi you'll get zero hw
MIDI jitter, aka hard real-time.

- Ralf
Paul Davis | 14 Mar 17:04 2012

Re: [LAU] midi backend not working in qjackctl?

On Wed, Mar 14, 2012 at 11:52 AM, Ralf Mardorf
<ralf.mardorf@...> wrote:

> Especially in combination with Jack2's -Xalsarawmidi you'll get zero hw
> MIDI jitter, aka hard real-time.

I don't know if this is the new code that was added recently.

If its the old stuff then it absolutely is not zero jitter. You're
confused about the difference between "real time", "low latency" and
"jitter". The whole problem of the old code is that was absolutely
"deliver it as fast as possible" and that is precisely is what causes
jitter.

--p
Ralf Mardorf | 14 Mar 17:32 2012
Picon

Re: [LAU] midi backend not working in qjackctl?

On Wed, 2012-03-14 at 12:04 -0400, Paul Davis wrote:
> On Wed, Mar 14, 2012 at 11:52 AM, Ralf Mardorf
> <ralf.mardorf@...> wrote:
> 
> > Especially in combination with Jack2's -Xalsarawmidi you'll get zero hw
> > MIDI jitter, aka hard real-time.
> 
> I don't know if this is the new code that was added recently.
> 
> If its the old stuff then it absolutely is not zero jitter. You're
> confused about the difference between "real time", "low latency" and
> "jitter". The whole problem of the old code is that was absolutely
> "deliver it as fast as possible" and that is precisely is what causes
> jitter.
> 
> --p

IIRC it was in April 2011 Jack2 1.9.8 from svn. Here hw jitter is close
to zero.

- Ralf
Paul Davis | 14 Mar 17:40 2012

Re: [LAU] midi backend not working in qjackctl?

On Wed, Mar 14, 2012 at 12:32 PM, Ralf Mardorf
<ralf.mardorf@...> wrote:

> IIRC it was in April 2011 Jack2 1.9.8 from svn. Here hw jitter is close
> to zero.

then your definition of jitter is very different from mine.
Paul Davis | 14 Mar 17:46 2012

Re: [LAU] midi backend not working in qjackctl?

On Wed, Mar 14, 2012 at 12:40 PM, Paul Davis
<paul@...> wrote:
> On Wed, Mar 14, 2012 at 12:32 PM, Ralf Mardorf
> <ralf.mardorf@...> wrote:
>
>> IIRC it was in April 2011 Jack2 1.9.8 from svn. Here hw jitter is close
>> to zero.
>
> then your definition of jitter is very different from mine.

let be me precise. the builtin (old) MIDI bridges in jack have the
following behaviour:

if, in a given process() cycle, they receive N different MIDI events,
they will attempt to deliver all N different MIDI events immediately,
completely ignoring the timestamps on each event.

if the process block size is small, this effect is fairly small. if
the process block is large, those MIDI events might correspond to a
time period of 20 or even 100msec. delivering one event from the
"start" of the process block and another from the "end" at the same
time is the definition of "jitter".
Ralf Mardorf | 14 Mar 17:59 2012
Picon

Re: [LAU] midi backend not working in qjackctl?

On Wed, 2012-03-14 at 12:40 -0400, Paul Davis wrote:
> On Wed, Mar 14, 2012 at 12:32 PM, Ralf Mardorf
> <ralf.mardorf@...> wrote:
> 
> > IIRC it was in April 2011 Jack2 1.9.8 from svn. Here hw jitter is close
> > to zero.
> 
> then your definition of jitter is very different from mine.

Perhaps just good luck. For my old Envy24 sound card MIDI jitter
correlated to the latency. The more latency, the more positive and
negative drift I got for audio recorded MIDI events from hw synth.
I never made MIDI recordings since I own a RME card.

FWIW ALSA MIDI sequencer timer was hrtimer and tickless was enabled by
the kernel. It's also said that tickless should be bad and I experienced
it vice versa.

For soft synth I never noticed serious issues, at least not for my
production Linux, even if I used 'seq' instead of a2jmidid.

FWIW mobo ASUS M2A-VM HDMI, without the HDMI thingy , but instead a
GeForce 7200 GS. AMD Athlon dual-core BE-2350. Sound card TerraTec EWX
24/96, PCI. I won't refer to ascertained measurement results, they might
be wrong, but others and I heard "improper timing" before and steady
timing when using -Xalsarawmidi.

- Ralf
Devin Anderson | 14 Mar 18:00 2012
Picon

Re: [LAU] midi backend not working in qjackctl?

On Wed, Mar 14, 2012 at 9:04 AM, Paul Davis <paul@...> wrote:
> On Wed, Mar 14, 2012 at 11:52 AM, Ralf Mardorf
> <ralf.mardorf@...> wrote:
>
>> Especially in combination with Jack2's -Xalsarawmidi you'll get zero hw
>> MIDI jitter, aka hard real-time.
>
> I don't know if this is the new code that was added recently.
>
> If its the old stuff then it absolutely is not zero jitter. You're
> confused about the difference between "real time", "low latency" and
> "jitter". The whole problem of the old code is that was absolutely
> "deliver it as fast as possible" and that is precisely is what causes
> jitter.

The 'alsarawmidi' slave driver in JACK 2 does not have this problem.
It postpones the delivery of events based on the audio buffer size.
Back in April, when I requested MIDI latency/jitter test results for
the driver, I saw peak jitter results as low as 60 microseconds.

The 'seq' and 'raw' drivers attached to the ALSA audio driver still
suffer from this problem.

--

-- 
Devin Anderson
surfacepatterns (at) gmail (dot) com

blog - http://surfacepatterns.blogspot.com/
synthclone - http://synthclone.googlecode.com/
(Continue reading)

Paul Davis | 14 Mar 18:09 2012

Re: [LAU] midi backend not working in qjackctl?

On Wed, Mar 14, 2012 at 1:00 PM, Devin Anderson
<surfacepatterns@...> wrote:

> The 'alsarawmidi' slave driver in JACK 2 does not have this problem.

right. that's what i was trying to distinguish between. when did that
code get into jack2?
Ralf Mardorf | 14 Mar 18:14 2012
Picon

Re: [LAU] midi backend not working in qjackctl?

On Wed, 2012-03-14 at 13:09 -0400, Paul Davis wrote:
> On Wed, Mar 14, 2012 at 1:00 PM, Devin Anderson
> <surfacepatterns@...> wrote:
> 
> > The 'alsarawmidi' slave driver in JACK 2 does not have this problem.
> 
> right. that's what i was trying to distinguish between. when did that
> code get into jack2?

On Wed, 2012-03-14 at 17:32 +0100, Ralf Mardorf wrote:
> IIRC it was in April 2011 Jack2 1.9.8 from svn. Here hw jitter is
> close to zero.

On Wed, 2012-03-14 at 10:00 -0700, Devin Anderson wrote:
> The 'alsarawmidi' slave driver in JACK 2 does not have this problem.
> It postpones the delivery of events based on the audio buffer size.
> Back in April, when I requested MIDI latency/jitter test results for
> the driver, I saw peak jitter results as low as 60 microseconds.

;)
Ralf
Devin Anderson | 14 Mar 18:16 2012
Picon

Re: [LAU] midi backend not working in qjackctl?

On Wed, Mar 14, 2012 at 10:09 AM, Paul Davis
<paul@...> wrote:
> On Wed, Mar 14, 2012 at 1:00 PM, Devin Anderson
> <surfacepatterns@...> wrote:
>
>> The 'alsarawmidi' slave driver in JACK 2 does not have this problem.
>
> right. that's what i was trying to distinguish between. when did that
> code get into jack2?

It was merged into SVN on April 1, 2011.

--

-- 
Devin Anderson
surfacepatterns (at) gmail (dot) com

blog - http://surfacepatterns.blogspot.com/
synthclone - http://synthclone.googlecode.com/
Paul Davis | 14 Mar 18:16 2012

Re: [LAU] midi backend not working in qjackctl?

On Wed, Mar 14, 2012 at 1:16 PM, Devin Anderson
<surfacepatterns@...> wrote:
> On Wed, Mar 14, 2012 at 10:09 AM, Paul Davis
<paul@...> wrote:
>> On Wed, Mar 14, 2012 at 1:00 PM, Devin Anderson
>> <surfacepatterns@...> wrote:
>>
>>> The 'alsarawmidi' slave driver in JACK 2 does not have this problem.
>>
>> right. that's what i was trying to distinguish between. when did that
>> code get into jack2?
>
> It was merged into SVN on April 1, 2011.

ok, so Ralf's report is correct.

Gmane