Re: Minimising latency in MIDI over BTLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14/10/18 19:11, Ben Gonzales wrote:
Hi.

First post.

I have compiled Bluez 5.50 on a R-Pi for a synth using Fluidsynth. Project page here:

https://gonzos.net/projects/pi-synth/

I'm using a Yamaha UD-BT01 MIDI-over-BTLE (MOB) peripheral to send MIDI commands to the synth. Before the MOB functionality was implemented I was using BluePy to send/receive the MIDI. The new ability to create a MIDI port is excellent, but I find the latency higher than I would like. It is certainly higher than with BluePy (no measurements yet - just my subjective appraisal).

My question is: are there techniques for minimising latency over BTLE?

Ben

Further information:

I have set up a test rig on my RPi so I can measure the time difference between the trigger (the air pressure pulse) on my wind controller and the arrival of the MIDI command at the OS MIDI port. The sensor by-passes the wind controller and connects directly to the RPi.

My wind controller is an Akai EWI-USB, the BTLE peripheral is a Yamaha UD-BT01, and I did 20 tests of each of the following scenarios measuring time difference in msec:

A) With the EWI wired to the  USB port
Average:  34 , Max:  41.568 , Min:  30.496 , No.:  20

B) with the EWI connected via the Bluez 5.50 BTLE connection
Average:  76 , Max:  112.246 , Min:  35.877 , No.:  20

C) with the EWI connected via an "optimised" Bluez 5.50 BTLE connection
Average:  53 , Max:  61.032 , Min:  45.739 , No.:  20

"Optimising" the BTLE connection is done by running:
sudo hcitool lecup --handle $HANDLE --min 6 --max 7 --latency 0 --timeout 500

So, the optimised BTLE connection is 20ms slower than the wired one, and the unoptimised BTLE connection is really bad at 40ms slower than the wired one.

Any suggestions?

Ben



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux