Occasional latency between received midi messages and synthesis start (not as audio latency)

Found a bug? Post it here.
Post Reply
User avatar
ESA-kp
Posts: 21
Joined: Mon Jul 21, 2014 11:20 am

Occasional latency between received midi messages and synthesis start (not as audio latency)

Post by ESA-kp »

Hi,

this is my issue:
The audio engine always works well but sometimes I've an additional latency from midi received message (when the little green square indicator, up-left side, in the modules sub-window turns on) to the start of synthesis (start of waveform inside the selected module) while the delay between the module activation to the sound output remains imperceptible.
In this case, if I play with the "QWERTY" keyboard I don't have any latency, this suggests that the audio engine works well yet.
After some seconds (if I press STOP many times, it seems) the extra latency disappears (the delay between received midi message and start of active module is not noticeable).
I don't understand what is the event that triggers the fault condition.
This extra latency is about 0.5 - 1 second and it is constant during the issue.
I suppose that isn't an audio issue for the evidence explained above and I also suppose that isn't an issue derived from the USB midi keyboard because when I press a key, the midi message is always immediately received.

So, you got any ideas?
Do you have other tests I could run?

Thanks!!!

HW:
- Raspberry pi 4 model B (4GB ram)
- USB MIDI KEYBOARD CONTROLLER (Arturia or M-Audio) [Over USB_3.0]
- USB Audio external board based on ES9038Q2M DAC [Over USB_3.0]
- USB standard alphanumeric Keyboard
- USB mouse
- HDMI used for external monitor [driving at 1440x900]

SW:
- Raspberry Pi OS Rel.date: September 22nd 2022
System: 32-bit
Kernel version: 5.15
Debian version: 11 (bullseye)
(Fresh OS installation)
- SUNVOX 2.1B [setted with 30FPS fullscreen, SMPLR 44100, buffer @ 23ms]
User avatar
NightRadio
Site Admin
Posts: 3944
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: Occasional latency between received midi messages and synthesis start (not as audio latency)

Post by NightRadio »

I'm not sure, but maybe it relates to this bug:
https://warmplace.ru/forum/viewtopic.php?f=12&t=6386
In any case, I will try to reproduce it somehow...
User avatar
ESA-kp
Posts: 21
Joined: Mon Jul 21, 2014 11:20 am

Re: Occasional latency between received midi messages and synthesis start (not as audio latency)

Post by ESA-kp »

... yea, but partially true!

- With Android13 (on my GalaxyA51) the lag or the absence are continuously present and it is possible to mitigate it acting on the modulation wheel (as I described in the thread you have posted).
- With Raspbian, we have a similar behaviour but is not continuous and the trick to flood midi messages with modulation wheel doesn't work during the lag period. After about 30-40 seconds the lag disappears by itself and then maybe comes back later...

Please, take me in account in case you want to debug, I will test with my HW config.

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

Re: Occasional latency between received midi messages and synthesis start (not as audio latency)

Post by NightRadio »

I think I fixed it for Android. But not for Linux yet...
Post Reply