FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 12-29-2009, 05:49 PM
geoff
 
Default MIDI timing

Hi there,

I seem to have a jitter issue with external MIDI timing.

The hardware:

Gigabyte GA-M51GM-S2G F16A , Athlon X2 4600+, 4Gb memory
RME HDSP multiface
Midiman 8x8 on USB extender.

Installed 64Studio 3.0b3. Everything worked fine, except external
MIDI, which was very jittery, unable to play straight 4's at 120bpm
acceptably.

Installed 64Studio 2.1 for comparison, Still sounded bad, though not
as bad as 3.0b3.

Removed cheap USB extender, which improved the jitter a lot.

Back to 3.0b3, ran a Rosegarden loopback recoding of sixteenth notes
at 120bpm. Squinting at the matrix editor, appears to be a 0-30mS
jitter.

Adjusted interrupt priority with rtirq, didn't seem to make much
difference.

Found http://github.com/koppi/alsa-midi-latency-test
installed dependencies, compiled and ran.

The benchmarks that come with a-m-l-t of a Midiman 2x2 show a maximum
of 5mS delay, other details unspecified.

But I get

gigo@newsound:~$ alsa-midi-latency-test -s 40 -i 24:0 -o 24:0 -R -S
100
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s

> sampling 100 midi latency values - please wait ...
> press Ctrl+C to abort test
> skipping first 40 latency samples

sample; latency_ms; latency_ms_worst
40; 29.99; 29.99
41; 33.96; 33.96
43; 33.98; 33.98
46; 33.99; 33.99
52; 33.99; 33.99
86; 33.99; 33.99
99; 29.99; 33.99
> done.

> latency distribution:
...
30.0 - 30.1 ms: 20
################################################
...
32.0 - 32.1 ms: 21
##################################################
...
34.0 - 34.1 ms: 19
#############################################

> FAIL

best latency was 29.97 ms
worst latency was 33.99 ms, which is too much. Please check:
[...]
gigo@newsound:~$ cat /proc/interrupts
CPU0 CPU1
0: 127 0 IO-APIC-edge timer
1: 0 10 IO-APIC-edge i8042
3: 0 2 IO-APIC-edge
4: 0 1 IO-APIC-edge
6: 0 5 IO-APIC-edge floppy
7: 1 0 IO-APIC-edge parport0
8: 0 0 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 1 130 IO-APIC-edge i8042
14: 0 0 IO-APIC-edge ide0
15: 6 4569 IO-APIC-edge ide1
16: 4 3122 IO-APIC-fasteoi ehci_hcd:usb2,
ohci_hcd:usb4, ohci_hcd:usb5
17: 0 0 IO-APIC-fasteoi hdsp
18: 1 168 IO-APIC-fasteoi firewire_ohci
20: 40 1083614 IO-APIC-fasteoi eth0
21: 0 0 IO-APIC-fasteoi sata_nv
22: 17 10839 IO-APIC-fasteoi sata_nv
23: 0 0 IO-APIC-fasteoi ehci_hcd:usb1,
ohci_hcd:usb3
NMI: 0 0 Non-maskable interrupts
LOC: 171027 245063 Local timer interrupts
CNT: 0 0 Performance counter interrupts
RES: 485957 20500 Rescheduling interrupts
CAL: 51 37 Function call interrupts
TLB: 1000 1073 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
SPU: 0 0 Spurious interrupts
ERR: 1
MIS: 0

gigo@newsound:~$ sudo /etc/init.d/rtirq status

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
458 FF 90 - 130 0.0 S< IRQ-8
692 FF 85 - 125 0.0 S< IRQ-16
991 FF 80 - 120 0.0 S< IRQ-17
683 FF 75 - 115 0.0 S< IRQ-23
450 FF 70 - 110 0.0 S< IRQ-1
449 FF 69 - 109 0.0 S< IRQ-12
104 FF 50 - 90 0.0 S< IRQ-9
716 FF 50 - 90 0.0 S< IRQ-7
1241 FF 50 - 90 0.0 S< IRQ-14
1242 FF 50 - 90 0.0 S< IRQ-15
1272 FF 50 - 90 0.0 S< IRQ-22
1301 FF 50 - 90 0.0 S< IRQ-21
1317 FF 50 - 90 0.0 S< IRQ-6
1328 FF 50 - 90 0.0 S< IRQ-18
4642 FF 50 - 90 0.0 S< IRQ-4
4644 FF 50 - 90 0.0 S< IRQ-3
4657 FF 50 - 90 0.1 S< IRQ-20

gigo@newsound:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 003 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002
Bus 005 Device 001: ID 1d6b:0001
Bus 004 Device 004: ID 0763:1033 Midiman
Bus 004 Device 001: ID 1d6b:0001

I tried the archives of linux-audio-tuning, as recommended by the
author of alsa-midi-latency-test, but turned up nothing useful.

Just for jolly, I tested the HDSP MIDI interface, and got a max delay
of 1.12mS. Nice, but one MIDI cable isn't enough.

So, I'm looking for ideas for ideas to improve the USB interface
situation.

Also, any rumours of USB extenders with short (microsecond) delay
would be interesting. The cheap one I used seemed to produce jittery
delays up to 250mS sometimes, and appeared as a USB hub with an NEC
chipset on lsusb.


_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 12-30-2009, 08:35 PM
Ralf Mardorf
 
Default MIDI timing

Hi

your mail is the only mail I'm able to read today, resp. I even have no
time to read your mail, but I'm to curious to delay reading it .
I don't have latency issues, but jitter. 1/4 @ 120 BPM = 500 ms, 1000
ms, 1500 ms, 2000 ms etc. ... Cubase = Windows XP, the others are timers
used as sequencer timer source for Qtractor on 64 Studio 3.0-beta3:

||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

More information about this will follow next year.


> Gigabyte GA-M51GM-S2G F16A , Athlon X2 4600+, 4Gb memory
> RME HDSP multiface
> Midiman 8x8 on USB extender.
>

I'm missing one information. Does your graphics use the main memory for
frame buffer or has the graphics it's own memory?
I'm using an on-board graphics, thus it needs to access the main memory,
because it doesn't have it's own memory.
Purely hypothetical: Using the same RAM for Linux and the graphics might
cause unwanted interrupts and timing issues. After a short search in the
www I guess you are using a graphics with it's own memory.

I reckon your BIOS is upgraded?!

The computer I'm using has got a CPU model "AMD Athlon(tm) X2 Dual Core
Processor BE-2350", socket AM2. The MIDI interface is an Swissonic USB,
a very cheap one.

Again, more information next year.

I'm not able to use my external MIDI equipment with the PC. Using the
Atari ST or Commodore 64 there were no problems.

Cheers,
Ralf

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 12-30-2009, 08:52 PM
Ralf Mardorf
 
Default MIDI timing

geoff wrote:
> Just for jolly, I tested the HDSP MIDI interface, and got a max delay
> of 1.12mS. Nice, but one MIDI cable isn't enough.

It isn't enough if you like to send a lot of data real-time, e.g. SysEx
to control filters. It also isn't enough if some of your old synth only
receive in omni mode, but it's enough for many productions, if you'll
use a MIDI thru box, instead of connecting several receivers by a MIDI
thru chain. I Would be happy, if I would have one interface with such
low "latency" = ? jitter ?. Respectively, does this mean jitter +/- 1.12
= 2.24 ms?

Perhaps you'll be able to use some of your equipment, when connecting a
MIDI thru box.

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 12-31-2009, 12:52 PM
geoff
 
Default MIDI timing

On Wed, 30 Dec 2009 22:35:55 +0100, Ralf Mardorf
<ralf.mardorf@alice-dsl.net> wrote:
<snip>
>I don't have latency issues, but jitter
<snip>
>
> ||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

I'd currently be pleased to get figures like that.

>
>I'm missing one information. Does your graphics use the main memory for
>frame buffer or has the graphics it's own memory?

02:00.0 VGA compatible controller: nVidia Corporation NV44 [GeForce
6200 LE] (rev a1)

Mobo controller disabled.

X11 nv driver.

Best,
Geoff


_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 01-05-2010, 03:55 PM
geoff
 
Default MIDI timing

On Tue, 29 Dec 2009 18:49:16 +0000, geoff <ot0006@0x29a.org.uk> wrote:

>Hi there,
>
>I seem to have a jitter issue with external MIDI timing.

Still stuck at ~30mS jitter.

Booted with "hpet=force", and the kernel (and thus ALSA) found an
HPET, but the timing stayed the same.

At Ralf's suggestion, I ran up Win XP Home SP2, installed the latest
MidiSport drivers, installed MIDI-OX and ran a loopback test.

This relies on the accuracy of the MIDI-OX timestamping, but I seemed
to be getting a consistent 5mS round trip from the USB interface.

Which seems to indicate there's a software level incompatibility with
USB MIDI (or at least, MidiSport USB MIDI) and 3.0b3.

I'm looking for suggestions to ameliorate this situation.

I'd also like to know whether it's worth me putting this on the 3.0b3
bug list.

And can anyone describe their measured low-jitter external MIDI setup
with at least 4 ports, please? (where low is < 10mS)

Studio64 version:
Motherboard:
MIDI interface:
Number of ports:

Best,
Geoff

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 01-06-2010, 03:27 AM
Gustin Johnson
 
Default MIDI timing

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

geoff wrote:
> On Tue, 29 Dec 2009 18:49:16 +0000, geoff <ot0006@0x29a.org.uk> wrote:
>
>> Hi there,
>>
>> I seem to have a jitter issue with external MIDI timing.
>
> Still stuck at ~30mS jitter.
>
> Booted with "hpet=force", and the kernel (and thus ALSA) found an
> HPET, but the timing stayed the same.
>
> At Ralf's suggestion, I ran up Win XP Home SP2, installed the latest
> MidiSport drivers, installed MIDI-OX and ran a loopback test.
>
> This relies on the accuracy of the MIDI-OX timestamping, but I seemed
> to be getting a consistent 5mS round trip from the USB interface.
>
> Which seems to indicate there's a software level incompatibility with
> USB MIDI (or at least, MidiSport USB MIDI) and 3.0b3.
>
> I'm looking for suggestions to ameliorate this situation.
>
something like
http://www.philrees.co.uk/products/thruunit.htm#v4
or
http://www.philrees.co.uk/products/thruunit.htm#v8

I have never needed or used these sorts of things, but it may be useful
for you.

> I'd also like to know whether it's worth me putting this on the 3.0b3
> bug list.

If you can fill out a useful bug report then go for it.
>
> And can anyone describe their measured low-jitter external MIDI setup
> with at least 4 ports, please? (where low is < 10mS)
>
I have a total of 3 midi devices (a keyboard, BCF2000, and a synth).
I use the 2 ports on my Hammerfall. I also have a midisport 2x2 that I
have not used for years. If I get some time over the next couple of
days I will run that midi test.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAktEETQACgkQwRXgH3rKGfMW/gCgjD1X/9+3na6tRRG8qdkxNJux
v1gAnj4vWqOpYi5IwlR50eisLnugibiP
=hKvu
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 01-06-2010, 02:58 PM
geoff
 
Default MIDI timing

On Tue, 05 Jan 2010 21:27:32 -0700, Gustin Johnson
<gustin@echostar.ca> wrote:
<snip>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>geoff wrote:
>> On Tue, 29 Dec 2009 18:49:16 +0000, geoff <ot0006@0x29a.org.uk> wrote:
>>
>>> Hi there,
>>>
>>> I seem to have a jitter issue with external MIDI timing.
>>
>> Still stuck at ~30mS jitter.
>>
>> Booted with "hpet=force", and the kernel (and thus ALSA) found an
>> HPET, but the timing stayed the same.
>>
>> At Ralf's suggestion, I ran up Win XP Home SP2, installed the latest
>> MidiSport drivers, installed MIDI-OX and ran a loopback test.
>>
>> This relies on the accuracy of the MIDI-OX timestamping, but I seemed
>> to be getting a consistent 5mS round trip from the USB interface.
>>
>> Which seems to indicate there's a software level incompatibility with
>> USB MIDI (or at least, MidiSport USB MIDI) and 3.0b3.
>>
>> I'm looking for suggestions to ameliorate this situation.
>>
>something like
>http://www.philrees.co.uk/products/thruunit.htm#v4
>or
>http://www.philrees.co.uk/products/thruunit.htm#v8
>
>I have never needed or used these sorts of things, but it may be useful
>for you.

Thanks for the suggestion.

I had a configuration similar to that in the early 90s. To prevent the
"drummer" sounding increasingly drunk as more (high controller
density) parts were added to the piece, I replaced it with a Unitor 8,
an eight port MIDI interface of the period.

It doesn't take much stacking on a single MIDI cable to bring that
inebriation about, imho. Plus, you need a switch box for patch
editing, which is a pita.

<snip>
>>
>> And can anyone describe their measured low-jitter external MIDI setup
>> with at least 4 ports, please? (where low is < 10mS)
>>
>I have a total of 3 midi devices (a keyboard, BCF2000, and a synth).
>I use the 2 ports on my Hammerfall. I also have a midisport 2x2 that I
>have not used for years. If I get some time over the next couple of
>days I will run that midi test.

Thanks for considering this.

_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 01-10-2010, 02:02 PM
Ralf Mardorf
 
Default MIDI timing

geoff wrote:
> On Tue, 05 Jan 2010 21:27:32 -0700, Gustin Johnson
> <gustin@echostar.ca> wrote:
> <snip>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> geoff wrote:
>>
>>> On Tue, 29 Dec 2009 18:49:16 +0000, geoff <ot0006@0x29a.org.uk> wrote:
>>>
>>>
>>>> Hi there,
>>>>
>>>> I seem to have a jitter issue with external MIDI timing.
>>>>
>>> Still stuck at ~30mS jitter.
>>>
>>> Booted with "hpet=force", and the kernel (and thus ALSA) found an
>>> HPET, but the timing stayed the same.
>>>
>>> At Ralf's suggestion, I ran up Win XP Home SP2, installed the latest
>>> MidiSport drivers, installed MIDI-OX and ran a loopback test.
>>>
>>> This relies on the accuracy of the MIDI-OX timestamping, but I seemed
>>> to be getting a consistent 5mS round trip from the USB interface.
>>>
>>> Which seems to indicate there's a software level incompatibility with
>>> USB MIDI (or at least, MidiSport USB MIDI) and 3.0b3.
>>>
>>> I'm looking for suggestions to ameliorate this situation.
>>>
>>>
>> something like
>> http://www.philrees.co.uk/products/thruunit.htm#v4
>> or
>> http://www.philrees.co.uk/products/thruunit.htm#v8
>>
>> I have never needed or used these sorts of things, but it may be useful
>> for you.
>>
>
> Thanks for the suggestion.
>
> I had a configuration similar to that in the early 90s. To prevent the
> "drummer" sounding increasingly drunk as more (high controller
> density) parts were added to the piece, I replaced it with a Unitor 8,
> an eight port MIDI interface of the period.
>
> It doesn't take much stacking on a single MIDI cable to bring that
> inebriation about, imho. Plus, you need a switch box for patch
> editing, which is a pita.
>
> <snip>
>

Any way, if you should decide to buy such a MIDI thru box, keep in mind,
that it's easy to build one yourself, if you should be able to solder.

>>> And can anyone describe their measured low-jitter external MIDI setup
>>> with at least 4 ports, please? (where low is < 10mS)
>>>
>>>
>> I have a total of 3 midi devices (a keyboard, BCF2000, and a synth).
>> I use the 2 ports on my Hammerfall. I also have a midisport 2x2 that I
>> have not used for years. If I get some time over the next couple of
>> days I will run that midi test.
>>
>
> Thanks for considering this.

Cheers,
Ralf
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 01-10-2010, 02:02 PM
Ralf Mardorf
 
Default MIDI timing

geoff wrote:
> On Tue, 05 Jan 2010 21:27:32 -0700, Gustin Johnson
> <gustin@echostar.ca> wrote:
> <snip>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> geoff wrote:
>>
>>> On Tue, 29 Dec 2009 18:49:16 +0000, geoff <ot0006@0x29a.org.uk> wrote:
>>>
>>>
>>>> Hi there,
>>>>
>>>> I seem to have a jitter issue with external MIDI timing.
>>>>
>>> Still stuck at ~30mS jitter.
>>>
>>> Booted with "hpet=force", and the kernel (and thus ALSA) found an
>>> HPET, but the timing stayed the same.
>>>
>>> At Ralf's suggestion, I ran up Win XP Home SP2, installed the latest
>>> MidiSport drivers, installed MIDI-OX and ran a loopback test.
>>>
>>> This relies on the accuracy of the MIDI-OX timestamping, but I seemed
>>> to be getting a consistent 5mS round trip from the USB interface.
>>>
>>> Which seems to indicate there's a software level incompatibility with
>>> USB MIDI (or at least, MidiSport USB MIDI) and 3.0b3.
>>>
>>> I'm looking for suggestions to ameliorate this situation.
>>>
>>>
>> something like
>> http://www.philrees.co.uk/products/thruunit.htm#v4
>> or
>> http://www.philrees.co.uk/products/thruunit.htm#v8
>>
>> I have never needed or used these sorts of things, but it may be useful
>> for you.
>>
>
> Thanks for the suggestion.
>
> I had a configuration similar to that in the early 90s. To prevent the
> "drummer" sounding increasingly drunk as more (high controller
> density) parts were added to the piece, I replaced it with a Unitor 8,
> an eight port MIDI interface of the period.
>
> It doesn't take much stacking on a single MIDI cable to bring that
> inebriation about, imho. Plus, you need a switch box for patch
> editing, which is a pita.
>
> <snip>
>

Any way, if you should decide to buy such a MIDI thru box, keep in mind,
that it's easy to build one yourself, if you should be able to solder.

>>> And can anyone describe their measured low-jitter external MIDI setup
>>> with at least 4 ports, please? (where low is < 10mS)
>>>
>>>
>> I have a total of 3 midi devices (a keyboard, BCF2000, and a synth).
>> I use the 2 ports on my Hammerfall. I also have a midisport 2x2 that I
>> have not used for years. If I get some time over the next couple of
>> days I will run that midi test.
>>
>
> Thanks for considering this.

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

Thread Tools




All times are GMT. The time now is 01:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org