Latency issues with MIDI Over Bluetooth

I'm playing around with MIDI-Over-Bluetooth, but I'm having latency issues between iOS devices and also between iOS and OSX Yosemite. Didn't do extensive testing on the desktop, but there is about 34ms latency between devices, which is too much for MIDI. Anyone experiencing similar issues and are there ways to make everything faster?

The test simply sends the timestamp to the other device, which then sends it back to the original device. Divide the difference between the current and transmitted timestamp values ​​by 2 and you get a very rough estimate of the latency.

+3


source to share


3 answers


Is anyone experiencing similar problems

Yes, I noticed high latency with BLE MIDI.

My setup is a quiet Yamaha piano that has a MIDI port. I am using an MD-BT01 dongle that transmits MIDI signals over BLE to an iPad.

The total time between recording and listening to audio (straight from iPad, not BT audio, which causes even more latency) is noticeable and distracting.

Are there ways to make everything faster?



I don't believe you can do much as certain time constraints are written into the BLE MIDI specification. My research yielded some links worth reading:

My findings:

  • The BLE timeout will be at least 20ms or so. This is baked into the spec and there is nothing you can do about it.
  • When you add application latency (i.e. time for midi processing, generate polyphonic waveforms, output to speaker) you are probably in the> 50ms region.
  • For instruments like Piano, you'll need a USB or other wired connection.
0


source


Looking for information on latency MD-BT01, didn't find it, but previous answers suggest atleast 20ms.

I came across a comment that someone calculated the latency for a real drum kit (no software) ~ 2ms. I am terrible at math so I cannot confirm it. However, another source (dawbench *) that suggests there are interfaces that can be as long as 3ms. Another source (androidaudiopathlatency) says the minimum latency measured from the iPad was 5ms.

I think the midi itself is part of the problem. Sure, by writing firmware with midi support on both ends of the wire, you could get latency to nothing, but what about when a ton of input or output? It's also a serial protocol. Surely you could hack this by, say, instantly throwing tempo and groove-quantizing notes on a clock, etc., which I suppose is what a pair of highly realistic midi hws do (akai MPC does something similar, so if the user input is disconnected from the current cycle, it will correct the timing for the next cycle).

The point is, this is still quite a hack. If you were a pro keyboard player and didn't want to sound like a drum roll, but more like a jazz impressionist, I'm like ... 99.99% sure you can't do it with midi. This is why Yamaha had another port that bypassed midi-encoding even in its entry-level midi keyboards. But this is of course only supported by DOS and Windows 98 sequencers.

Point # 2. To actually record hard midi or whatever, the OS requires a driver or mod that disables various modern OS features, so that the computer can essentially turn into a precision measuring instrument, like an analog oscilloscope. OR ... it might be possible to use the sound card as an "oscilloscope" by creating a hardware kit that converts the serial "midi" (yamaha) and normal midi to audio, and then also uses the 2nd channel to record the audio into one and the same time. Then you have an audio representation of the midi signals and the actual sound (if you were playing, for example, a synthesizer that played MIDI + audio, but meant that the midi signal might have a delay or jitter that you had no control over, as it might be related to the source you are using),and then align them on the computer after recording.



edit: Quote from "The Truth About Latency" "While many musicians complain that MIDI is inherently flawed, since an eight minute chord will appear as eight notes spreading out after 8ms, the reality is that it is almost impossible to hear it in real life ".

This type sums it up once you know that 0.5ms is definitely palpable. I base this 0.5ms software on a drum groove that offers such tiny groove adjustments. This can be the difference between an almost dense and a dense groove. I just came across this quote just now. I wish I knew about this when I was trying to record midi and was very upset as to why it felt right when I was typing in realtime notes rather than feeling disconnected when listening to recorded midi (free running sequencers , without quantization).

edit 2:

Found an illustration of the problem! http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html The oscilloscope shows the latency from the midi note sent from the microcontroller to the computer audio output. 25 ms! This should be 2ms equivalent to analog drums.

0


source


According to the PR of any Bluetooth latency optimization product ,

[our cool product] offers a full end-to-end latency of just 32 milliseconds (ms) - much less than the standard Bluetooth latency of over 150ms (+/- 50ms).

So if you get around 34ms with your own code, that's as good as it gets.

Bluetooth just isn't good for realtime MIDI.

-1


source







All Articles