Reduce latency when connecting a MIDI device over Bluetooth BLE, as it's significantly higher than USB. This affects button light updates and rotor responsiveness. Investigate queue monitoring in portmidi to improve polling updates.
When connecting a midi device over bluetooth BLE (like https://discuss.pixls.us/t/using-a-midi-device-with-darktable/54391/1) latency is much higher than when using USB. This manifests itself with button lights updating only 10secs after the onscreen button it is linked to is toggled and rotors in absolute mode getting jumpy when using shift to take large steps. Possible solutions to investigate: 1. monitor the queue in portmidi if possible. The polling updates for rotors and buttons should be postponed when the queue is still processing the last update. It may be that the actual size of congestion is hidden in a driver level, in which case hopefully we can still monitor throughput and then scale back the volume of updates so that it should be low enough for the driver to catch up. 2. When sending updates remember the previous confirmed level (i.e. _received_ from the device) and then when receiving new data from the device, if it is in between both values, make a best guess whether i