Hi Jakob + all
Just to let you know I have managed use alsa-midi-latency-test to test
the latency of PianoBooster which is very bad at the moment but here
are the results anyway: I know the timer tick is much to slow at the
moment so I fix that problem and retest. I have used the midi through
and a midi loop back cable to put alsa-midi-latency-test and
PianoBooster into the midi test loop. My results for comparison
without PianoBooster in the loop are pasted in at the end of this
email
Louis
==== RESULTS WITH PIANOBOOSTER =====
./alsa-midi-latency-test -i 14:0 -o 24:1 -R -w 1 -r
sched_setscheduler: Operation not permitted
set_realtime_priority(SCHED_FIFO, 99).. done.
clock resolution: 0.000000001 s
interval between measurements: 1.000 .. 2.000 ms
sampling 10000 midi latency values - please wait ...
press Ctrl+C to abort test
sample; latency_ms; latency_ms_worst
0; 14.39; 14.39
90; 19.98; 19.98
91; 23.72; 23.72
9999; 10.22; 23.72
done.
latency distribution:
...
4.2 - 4.3 ms: 1 #
4.3 - 4.4 ms: 1 #
4.4 - 4.5 ms: 2 #
4.5 - 4.6 ms: 1 #
...
5.2 - 5.3 ms: 2 #
5.3 - 5.4 ms: 3 #
5.4 - 5.5 ms: 1 #
5.5 - 5.6 ms: 2 #
5.6 - 5.7 ms: 2 #
5.7 - 5.8 ms: 2 #
...
5.9 - 6.0 ms: 3 #
6.0 - 6.1 ms: 1 #
6.1 - 6.2 ms: 2 #
6.2 - 6.3 ms: 7 #
6.3 - 6.4 ms: 3 #
6.4 - 6.5 ms: 9 #
6.5 - 6.6 ms: 1 #
6.6 - 6.7 ms: 11 #
6.7 - 6.8 ms: 7 #
6.8 - 6.9 ms: 8 #
6.9 - 7.0 ms: 11 #
7.0 - 7.1 ms: 7 #
7.1 - 7.2 ms: 9 #
7.2 - 7.3 ms: 11 #
7.3 - 7.4 ms: 15 #
7.4 - 7.5 ms: 8 #
7.5 - 7.6 ms: 12 #
7.6 - 7.7 ms: 9 #
7.7 - 7.8 ms: 9 #
7.8 - 7.9 ms: 20 #
7.9 - 8.0 ms: 19 #
8.0 - 8.1 ms: 27 ##
8.1 - 8.2 ms: 20 #
8.2 - 8.3 ms: 23 #
8.3 - 8.4 ms: 25 ##
8.4 - 8.5 ms: 28 ##
8.5 - 8.6 ms: 31 ##
8.6 - 8.7 ms: 47 ###
8.7 - 8.8 ms: 37 ##
8.8 - 8.9 ms: 40 ###
8.9 - 9.0 ms: 39 ##
9.0 - 9.1 ms: 49 ###
9.1 - 9.2 ms: 55 ####
9.2 - 9.3 ms: 81 #####
9.3 - 9.4 ms: 68 ####
9.4 - 9.5 ms: 114 #######
9.5 - 9.6 ms: 100 ######
9.6 - 9.7 ms: 128 ########
9.7 - 9.8 ms: 147 #########
9.8 - 9.9 ms: 238 ###############
9.9 - 10.0 ms: 351 ######################
10.0 - 10.1 ms: 492 ###############################
10.1 - 10.2 ms: 578 #####################################
10.2 - 10.3 ms: 681 ############################################
10.3 - 10.4 ms: 781 ##################################################
10.4 - 10.5 ms: 696 #############################################
10.5 - 10.6 ms: 710 #############################################
10.6 - 10.7 ms: 737 ###############################################
10.7 - 10.8 ms: 692 ############################################
10.8 - 10.9 ms: 567 ####################################
10.9 - 11.0 ms: 525 ##################################
11.0 - 11.1 ms: 322 #####################
11.1 - 11.2 ms: 201 #############
11.2 - 11.3 ms: 152 ##########
11.3 - 11.4 ms: 105 #######
11.4 - 11.5 ms: 82 #####
11.5 - 11.6 ms: 91 ######
11.6 - 11.7 ms: 87 ######
11.7 - 11.8 ms: 55 ####
11.8 - 11.9 ms: 41 ###
11.9 - 12.0 ms: 36 ##
12.0 - 12.1 ms: 34 ##
12.1 - 12.2 ms: 44 ###
12.2 - 12.3 ms: 48 ###
12.3 - 12.4 ms: 33 ##
12.4 - 12.5 ms: 35 ##
12.5 - 12.6 ms: 30 ##
12.6 - 12.7 ms: 31 ##
12.7 - 12.8 ms: 18 #
12.8 - 12.9 ms: 31 ##
12.9 - 13.0 ms: 23 #
13.0 - 13.1 ms: 22 #
13.1 - 13.2 ms: 17 #
13.2 - 13.3 ms: 12 #
13.3 - 13.4 ms: 11 #
13.4 - 13.5 ms: 11 #
13.5 - 13.6 ms: 9 #
13.6 - 13.7 ms: 17 #
13.7 - 13.8 ms: 7 #
13.8 - 13.9 ms: 10 #
13.9 - 14.0 ms: 8 #
14.0 - 14.1 ms: 7 #
14.1 - 14.2 ms: 7 #
14.2 - 14.3 ms: 11 #
...
14.4 - 14.5 ms: 6 #
14.5 - 14.6 ms: 6 #
14.6 - 14.7 ms: 3 #
14.7 - 14.8 ms: 1 #
...
14.9 - 15.0 ms: 4 #
...
15.1 - 15.2 ms: 2 #
15.2 - 15.3 ms: 1 #
...
15.4 - 15.5 ms: 5 #
15.5 - 15.6 ms: 2 #
15.6 - 15.7 ms: 1 #
15.7 - 15.8 ms: 2 #
15.8 - 15.9 ms: 3 #
...
16.3 - 16.4 ms: 1 #
...
16.5 - 16.6 ms: 1 #
16.6 - 16.7 ms: 1 #
...
18.9 - 19.0 ms: 1 #
...
19.3 - 19.4 ms: 1 #
...
19.5 - 19.6 ms: 1 #
...
20.0 - 20.1 ms: 1 #
20.1 - 20.2 ms: 1 #
...
23.0 - 23.1 ms: 1 #
...
23.7 - 23.8 ms: 1 #
FAIL
best latency was 4.18 ms
worst latency was 23.72 ms, which is too much. Please check:
- if your hardware uses shared IRQs - `watch -n 1 cat /proc/interrupts`
while running this test to see, which IRQs the OS is using for
your midi hardware,
- if you're running this test on a realtime OS - `uname -a` should
contain '-rt',
- your OS' scheduling priorities - `chrt -p [pidof process name|IRQ-?]`.
Have a look at
http://www.linuxaudio.org/mailarchive/lat/
to find out, howto fix issues with high midi latencies.
==== RESULTS WITHOUT PIANOBOOSTER =====
./alsa-midi-latency-test -o 24:0 -i 24:0 -R -w 1 -r
sched_setscheduler: Operation not permitted
set_realtime_priority(SCHED_FIFO, 99).. done.
clock resolution: 0.000000001 s
interval between measurements: 1.000 .. 2.000 ms
sampling 10000 midi latency values - please wait ...
press Ctrl+C to abort test
sample; latency_ms; latency_ms_worst
0; 3.69; 3.69
1; 3.80; 3.80
5; 4.82; 4.82
107; 6.17; 6.17
238; 6.30; 6.30
496; 6.52; 6.52
4712; 6.79; 6.79
8429; 6.82; 6.82
9999; 3.74; 6.82
done.
latency distribution:
...
3.0 - 3.1 ms: 12 #
3.1 - 3.2 ms: 921 #############################################
3.2 - 3.3 ms: 961 ###############################################
3.3 - 3.4 ms: 969 ###############################################
3.4 - 3.5 ms: 994 #################################################
3.5 - 3.6 ms: 948 ##############################################
3.6 - 3.7 ms: 944 ##############################################
3.7 - 3.8 ms: 944 ##############################################
3.8 - 3.9 ms: 1022 ##################################################
3.9 - 4.0 ms: 981 ################################################
4.0 - 4.1 ms: 966 ###############################################
4.1 - 4.2 ms: 137 #######
4.2 - 4.3 ms: 22 #
4.3 - 4.4 ms: 18 #
4.4 - 4.5 ms: 22 #
4.5 - 4.6 ms: 14 #
4.6 - 4.7 ms: 10 #
4.7 - 4.8 ms: 11 #
4.8 - 4.9 ms: 16 #
4.9 - 5.0 ms: 7 #
5.0 - 5.1 ms: 9 #
5.1 - 5.2 ms: 14 #
5.2 - 5.3 ms: 9 #
5.3 - 5.4 ms: 3 #
5.4 - 5.5 ms: 7 #
5.5 - 5.6 ms: 5 #
5.6 - 5.7 ms: 4 #
5.7 - 5.8 ms: 4 #
5.8 - 5.9 ms: 6 #
5.9 - 6.0 ms: 3 #
...
6.1 - 6.2 ms: 2 #
6.2 - 6.3 ms: 7 #
6.3 - 6.4 ms: 2 #
...
6.5 - 6.6 ms: 1 #
...
6.7 - 6.8 ms: 3 #
6.8 - 6.9 ms: 2 #
FAIL
best latency was 3.04 ms
worst latency was 6.82 ms, which is too much. Please check: