[LAU] midi triggering delay

andy baxter andy at earthsong.free-online.co.uk
Sat Sep 12 05:19:18 EDT 2009


I've been asking for help on the linux-audio-user list with a midi 
timing problem and had many helpful suggestions but still not managed to 
solve the problem, so I am cross-posting to alsa-user.

I've been trying for a week or two to get my roland edirol PCR keyboard 
working with my good laptop, which is a thinkpad X61s (dual core 1400 
MHz). There is a problem with midi timing - when I play notes on the 
keyboard into fluidsynth, the notes are slightly delayed. The delay is 
small (around 0.1s ?) but enough to be annoying. On my old laptop (a 
dell 1400 Mhz single core), it works fine. I am using the keyboard 
through its built in usb midi interface. I am running debian testing, 
but have also tried ubuntu jaunty, which has the same problem.

The things I have tried so far (with no luck) are:
- compiling different -rt kernels. So far none of these has made a 
difference, including when I just copied the kernel and modules from my 
old laptop (which is running ubuntu hardy) across to the new one.
- setting realtime priorities for all the processes and interrupts 
involved in the audio/midi chain. (according to instructions on this 
page: http://tapas.affenbande.org/wordpress/?page_id=40 )
- running fluidsynth without jackd. (straight to alsa).
- setting the fluidsynth sample rate and other parameters to the same as 
jackd.
- using another synth. (zynaddsubfx)
- running the system with no X server or ethernet.
- swapping the usb-midi lead from the keyboard to a different usb port.
- someone suggested using 'modprobe snd-usb-audio nrpacks=1'.

None of these have cured the problem. All I can think of doing now is to 
move back to my old laptop for midi stuff (which is a hassle and also 
annoying because I bought the new one partly because I thought it would 
be good for music), or to try some other hardware solution, like running 
the keyboard from a power supply and using a midi cable with a seperate 
usb midi card.

Before I do this, it would be good to know if anyone on alsa-user has 
any suggestions?

Thanks,

andy baxter.

andy baxter wrote:

> Hi all,
>
> I'm trying to get my usb midi keyboard (an edirol PCR 800) working with 
> my good laptop (a 1400 MHz core 2 thinkpad X61s). I have jackd running 
> with 8 msec latency and no xruns using an onboard intel HDA sound card. 
> When I hook up qsynth (fluidsynth) to the keyboard's alsa midi output, 
> the notes are triggered with a slight (<0.1s?), and variable time delay. 
> Sometimes the note plays immediately on pressing the key; sometimes 
> there is a noticeable delay. This does not happen when I use the same 
> setup on my old laptop (a 1400 Mhz single core dell).
>
> The OS is debian testing at the moment, but I have had the same problem 
> on this laptop with both ubuntu jaunty and a fairly recent version of 
> linux mint.
>
> Does anyone have any idea what might be happening, or what I can do to 
> narrow down the cause of the problem a bit further?
>
> My /proc/interrupts, lsusb, and lspci are pasted below.
>
> Cheers,
>
> andy baxter
>
> andy at monkey:~$ cat /proc/interrupts
>            CPU0       CPU1      
>   0:    1207873    1669765   IO-APIC-edge      timer
>   1:       2473       1983   IO-APIC-edge      i8042
>   8:          1          0   IO-APIC-edge      rtc0
>   9:      19517      11123   IO-APIC-fasteoi   acpi
>  12:      25255      22957   IO-APIC-edge      i8042
>  14:          0          0   IO-APIC-edge      ide0
>  16:     380396     233180   IO-APIC-fasteoi   uhci_hcd:usb4, yenta
>  17:     829711     532117   IO-APIC-fasteoi   uhci_hcd:usb5, ohci1394, 
> HDA Intel
>  18:          0          0   IO-APIC-fasteoi   mmc0
>  19:          2          0   IO-APIC-fasteoi   ehci_hcd:usb6
>  20:         18         17   IO-APIC-fasteoi   uhci_hcd:usb1
>  21:          0          0   IO-APIC-fasteoi   uhci_hcd:usb2
>  22:     305246     302929   IO-APIC-fasteoi   ehci_hcd:usb3
> 220:       8566       7543   PCI-MSI-edge      eth0
> 221:      27049      24430   PCI-MSI-edge      ahci
> NMI:          0          0   Non-maskable interrupts
> LOC:     426040     660568   Local timer interrupts
> RES:    2036860    2297232   Rescheduling interrupts
> CAL:       7278       7718   function call interrupts
> TLB:      14422      14326   TLB shootdowns
> TRM:          0          0   Thermal event interrupts
> SPU:          0          0   Spurious interrupts
> ERR:          0
> MIS:          0
>
> andy at monkey:~$ lsusb
> Bus 001 Device 003: ID 0483:2016 SGS Thomson Microelectronics 
> Fingerprint Reader
> Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 004 Device 002: ID 0582:0033 Roland Corp. EDIROL PCR
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 003 Device 003: ID 07ab:fcdf Freecom Technologies
> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> andy at monkey:~$ lspci
> 00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory 
> Controller Hub (rev 0c)
> 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 
> Integrated Graphics Controller (rev 0c)
> 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 
> Integrated Graphics Controller (rev 0c)
> 00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network 
> Connection (rev 03)
> 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #4 (rev 03)
> 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #5 (rev 03)
> 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI 
> Controller #2 (rev 03)
> 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio 
> Controller (rev 03)
> 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express 
> Port 1 (rev 03)
> 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express 
> Port 2 (rev 03)
> 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #1 (rev 03)
> 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #2 (rev 03)
> 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI 
> Controller #1 (rev 03)
> 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
> 00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface 
> Controller (rev 03)
> 00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) 
> IDE Controller (rev 03)
> 00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) 
> SATA AHCI Controller (rev 03)
> 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller 
> (rev 03)
> 03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or 
> AGN [Kedron] Network Connection (rev 61)
> 05:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
> 05:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller 
> (rev 04)
> 05:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro 
> Host Adapter (rev 21)
>
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user at lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
>
>   




More information about the Linux-audio-user mailing list