Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   64 Studio Developer (http://www.linux-archive.org/64-studio-developer/)
-   -   ALSA MIDI latency test results are far away from reality (http://www.linux-archive.org/64-studio-developer/399160-alsa-midi-latency-test-results-far-away-reality.html)

Ralf Mardorf 07-14-2010 02:22 PM

ALSA MIDI latency test results are far away from reality
 
Hi Robin :)

On Wed, 2010-07-14 at 15:44 +0200, Robin Gareus wrote:
> On 07/14/2010 03:23 PM, Ralf Mardorf wrote:
> > [..]
> > AND IT'S AUDIBLE THAT THERE IS MUCH MORE JITTER BUT 1.1 ms.
> >
> > Any hints how to solve this are welcome.
>
> Did you try to start jackd with -p64 instead of -p1024

A good argument, because when I made tests in the past for the USB MIDI,
things become better at >= -p256 (when I had this Windows test install
latency for the EWX 24/96 audio was less high than for Linux). The
problem here is, that I need at least -p512 and even than I'm not safe
regarding to issues for JACK audio, that's why I used -p1024 instead of
-p512. For a test -p64 should work, but when recording music I would
need to increase it step by step until a minimum of -p512.

IIRC when I did tests for the USB MIDI with -p64 or even -p125 (I'm not
sure) it theoretically did work, but this isn't a solution, because at
some point JACK audio will fail.

> using JACK-midi, I've encountered a similar issue with fluidsynth always
> synchronizing note-start/ends to jack cycles.
>
> Simply lowering the frames-per-period got me playing again so I did not
> check if it's related to JACK-midi or FluidSynth 1.1.1 in general.

At least FluidSynth DSSI (host is Qtractor) is able to play in unison
with any DSSI or virtual ALSA MIDI and JACK MIDI (-Xseq) synth on my
machine. Just 'in unison' for virtual synth to hw synth there sometimes
is more delay, but just an early reflection like effect.

Note! It was hard to groove when I connected the master keyboard to ALSA
hw MIDI in --> DIRECTLY TO --> ALSA hw MIDI out and this to a 100% ok
drum module. Directly connecting the master keyboard to the drum module
there were no issues.

I need to do something else now, but I take time off. From Friday
(perhaps earlier) until next Sunday noon I could spend the whole days
for this MIDI issue only.

Resume:

I assume that -p64 would solve this 'looooooong early reflection like
effect/async', but then hard disk recording will become impossible.

The target is, that Linux at least replace the Atari ST as sequencer +
an analog 4-Track machine synced by SMPTE. With -p64 4-track recoding
would become impossible.

'Read you later' today or at the latest on Friday.

Cheers!

Ralf

_______________________________________________
64studio-devel mailing list
64studio-devel@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-devel

Ralf Mardorf 07-14-2010 03:10 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 15:52 +0200, Clemens Ladisch wrote:
> Ralf Mardorf wrote:
> > 1.
> >
> > I disconnected all audio connections for JACK and connected hw MIDI in
> > to hw MIDI out.
>
> Is this connection through JACK or through ALSA, i.e., does it show up
> in the output of "aconnect -l"? From what I understand, JACK's sample-
> synchronous timing always adds latency, and might add period-related
> jitter depending on the implementation.

Qtractor at the moment is ALSA MIDI only and I even didn't use the -Xseq
bridge.


> > Yamaha DX7 --> Alesis D4 results in a 100% musical groove.
> > Yamaha DX7 --> PC --> Alesis D4 results in extreme latency,
>
> With a single MIDI loopback cable, the latency test program tests
> a "PC --> PC" connection. A more realistic test would be
> "PC1 --> PC2 --> PC1" (or just one PC if it has two inputs and two
> outputs).

I've got 1 USB MIDI and two PCI MIDI by 2 Terratec EWX 24/96 Envy24
based sound cards. I'll avoid to ever connect the USB MIDI to my machine
again (as I'll avoid to install ever a Windows to it again ;).

Next month I could buy another MIDI adaptor cable and run
alsa-midi-latency-test by using both PCI cards.

I bring myself to connect the USB MIDI one more time ;).



64 Studio 3.3 alpha

$ su -c "poff dsl-provider"
$ su -c "cpufreq-selector -g performance"
$ uname -a
Linux 64studio 2.6.31-2-multimedia-amd64 #1 SMP PREEMPT RT Thu Oct 1
16:14:20 BST 2009 x86_64 GNU/Linux.

$ alsa-midi-latency-test -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 TerraTec EWX24/96 TerraTec EWX24/96 MIDI
20:0 USB Device 0x170b:0x11 USB Device 0x170b:0x11 MIDI 1
24:0 TerraTec EWX24/96 TerraTec EWX24/96 MIDI



################################################## ######################
### ONE OF THE PCI CARDS
################################################## ######################



$ alsa-midi-latency-test -Rrw=5 -i16:0 -o16:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 1.05; 1.05
787; 1.06; 1.06
1227; 1.06; 1.06
8738; 1.07; 1.07
9999; 1.00; 1.07
> done.

> latency distribution:
...
1.0 - 1.1 ms: 9992
##################################################
1.1 - 1.2 ms: 8 #

> SUCCESS

best latency was 0.99 ms
worst latency was 1.07 ms, which is great.



################################################## ######################
### THE USB MIDI WITH AN UNLUCKY ENTRY FOR THE RTIRQ SCRIPT
################################################## ######################



Usually I keep Rui's entries for the script.

$ cat /etc/default/rtirq | grep RTIRQ
RTIRQ_NAME_LIST="rtc snd i8042"
RTIRQ_PRIO_HIGH=98
RTIRQ_PRIO_DECR=5
RTIRQ_RESET_ALL=0
RTIRQ_NON_THREADED="rtc snd"
# RTIRQ_HIGH_LIST="timer"

$ alsa-midi-latency-test -Rrw=5 -i20:0 -o20:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 2.21; 2.21
9999; 1.99; 2.21
> done.

> latency distribution:
...
1.9 - 2.0 ms: 2 #
2.0 - 2.1 ms: 9997
##################################################
...
2.2 - 2.3 ms: 1 #

> SUCCESS

best latency was 1.95 ms
worst latency was 2.21 ms, which is great.



################################################## ######################
### PCI MIDI out --> USB MIDI in
################################################## ######################



$ alsa-midi-latency-test -Rrw=5 -i20:0 -o16:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 2.03; 2.03
186; 2.04; 2.04
2726; 2.04; 2.04
9999; 1.99; 2.04
> done.

> latency distribution:
...
1.9 - 2.0 ms: 2 #
2.0 - 2.1 ms: 9998
##################################################

> SUCCESS

best latency was 1.92 ms
worst latency was 2.04 ms, which is great.



################################################## ######################
### USB MIDI out --> PCI MIDI in
################################################## ######################



$ alsa-midi-latency-test -Rrw=5 -i16:0 -o20:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 1.14; 1.14
1; 1.93; 1.93
2; 1.99; 1.99
5; 2.00; 2.00
6; 2.00; 2.00
13; 2.01; 2.01
22; 2.03; 2.03
36; 2.03; 2.03
51; 2.03; 2.03
65; 2.03; 2.03
265; 2.04; 2.04
1160; 2.04; 2.04
2267; 2.07; 2.07
9999; 1.96; 2.07
> done.

> latency distribution:
...
1.1 - 1.2 ms: 1 #
...
1.9 - 2.0 ms: 31 #
2.0 - 2.1 ms: 9967
##################################################
2.1 - 2.2 ms: 1 #

> SUCCESS

best latency was 1.14 ms
worst latency was 2.07 ms, which is great.



$ cd /etc/init.d
$ ./rtirq status

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
388 FF 95 - 135 0.0 S< irq/8-rtc0
1119 FF 90 - 130 0.0 S< irq/21-ICE1712
1115 FF 89 - 129 0.0 S< irq/20-ICE1712
381 FF 85 - 125 0.0 S< irq/1-i8042
380 FF 84 - 124 0.0 S< irq/12-i8042
102 FF 50 - 90 0.0 S< irq/9-acpi
539 FF 50 - 90 0.0 S< irq/16-ohci_hcd
588 FF 50 - 90 0.0 S< irq/19-ehci_hcd
590 FF 50 - 90 0.0 S< irq/22-ahci
601 FF 50 - 90 0.0 S< irq/14-ide0
603 FF 50 - 90 0.0 S< irq/17-ohci_hcd
604 FF 50 - 90 0.0 S< irq/22-ohci1394
608 FF 50 - 90 0.0 S< irq/18-ohci_hcd
611 FF 50 - 90 0.0 S< irq/17-ohci_hcd
614 FF 50 - 90 0.0 S< irq/18-ohci_hcd
943 FF 50 - 90 0.0 S< irq/7-parport0
1670 FF 50 - 90 0.2 S< irq/18-nvidia
1984 FF 50 - 90 0.0 S< irq/26-eth0
4 FF 49 - 89 0.0 S< sirq-high/0
5 FF 49 - 89 0.0 S< sirq-timer/0
6 FF 49 - 89 0.0 S< sirq-net-tx/0
7 FF 49 - 89 0.0 S< sirq-net-rx/0
8 FF 49 - 89 0.0 S< sirq-block/0
9 FF 49 - 89 0.0 S< sirq-tasklet/0
10 FF 49 - 89 0.0 S< sirq-sched/0
11 FF 49 - 89 0.0 S< sirq-hrtimer/0
12 FF 49 - 89 0.0 S< sirq-rcu/0
18 FF 49 - 89 0.0 S< sirq-high/1
19 FF 49 - 89 0.0 S< sirq-timer/1
20 FF 49 - 89 0.0 S< sirq-net-tx/1
21 FF 49 - 89 0.0 S< sirq-net-rx/1
22 FF 49 - 89 0.0 S< sirq-block/1
23 FF 49 - 89 0.2 S< sirq-tasklet/1
24 FF 49 - 89 0.0 S< sirq-sched/1
25 FF 49 - 89 0.0 S< sirq-hrtimer/1
26 FF 49 - 89 0.0 S< sirq-rcu/1

- Ralf


>
>
> Regards,
> Clemens



_______________________________________________
64studio-devel mailing list
64studio-devel@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-devel

Ralf Mardorf 07-14-2010 03:10 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 15:52 +0200, Clemens Ladisch wrote:
> Ralf Mardorf wrote:
> > 1.
> >
> > I disconnected all audio connections for JACK and connected hw MIDI in
> > to hw MIDI out.
>
> Is this connection through JACK or through ALSA, i.e., does it show up
> in the output of "aconnect -l"? From what I understand, JACK's sample-
> synchronous timing always adds latency, and might add period-related
> jitter depending on the implementation.

Qtractor at the moment is ALSA MIDI only and I even didn't use the -Xseq
bridge.


> > Yamaha DX7 --> Alesis D4 results in a 100% musical groove.
> > Yamaha DX7 --> PC --> Alesis D4 results in extreme latency,
>
> With a single MIDI loopback cable, the latency test program tests
> a "PC --> PC" connection. A more realistic test would be
> "PC1 --> PC2 --> PC1" (or just one PC if it has two inputs and two
> outputs).

I've got 1 USB MIDI and two PCI MIDI by 2 Terratec EWX 24/96 Envy24
based sound cards. I'll avoid to ever connect the USB MIDI to my machine
again (as I'll avoid to install ever a Windows to it again ;).

Next month I could buy another MIDI adaptor cable and run
alsa-midi-latency-test by using both PCI cards.

I bring myself to connect the USB MIDI one more time ;).



64 Studio 3.3 alpha

$ su -c "poff dsl-provider"
$ su -c "cpufreq-selector -g performance"
$ uname -a
Linux 64studio 2.6.31-2-multimedia-amd64 #1 SMP PREEMPT RT Thu Oct 1
16:14:20 BST 2009 x86_64 GNU/Linux.

$ alsa-midi-latency-test -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 TerraTec EWX24/96 TerraTec EWX24/96 MIDI
20:0 USB Device 0x170b:0x11 USB Device 0x170b:0x11 MIDI 1
24:0 TerraTec EWX24/96 TerraTec EWX24/96 MIDI



################################################## ######################
### ONE OF THE PCI CARDS
################################################## ######################



$ alsa-midi-latency-test -Rrw=5 -i16:0 -o16:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 1.05; 1.05
787; 1.06; 1.06
1227; 1.06; 1.06
8738; 1.07; 1.07
9999; 1.00; 1.07
> done.

> latency distribution:
...
1.0 - 1.1 ms: 9992
##################################################
1.1 - 1.2 ms: 8 #

> SUCCESS

best latency was 0.99 ms
worst latency was 1.07 ms, which is great.



################################################## ######################
### THE USB MIDI WITH AN UNLUCKY ENTRY FOR THE RTIRQ SCRIPT
################################################## ######################



Usually I keep Rui's entries for the script.

$ cat /etc/default/rtirq | grep RTIRQ
RTIRQ_NAME_LIST="rtc snd i8042"
RTIRQ_PRIO_HIGH=98
RTIRQ_PRIO_DECR=5
RTIRQ_RESET_ALL=0
RTIRQ_NON_THREADED="rtc snd"
# RTIRQ_HIGH_LIST="timer"

$ alsa-midi-latency-test -Rrw=5 -i20:0 -o20:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 2.21; 2.21
9999; 1.99; 2.21
> done.

> latency distribution:
...
1.9 - 2.0 ms: 2 #
2.0 - 2.1 ms: 9997
##################################################
...
2.2 - 2.3 ms: 1 #

> SUCCESS

best latency was 1.95 ms
worst latency was 2.21 ms, which is great.



################################################## ######################
### PCI MIDI out --> USB MIDI in
################################################## ######################



$ alsa-midi-latency-test -Rrw=5 -i20:0 -o16:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 2.03; 2.03
186; 2.04; 2.04
2726; 2.04; 2.04
9999; 1.99; 2.04
> done.

> latency distribution:
...
1.9 - 2.0 ms: 2 #
2.0 - 2.1 ms: 9998
##################################################

> SUCCESS

best latency was 1.92 ms
worst latency was 2.04 ms, which is great.



################################################## ######################
### USB MIDI out --> PCI MIDI in
################################################## ######################



$ alsa-midi-latency-test -Rrw=5 -i16:0 -o20:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
0; 1.14; 1.14
1; 1.93; 1.93
2; 1.99; 1.99
5; 2.00; 2.00
6; 2.00; 2.00
13; 2.01; 2.01
22; 2.03; 2.03
36; 2.03; 2.03
51; 2.03; 2.03
65; 2.03; 2.03
265; 2.04; 2.04
1160; 2.04; 2.04
2267; 2.07; 2.07
9999; 1.96; 2.07
> done.

> latency distribution:
...
1.1 - 1.2 ms: 1 #
...
1.9 - 2.0 ms: 31 #
2.0 - 2.1 ms: 9967
##################################################
2.1 - 2.2 ms: 1 #

> SUCCESS

best latency was 1.14 ms
worst latency was 2.07 ms, which is great.



$ cd /etc/init.d
$ ./rtirq status

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
388 FF 95 - 135 0.0 S< irq/8-rtc0
1119 FF 90 - 130 0.0 S< irq/21-ICE1712
1115 FF 89 - 129 0.0 S< irq/20-ICE1712
381 FF 85 - 125 0.0 S< irq/1-i8042
380 FF 84 - 124 0.0 S< irq/12-i8042
102 FF 50 - 90 0.0 S< irq/9-acpi
539 FF 50 - 90 0.0 S< irq/16-ohci_hcd
588 FF 50 - 90 0.0 S< irq/19-ehci_hcd
590 FF 50 - 90 0.0 S< irq/22-ahci
601 FF 50 - 90 0.0 S< irq/14-ide0
603 FF 50 - 90 0.0 S< irq/17-ohci_hcd
604 FF 50 - 90 0.0 S< irq/22-ohci1394
608 FF 50 - 90 0.0 S< irq/18-ohci_hcd
611 FF 50 - 90 0.0 S< irq/17-ohci_hcd
614 FF 50 - 90 0.0 S< irq/18-ohci_hcd
943 FF 50 - 90 0.0 S< irq/7-parport0
1670 FF 50 - 90 0.2 S< irq/18-nvidia
1984 FF 50 - 90 0.0 S< irq/26-eth0
4 FF 49 - 89 0.0 S< sirq-high/0
5 FF 49 - 89 0.0 S< sirq-timer/0
6 FF 49 - 89 0.0 S< sirq-net-tx/0
7 FF 49 - 89 0.0 S< sirq-net-rx/0
8 FF 49 - 89 0.0 S< sirq-block/0
9 FF 49 - 89 0.0 S< sirq-tasklet/0
10 FF 49 - 89 0.0 S< sirq-sched/0
11 FF 49 - 89 0.0 S< sirq-hrtimer/0
12 FF 49 - 89 0.0 S< sirq-rcu/0
18 FF 49 - 89 0.0 S< sirq-high/1
19 FF 49 - 89 0.0 S< sirq-timer/1
20 FF 49 - 89 0.0 S< sirq-net-tx/1
21 FF 49 - 89 0.0 S< sirq-net-rx/1
22 FF 49 - 89 0.0 S< sirq-block/1
23 FF 49 - 89 0.2 S< sirq-tasklet/1
24 FF 49 - 89 0.0 S< sirq-sched/1
25 FF 49 - 89 0.0 S< sirq-hrtimer/1
26 FF 49 - 89 0.0 S< sirq-rcu/1

- Ralf


>
>
> Regards,
> Clemens



_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Ralf Mardorf 07-14-2010 03:21 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 10:53 -0400, Paul Davis wrote:
> On Wed, Jul 14, 2010 at 9:52 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> > Is this connection through JACK or through ALSA, i.e., does it show up
> > in the output of "aconnect -l"? From what I understand, JACK's sample-
> > synchronous timing always adds latency, and might add period-related
> > jitter depending on the implementation.
>
> the good stuff adds 1 JACK period of latency to whatever the ALSA
> sequencer's direct delivery + the driver does, and zero jitter.
>
> --p

I'm able to confirm this.
If I play a virtual JACK MIDI instrument and a virtual ALSA MIDI
instrument, 'in unison' is 'in unison'.
I dunno if there is any measurable latency or jitter, but there's no
audible latency or audible jitter and no visible jitter for audio
recordings of those virtual instruments.

- Ralf

Offline now

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Ralf Mardorf 07-14-2010 03:21 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 10:53 -0400, Paul Davis wrote:
> On Wed, Jul 14, 2010 at 9:52 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> > Is this connection through JACK or through ALSA, i.e., does it show up
> > in the output of "aconnect -l"? From what I understand, JACK's sample-
> > synchronous timing always adds latency, and might add period-related
> > jitter depending on the implementation.
>
> the good stuff adds 1 JACK period of latency to whatever the ALSA
> sequencer's direct delivery + the driver does, and zero jitter.
>
> --p

I'm able to confirm this.
If I play a virtual JACK MIDI instrument and a virtual ALSA MIDI
instrument, 'in unison' is 'in unison'.
I dunno if there is any measurable latency or jitter, but there's no
audible latency or audible jitter and no visible jitter for audio
recordings of those virtual instruments.

- Ralf

Offline now

_______________________________________________
64studio-devel mailing list
64studio-devel@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-devel

Ralf Mardorf 07-14-2010 03:24 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 17:21 +0200, Ralf Mardorf wrote:
> On Wed, 2010-07-14 at 10:53 -0400, Paul Davis wrote:
> > On Wed, Jul 14, 2010 at 9:52 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> > > Is this connection through JACK or through ALSA, i.e., does it show up
> > > in the output of "aconnect -l"? From what I understand, JACK's sample-
> > > synchronous timing always adds latency, and might add period-related
> > > jitter depending on the implementation.
> >
> > the good stuff adds 1 JACK period of latency to whatever the ALSA
> > sequencer's direct delivery + the driver does, and zero jitter.
> >
> > --p
>
> I'm able to confirm this.
> If I play a virtual JACK MIDI instrument and a virtual ALSA MIDI
> instrument, 'in unison' is 'in unison'.
> I dunno if there is any measurable latency or jitter, but there's no
> audible latency or audible jitter and no visible jitter for audio
> recordings of those virtual instruments.
>
> - Ralf

PS: Not me playing, Qtractor is playing those instruments for me.

>
> Offline now

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Ralf Mardorf 07-14-2010 03:24 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 17:21 +0200, Ralf Mardorf wrote:
> On Wed, 2010-07-14 at 10:53 -0400, Paul Davis wrote:
> > On Wed, Jul 14, 2010 at 9:52 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> > > Is this connection through JACK or through ALSA, i.e., does it show up
> > > in the output of "aconnect -l"? From what I understand, JACK's sample-
> > > synchronous timing always adds latency, and might add period-related
> > > jitter depending on the implementation.
> >
> > the good stuff adds 1 JACK period of latency to whatever the ALSA
> > sequencer's direct delivery + the driver does, and zero jitter.
> >
> > --p
>
> I'm able to confirm this.
> If I play a virtual JACK MIDI instrument and a virtual ALSA MIDI
> instrument, 'in unison' is 'in unison'.
> I dunno if there is any measurable latency or jitter, but there's no
> audible latency or audible jitter and no visible jitter for audio
> recordings of those virtual instruments.
>
> - Ralf

PS: Not me playing, Qtractor is playing those instruments for me.

>
> Offline now

_______________________________________________
64studio-devel mailing list
64studio-devel@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-devel

Ralf Mardorf 07-14-2010 03:27 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 17:24 +0200, Ralf Mardorf wrote:
> On Wed, 2010-07-14 at 17:21 +0200, Ralf Mardorf wrote:
> > On Wed, 2010-07-14 at 10:53 -0400, Paul Davis wrote:
> > > On Wed, Jul 14, 2010 at 9:52 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> > > > Is this connection through JACK or through ALSA, i.e., does it show up
> > > > in the output of "aconnect -l"? From what I understand, JACK's sample-
> > > > synchronous timing always adds latency, and might add period-related
> > > > jitter depending on the implementation.
> > >
> > > the good stuff adds 1 JACK period of latency to whatever the ALSA

PPS:

A misunderstanding by me?

> > > sequencer's direct delivery + the driver does, and zero jitter.

Is there JACK MIDI for hw MIDI too, but only for virtual synth?

- Ralf

*Offline now*

_______________________________________________
64studio-devel mailing list
64studio-devel@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-devel

Ralf Mardorf 07-14-2010 03:27 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 17:24 +0200, Ralf Mardorf wrote:
> On Wed, 2010-07-14 at 17:21 +0200, Ralf Mardorf wrote:
> > On Wed, 2010-07-14 at 10:53 -0400, Paul Davis wrote:
> > > On Wed, Jul 14, 2010 at 9:52 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> > > > Is this connection through JACK or through ALSA, i.e., does it show up
> > > > in the output of "aconnect -l"? From what I understand, JACK's sample-
> > > > synchronous timing always adds latency, and might add period-related
> > > > jitter depending on the implementation.
> > >
> > > the good stuff adds 1 JACK period of latency to whatever the ALSA

PPS:

A misunderstanding by me?

> > > sequencer's direct delivery + the driver does, and zero jitter.

Is there JACK MIDI for hw MIDI too, but only for virtual synth?

- Ralf

*Offline now*

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users

Ralf Mardorf 07-14-2010 05:58 PM

ALSA MIDI latency test results are far away from reality
 
On Wed, 2010-07-14 at 17:30 +0200, Robin Gareus wrote:
> On 07/14/2010 04:22 PM, Ralf Mardorf wrote:
> > Hi Robin :)
> >
> > On Wed, 2010-07-14 at 15:44 +0200, Robin Gareus wrote:
> >> On 07/14/2010 03:23 PM, Ralf Mardorf wrote:
> >>> [..]
> >>> AND IT'S AUDIBLE THAT THERE IS MUCH MORE JITTER BUT 1.1 ms.
> >>>
> >>> Any hints how to solve this are welcome.
> >>
> >> Did you try to start jackd with -p64 instead of -p1024
> >
> > A good argument, because when I made tests in the past for the USB MIDI,
> > things become better at >= -p256 (when I had this Windows test install
> > latency for the EWX 24/96 audio was less high than for Linux). The
> > problem here is, that I need at least -p512 and even than I'm not safe
> > regarding to issues for JACK audio, that's why I used -p1024 instead of
> > -p512. For a test -p64 should work, but when recording music I would
> > need to increase it step by step until a minimum of -p512.
>
> I'm sorry; don't understand that. Are you getting [audio] x-runs or what
> is the problem using -p64 (or even -p32)?

Yes there are lapse, even if there should be no messages about xruns.

> I was hinting that the audible midi-jitter could be a result of
> midi-messages getting 'quantizied' to jack-periods.

It seems to be like that. Take a look at my email with the
subject:
Correlation of alsa -p value and hw
MIDI jitter

> A JACK-MIDI app which does not honor 'jack_midi_event_t->time' but
> simply processes all queued midi-events on each jack_process_callback()
> will result in the symptoms you describe (snare & kick on the same
> beat). One example of such an app is "a2j".

I did use Qtractor, but had the same issue when using Rosegarden a long
time ago. But we are talking about ALSA MIDI to the hardware
MIDInterface?!

> > IIRC when I did tests for the USB MIDI with -p64 or even -p125 (I'm not
> > sure) it theoretically did work, but this isn't a solution, because at
> > some point JACK audio will fail.
>
> How does it fail? x-runs?

All kinds of dropouts, even the left and right channel seem to get out
of phase. Just running FluidSynth DSSI playing a kick and a rim-shot was
without audible failure at -p16, but I'm sure I won't be able to do
multi-trach recording with -p16.

>
> JACKd works quite robust here with the UA25 and FA101 at 64fpp.
>
> >> using JACK-midi, I've encountered a similar issue with fluidsynth always
> >> synchronizing note-start/ends to jack cycles.
> >>
> >> Simply lowering the frames-per-period got me playing again so I did not
> >> check if it's related to JACK-midi or FluidSynth 1.1.1 in general.
> >
> > At least FluidSynth DSSI (host is Qtractor) is able to play in unison
> > with any DSSI or virtual ALSA MIDI and JACK MIDI (-Xseq) synth on my
> > machine. Just 'in unison' for virtual synth to hw synth there sometimes
> > is more delay, but just an early reflection like effect.
> >
> > Note! It was hard to groove when I connected the master keyboard to ALSA
> > hw MIDI in --> DIRECTLY TO --> ALSA hw MIDI out and this to a 100% ok
> > drum module. Directly connecting the master keyboard to the drum module
> > there were no issues.
>
> Aha, by this we can infer that your problem is ALSA or kernel/timing
> related.
>
> To verify this, take everything up from there (eg. qtractor, fluidsynth)
> out of the picture for now.
>
> 1) Use 'amidiplay' to send a some midi-song directly to your
> drum-module. -> Is there still audible jitter?

On a todo list, but there seems to be a correlation to JACK audio.

>
> 2) Do you have a Hardware MIDI Sequencer? Have it play a simple
> metronome beat and dump incoming MIDI-messages. See if the timestamps of
> each midi-note-on message are identically spaced.

C64 and Atari ST are stable, but there are some issues for e.g the
monitor. My VGA isn't slow enough for the Atari. I'll try to do it with
the broken SM124.

> 'aseqdump' (at least version 1.0.22 which I currently use) does not
> print timing-info, 'kmidimon' does.
>
> > I need to do something else now, but I take time off. From Friday
> > (perhaps earlier) until next Sunday noon I could spend the whole days
> > for this MIDI issue only.
> >
> > Resume:
> >
> > I assume that -p64 would solve this 'looooooong early reflection like
> > effect/async', but then hard disk recording will become impossible.
> >
> > The target is, that Linux at least replace the Atari ST as sequencer +
> > an analog 4-Track machine synced by SMPTE. With -p64 4-track recoding
> > would become impossible.
>
> I'm pretty sure that you can get a stable 64fpp setup, but one thing at
> a time. let's keep this thread to MIDI just now.

Thank you for your effort :).

>
> > 'Read you later' today or at the latest on Friday.
>
> enjoy a good long week-end.

Have a nice weekend too.
I'll spend the weekend for Linux audio.

>
> > Cheers!
> >
> > Ralf
>
> ciao,
> robin

Cheers!

Ralf

_______________________________________________
64studio-devel mailing list
64studio-devel@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-devel


All times are GMT. The time now is 10:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.