Regular it shifted between 2395 and 2404, but with a few exceptions, one
time 2302, three times 2304, two times 2305 and two time 2494. See
attachment.
What might cause this exceptions? Could it be access to the RAM by the
graphics? Is there something bad because of the IRQs?
Regular shift 2404 - 2395 = 9 frames of jitter, exceptional maximal
shift 2494 - 2302 = 192 frames of jitter.
I guess this does mean ...
5.3 ms / 512 frames = 0.010351562 ms/frame
Maximal difference for regular jitter 0.093164062 ms.
Maximal difference for exceptional jitter 1.9875 ms.
... am I wrong?
When I once tested it by recording I got this result for ALSA MIDI on
Linux, Cubase runs on Windows on the same machine:
||Cubase|HR tmr|System|PCM pl|PCM ca
------++------+------+------+------+------
500.0 || 493.0| 504.9| 505.6| 503.4| 503.2
1000.0|| 993.4|1005.4|1005.8|1005.3|1006.4
1500.0||1494.5|1503.6|1506.4|1507.4|1507.3
2000.0||1994.8|2003.8|2007.2|2007.9|2009.5
2500.0||2492.4|2504.1|2504.3|2503.6|2503.2
3000.0||2992.9|3006.0|3006.2|3005.9|3007.6
3500.0||3493.7|3502.7|3505.4|3506.5|3509.5
4000.0||3994.6|4003.1|4003.2|4008.8|4009.9
msec +/- 0.1 msec
maxDif|| 4.8| 6.0| 7.2| 8.8| 9.9
minDif|| -2.4| -2.7| -3.2| -3.4| -3.2
--------------+------+------+------+------
Jitter|| 2.4| 3.3| 4.0| 5.4| 6.7
msec +/- 0.2 msec
It's impossible to make music using external MIDI equipment and ALSA
MIDI on my machine and for Windows it isn't really much better. While
the test using Fons apps resulted with 1.9875 ms (if I understand it
correctly) for JACK MIDI, my tests resulted with 4.0 ms for the system
timer using ALSA MIDI.
If you play one drum sound after the other using hardware MIDI and you
record one sound after the other to audio tracks, than jitter needs to
be less 2 ms. I don't know how much under 2 ms, but more than 2 ms is
audible and sounds horrible.
spinymouse-sudo@64studio:~$ hwinfo | grep irq
[snip]
irq:1 0 ( 133) "timer"
irq:0 1 ( 7480) "i8042"
irq:1 4 ( 3) "serial"
irq:1 7 ( 0) "parport0"
irq:0 8 ( 1) "rtc0"
irq:0 9 ( 0) "acpi"
irq:0 12 ( 300250) "i8042"
irq:1 14 ( 28748) "ide0"
irq:0 16 ( 1) "ohci_hcd:usb1"
irq:0 17 ( 12747) "ohci_hcd:usb2" "ohci_hcd:usb5"
irq:0 18 ( 2) "ohci_hcd:usb4" "ohci_hcd:usb6"
"radeon@pci:0000:01:05.0"
irq:0 19 ( 2) "ehci_hcd:usb3"
irq:0 21 ( 246087) "ICE1712"
irq:0 22 ( 23094) "ahci" "firewire_ohci"
irq:0 25 ( 1925) "eth0"
used irqs: 0,1,4,7,8,9,12,14,16,17,18,19,21,22,24,25
spinymouse-sudo@64studio:~$ uname -a
Linux 64studio 2.6.31.12-rt20 #1 SMP PREEMPT RT Sun Feb 7 13:55:55 CET 2010 x86_64
GNU/Linux
spinymouse-sudo@64studio:~$ cpufreq-selector -g performance
spinymouse-sudo@64studio:~$ jackd -Rdalsa -dhw:0 -r96000 -p512 -n2 -Xseq
jackdmp 1.9.3
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2009 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
creating alsa driver ... hw:0|hw:0|512|2|96000|0|0|nomon|swmeter|-|32bit
Using ALSA driver ICE1712 running on card 0 - TerraTec EWX24/96 at 0xcf00, irq 21
configuring for 96000Hz, period = 512 frames (5.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback
port created: Midi-Through:midi/playback_1
port created: Midi-Through:midi/capture_1
port created: TerraTec-EWX24/96:midi/playback_1
port created: TerraTec-EWX24/96:midi/capture_1
port created: USB-Device-0x170b:0x11:midi/playback_1
port created: USB-Device-0x170b:0x11:midi/capture_1
######################################################################
spinymouse-sudo@64studio:~$ cat /usr/src/jack_midi_test/jack_send.cc
[snip]
// This list of note on/off events is sent
// in an endless loop, one item every DELTA
// audio frames, on channel CHANNEL.
//
Note Notes [NNOTES] =
{
{ 0x90, 48, 100 },
{ 0x80, 48, 0 },
{ 0x90, 50, 100 },
{ 0x80, 50, 0 },
{ 0x90, 52, 100 },
{ 0x80, 52, 0 },
{ 0x90, 53, 100 },
{ 0x80, 53, 0 },
{ 0x90, 55, 100 },
{ 0x80, 55, 0 },
{ 0x90, 57, 100 },
{ 0x80, 57, 0 },
{ 0x90, 59, 100 },
{ 0x80, 59, 0 },
{ 0x90, 60, 100 },
{ 0x80, 60, 0 }
};
[snip]
spinymouse-sudo@64studio:~$ qjackctl
######################################################################
spinymouse-sudo@64studio:~$ /usr/src/jack_midi_test/jack_recv
######################################################################
spinymouse-sudo@64studio:~$ /usr/src/jack_midi_test/jack_send
######################################################################
Connected:
jack_send out --> system midi_playback_3
system midi_capture_3 --> jack_recv in
Results:
2400
2400
2401
2401
2400
2401
2399
2399
2400
2400
2399
2402
2400
2400
2400
2400
2400
2401
2398
2401
2400
2401
2400
2402
2399
2400
2399
2401
2400
2402
2400
2402
2396
2402
2399
2400
2401
2399
2402
2399
2400
2400
2399
2400
2401
2401
2399
2401
2399
2401
2400
2399
2401
2400
2400
2400
2401
2399
2400
2400
2400
2401
2400
2399
2402
2400
2400
2401
2401
2400
2399
2400
2400
2400
2402
2304
2494
2401
2400
2400
2398
2404
2398
2402
2399
2400
2400
2403
2398
2398
2402
2400
2401
2401
2400
2401
2399
2400
2400
2401
2401
2399
2399
2400
2401
2400
2401
2401
2401
2398
2400
2400
2400
2402
2400
2400
2398
2400
2401
2402
2401
2397
2400
2400
2400
2401
2402
2400
2399
2399
2401
2399
2402
2399
2400
2399
2401
2401
2398
2401
2401
2399
2400
2400
2400
2401
2401
2398
2401
2400
2401
2401
2401
2400
2399
2399
2400
2401
2400
2398
2401
2401
2399
2400
2401
2400
2402
2398
2400
2400
2400
2400
2402
2398
2401
2400
2402
2399
2399
2402
2399
2400
2400
2399
2403
2400
2399
2401
2401
2400
2401
2400
2398
2401
2400
2400
2402
2399
2400
2399
2401
2400
2401
2402
2398
2400
2400
2401
2400
2400
2401
2399
2400
2400
2400
2402
2399
2399
2400
2400
2400
2402
2400
2400
2400
2399
2400
2400
2402
2399
2399
2400
2401
2400
2400
2402
2399
2400
2400
2400
2402
2399
2401
2400
2399
2399
2400
2399
2403
2400
2399
2400
2400
2400
2401
2398
2403
2398
2401
2399
2402
2400
2401
2399
2399
2401
2400
2399
2402
2399
2399
2401
2401
2399
2402
2400
2399
2400
2400
2399
2401
2403
2398
2400
2400
2398
2404
2398
2401
2400
2400
2401
2400
2400
2401
2398
2399
2401
2400
2402
2402
2397
2401
2400
2400
2401
2400
2401
2398
2401
2400
2399
2402
2402
2400
2397
2402
2399
2402
2399
2400
2399
2401
2402
2399
2399
2399
2399
2402
2400
2402
2398
2402
2399
2401
2399
2400
2400
2403
2399
2399
2403
2302
2492
2309
2498
2399
2398
2304
2498
2401
2399
2399
2400
2401
2400
2401
2402
2397
2399
2305
2400
2402
2495
2399
2400
2304
2401
2400
2402
2494
2305
2400
2399
2401
2497
2302
2401
2400
2400
2400
2402
2401
2398
2401
2399
2400
2401
2402
2396
2403
2400
2400
2400
2401
2401
2398
2401
2400
2400
2402
2399
2402
2397
2401
2400
2401
2401
2399
2400
2400
2399
2401
2401
2401
2398
2401
2400
2400
2401
2402
2402
2396
2400
2400
2400
2403
2398
2400
2399
2402
2399
2402
2400
2399
2400
2399
2401
2401
2402
2398
2399
2400
2400
2401
2401
2400
2400
2399
2400
2400
2402
2401
2403
2395
2400
2400
2400
2400
2400
2400
2399
2401
2400
2400
2400
2402
2399
2399
2400
2401
2400
2399
2403
2399
2399
2400
2399
2403
2401
2397
2402
2399
2401
2400
2399
2404
2397
2401
2399
2402
2400
2402
2396
2402
2399
2400
2401
^C
spinymouse-sudo@64studio:~$