PROBLEM STATEMENT: driving FluidSynth from a MIDI controller produces ~1/4sec 
delay between keypress and sound.

NARRATIVE:

I finally got Qsynth working under Xfce (it freezes X under twm!) so I can 
control fluidsynth in a reasonably-obvious way... but I am now experiencing 
substantial latency.
The good news is that it feels just like playing an old pneumatic or tracker 
organ, where there’s a ~0.25sec delay between keypress and sound.
The bad news is that it feels just like playing an old pneumatic or tracker 
organ...

I’m not a good enough musician to handle the roughly quarter-second delay when 
playing live.  I know from many musicians that near-zero-latency from MIDI 
softsynths (even when using soundfonts) is possible... although no-one I know 
of uses OpenBSD.

Is sndio(4) suitable for real-time(-ish) performance?  Or do I need a (OS) 
platform that does ASIO or JACK?  (I mostly play by ear so I'm targeting 
<<0.1sec latency.)

If sndio core or umidi(4) support isn’t the problem, the only obvious thing to 
blame is FluidSynth... but the CPU in this laptop should be more than up to the 
task, and – again – I know this particular piece of software handles 
low-latency live performance in other configurations (i.e. on Linux, using 
JACK).
I don't suspect Qsynth at the moment, as it only controls how fluidsynth 
launches, it doesn't put itself in the data path.

Unsurprisingly, I’ve been unable to find any useful information on running this 
kind of setup under OpenBSD.  But as mentioned before, I’m trying to avoid the 
(to me) insanity that is JACK.

Dmesg follows, just in case anyone spots anything useful in there…

Hardware setup, broadly:
* Dell Latitude E6430 laptop
  - booting in EFI mode to work around a weird bootloader bug
* onboard azalia(4) audio (for now) using onboard speakers (for now)
* Roland A500PRO MIDI controller, connected via USB
* M-audio Uno USB-MIDI, nothing connected to it yet
* No-name USB 5.1ch Audio DAC from Amazon, nothing connected to it yet
  - (leaving the M-audio umidi and the "ABC" uaudio devices disconnected makes 
no difference)


Advice / pointers gratefully accepted, including pointers to documentation or 
threads I may have missed.

Thanks,
-Adam


Dmesg << __EOF__ (so to speak)
 OpenBSD 6.4 (GENERIC.MP) #1: Mon Nov 26 10:18:14 CET 2018
    
r...@syspatch-64-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8471482368 (8079MB)
avail mem = 8205459456 (7825MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xebf40 (101 entries)
bios0: vendor Dell Inc. version "A21" date 05/08/2017
bios0: Dell Inc. Latitude E6430
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG SSDT HPET SSDT SSDT SSDT ASF! SLIC BGRT 
SSDT
acpi0: wakeup devices P0P1(S4) USB1(S3) USB2(S3) USB3(S3) USB5(S3) USB6(S3) 
USB7(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP05(S4) PXSX(S4) 
RP06(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2193.29 MHz, 06-3a-09
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
cpu4: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 1, core 0, package 0
cpu5 at mainbus0: apid 3 (application processor)
cpu5: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
cpu5: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 1, core 1, package 0
cpu6 at mainbus0: apid 5 (application processor)
cpu6: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
cpu6: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 1, core 2, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz, 2192.89 MHz, 06-3a-09
cpu7: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu7: 256KB 64b/line 8-way L2 cache
cpu7: smt 1, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf8000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 2 (RP01)
acpiprt3 at acpi0: bus 3 (RP02)
acpiprt4 at acpi0: bus -1 (RP05)
acpiprt5 at acpi0: bus 12 (RP06)
acpiprt6 at acpi0: bus -1 (RP07)
acpiprt7 at acpi0: bus -1 (RP08)
acpiprt8 at acpi0: bus 1 (PEG0)
acpiprt9 at acpi0: bus -1 (PEG1)
acpiprt10 at acpi0: bus -1 (PEG2)
acpiprt11 at acpi0: bus -1 (PEG3)
acpiprt12 at acpi0: bus 4 (RP03)
acpiprt13 at acpi0: bus 8 (RP04)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu1 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu2 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu3 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu4 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu5 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu6 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu7 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpitz0 at acpi0: critical temperature is 107 degC
acpicmos0 at acpi0
"SMO8810" at acpi0 not configured
"*pnp0c14" at acpi0 not configured
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "DELL P6YD623" serial 1827 type LION oem "SMP"
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
"DELLABCE" at acpi0 not configured
"INT33A0" at acpi0 not configured
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: LCD_
acpivideo1 at acpi0: VID_
acpivout at acpivideo1 not configured
cpu0: Enhanced SpeedStep 2193 MHz: speeds: 2201, 2200, 2100, 2000, 1900, 1800, 
1700, 1600, 1500, 1400, 1300, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 3G Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 3G PCIE" rev 0x09: msi
pci1 at ppb0 bus 1
vendor "NVIDIA", unknown product 0x0dfc (class display subclass VGA, rev 0xa1) 
at pci1 dev 0 function 0 not configured
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 4000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1600x900, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
xhci0 at pci0 dev 20 function 0 "Intel 7 Series xHCI" rev 0x04: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
addr 1
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3 "Intel 7 Series KT" rev 0x04: ports: 16 com
com4 at puc0 port 0 apic 2 int 19: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 
b8:ca:3a:d0:d9:42
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 16
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04: msi
azalia0: codecs: IDT/0x76df
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 7 Series PCIE" rev 0xc4: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 1 "Intel 7 Series PCIE" rev 0xc4: msi
pci3 at ppb2 bus 3
iwn0 at pci3 dev 0 function 0 "Intel Centrino Advanced-N 6205" rev 0x34: msi, 
MIMO 2T2R, MoW, address 84:3a:4b:4b:1c:18
ppb3 at pci0 dev 28 function 2 "Intel 7 Series PCIE" rev 0xc4: msi
pci4 at ppb3 bus 4
ppb4 at pci0 dev 28 function 3 "Intel 7 Series PCIE" rev 0xc4: msi
pci5 at ppb4 bus 8
ppb5 at pci0 dev 28 function 5 "Intel 7 Series PCIE" rev 0xc4: msi
pci6 at ppb5 bus 12
sdhc0 at pci6 dev 0 function 0 vendor "O2 Micro", unknown product 0x8221 rev 
0x05: apic 2 int 17
sdhc0: SDHC 2.0, 50 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, dma
ehci1 at pci0 dev 29 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 21
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
pcib0 at pci0 dev 31 function 0 "Intel QM77 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 7 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, INTEL SSDSC2BW24, DC32> SCSI3 0/direct 
fixed naa.55cd2e404bfa7767
sd0: 228936MB, 512 bytes/sector, 468862128 sectors, thin
cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVD+-RW GU40N, A104> ATAPI 5/cdrom 
removable
ichiic0 at pci0 dev 31 function 3 "Intel 7 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
iic0: addr 0x29 07=ff 0f=33 10=8f 11=80 12=b7 13=51 14=b3 15=33 16=1e 17=24 
18=1d 19=a0 1a=50 1b=64 1c=c0 1e=20 20=7f 22=40 27=ff 29=fe 2d=43 2f=20 30=95 
31=25 32=0e 33=16 87=ff 8f=33 90=8f 91=80 92=b7 93=51 94=b3 95=33 96=1e 97=24 
98=1d 99=a0 9a=50 9b=64 9c=c0 9e=20 a0=7f a2=40 a7=ff a9=fd ad=44 af=20 b0=95 
b1=25 b2=0e b3=16 words 00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 
07=ffff
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
spdmem1 at iic0 addr 0x52: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
error: [drm:pid0:cpt_set_fifo_underrun_reporting] *ERROR* uncleared pch fifo 
underrun on pch transcoder A
error: [drm:pid0:intel_pch_fifo_underrun_irq_handler] *ERROR* PCH transcoder A 
FIFO underrun
uaudio0 at uhub0 port 1 configuration 1 interface 0 "ABC USB Sound Device" rev 
1.10/0.10 addr 2
uaudio0: audio rev 1.00, 14 mixer controls
audio1 at uaudio0
uhidev0 at uhub0 port 1 configuration 1 interface 3 "ABC USB Sound Device" rev 
1.10/0.10 addr 2
uhidev0: iclass 3/0
uhid0 at uhidev0: input=3, output=4, feature=0
umidi0 at uhub0 port 3 configuration 1 interface 1 "M-Audio USB Uno MIDI 
Interface" rev 1.00/1.13 addr 3
umidi0: (genuine USB-MIDI)
umidi0: out=1, in=1
midi0 at umidi0: <USB MIDI I/F>
ugen0 at uhub0 port 3 configuration 1 "M-Audio USB Uno MIDI Interface" rev 
1.00/1.13 addr 3
uhub3 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 
2.00/0.00 addr 2
umidi1 at uhub3 port 2 configuration 1 interface 1 "Roland A-PRO" rev 1.10/1.00 
addr 3
umidi1: (genuine USB-MIDI)
umidi1: out=2, in=3
midi1 at umidi1: <USB MIDI I/F>
midi2 at umidi1: <USB MIDI I/F>
midi3 at umidi1: <USB MIDI I/F>
ugen1 at uhub3 port 2 configuration 1 "Roland A-PRO" rev 1.10/1.00 addr 3
ugen2 at uhub3 port 4 "Broadcom Corp BCM20702A0" rev 2.00/1.12 addr 4
uvideo0 at uhub3 port 5 configuration 1 interface 0 "CNFB183J0150200001D2 
Laptop_Integrated_Webcam_E4HD" rev 2.00/28.07 addr 5
video0 at uvideo0
uhub4 at uhub2 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 
2.00/0.00 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (9e659ad49c8fff3e.a) swap on sd0b dump on sd0b
error: [drm:pid97912:intel_pipe_update_start] *ERROR* Potential atomic update 
failure on pipe A

Reply via email to