Midi latency (with android otg + midi controllers) [FIXED in 2.1c]

Found a bug? Post it here.
Post Reply
a1matt
Posts: 156
Joined: Wed Dec 28, 2016 7:39 pm

Midi latency (with android otg + midi controllers) [FIXED in 2.1c]

Post by a1matt »

I'm getting high midi latency, mis-timing and dropped notes.
It looks like the midi is received into SunVox promptly but then being held in a buffer.

Example:
Connect midi controller and press key.
The green midi indicator square indicates that the midi is being received promptly. No discernable latency.

Then either:
No sound is heard for 1-3 seconds, followed by any notes played all producing sound simultaneously.
Or:
No sound is heard at all.

My setup:
Android Galaxy A52S
Korg K25 controller
Electrix tweaker controller
Novation remote LE 61 controller
Three different OTG dongles.
Two USB A to USB B cables.

Faultfinding:
Have tried every combination of controller, dongle and cable. Same behaviour each time.

All of the combinations work without any issues in other apps (tested with SynPrez FM and Audio Evolution Mobile).

Have tried different combinations of midi and audio settings within SunVox. No difference.

I also have a Korg X3 synthesiser. I have connected this to the phone via an iConnect Mio cable (needed to convert 5pin din midi to USB) and OTG dongle.
This works perfectly sending midi into SunVox (i.e. no latency, no dropped notes) with all three dongles.

I am unable to test if the controllers work using the mio as I don't have power supplies for them. The controllers are running off USB bus power. I wonder if that is relevant.

I have one more test which is to purchase a USBC to USB B cable and try each controller with that instead of with dongles.

I have no idea if it is v2 related as I got the phone after v2 was released. I can't test with my previous device as it is Android 4.

The onscreen piano works super fast with the A52S.

Thanks for reading!
User avatar
NightRadio
Site Admin
Posts: 3944
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: Midi latency (with android otg + midi controllers)

Post by NightRadio »

Hi!
1) Please tell me what are your settings in the SunVox Preferences -> Audio
2) Are any of these controllers sending a MIDI clock signal (green square blinking continuously)?
a1matt
Posts: 156
Joined: Wed Dec 28, 2016 7:39 pm

Re: Midi latency (with android otg + midi controllers)

Post by a1matt »

Hi 👋

1) Currently all set to 'auto'
SunVox reports:
Current driver: Open SL ES
Current sample rate: 48000 Hz
Current latency: 192, 4ms

I have tried different buffer and sample rate settings.
I can only remember one of the combinations:
Buffer size 4096 and Sample rate 44100.

The other settings I couldn't experiment with as they are locked to 'auto'.

2) No clock signal. Green Square only blinks after key presses.
User avatar
NightRadio
Site Admin
Posts: 3944
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: Midi latency (with android otg + midi controllers)

Post by NightRadio »

Ok, thanks!
It works a little unpredictably on my Galaxy A51 too. Although, the latency is not so big (definitely not a few seconds).
I'll run more tests...
a1matt
Posts: 156
Joined: Wed Dec 28, 2016 7:39 pm

Re: Midi latency (with android otg + midi controllers)

Post by a1matt »

Thanks.
If there is any more testing I can do, just let me know.
User avatar
ESA-kp
Posts: 21
Joined: Mon Jul 21, 2014 11:20 am

Re: Midi latency (with android otg + midi controllers)

Post by ESA-kp »

Hi,
yes, I confirm: it seems that a buffer does not work properly...
... in fact if I press notes while I rotate the expression wheel then it sounds without delay, but if I stop the wheel no note is played anymore despite the small square green lights up without delay.

The onscreen piano or external "QWERTY" keyboard work without the delay described above.

HW: GalaxyA51 + external midi controller.
OS: Android13
SW: Sunvox2.1b

Thanks.
User avatar
NightRadio
Site Admin
Posts: 3944
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: Midi latency (with android otg + midi controllers)

Post by NightRadio »

I finally found some annoying bugs in the USB MIDI support code on Android. It will be fixed in 2.1c
a1matt
Posts: 156
Joined: Wed Dec 28, 2016 7:39 pm

Re: Midi latency (with android otg + midi controllers) [FIXED in 2.1c]

Post by a1matt »

I have installed 2.1c, and can confirm the latency issue is fixed.

Thank you again. A lot!

I am excited to use SunVox with a midi keyboard, it's a whole new paradigm for me.
Post Reply