Page 2 of 3

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Tue Jan 31, 2023 5:54 pm
by Steve W
Waverley Instruments wrote: Tue Jan 31, 2023 4:15 pm . . . MIDI data will typically be handled in a block of code that is executed 48000 times per second, i.e. the sample rate.

You then have some other code that gets executed that updates the UI - LEDs for example... This might be every 50ms, unless the developer has specified something else. I'm talking specifically about UI refresh rate.

Typically with DSP, you don't update the UI every time "something" changes. The signal processing and UI updates are different blocks of code executed at different intervals, on different threads with different priorities.

Hope that makes sense, -Rob
This makes sense and is what I either knew or assumed to be the case. What doesn't make sense is why the all the other MIDI IN LEDs I looked at blink on and off consistently (but with variations) with the HOST including all the other Waverley Instruments I looked at, with the sole exception being the MIDIMONO's MIDI IN LED.

Not all MIDI IN ports on all modules have an LED. Based on the sound, clearly the note ons and note offs are going to the MIDIMONO and the MIDIMONO is turning the sounds on and off correctly.

You might want to consider not having an LED for the MIDI IN on the MIDIMONO.

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Wed Feb 01, 2023 6:58 am
by UrbanCyborg
Just as an experiment, and only if it doesn't require reengineering the code too much, why not try putting just the LED update code in a thread at 50 ms, and see if it drops back into sync with the control panel LEDs?

Reid

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Wed Feb 01, 2023 7:20 am
by Waverley Instruments
UrbanCyborg wrote: Wed Feb 01, 2023 6:58 am Just as an experiment, and only if it doesn't require reengineering the code too much, why not try putting just the LED update code in a thread at 50 ms, and see if it drops back into sync with the control panel LEDs?
Hi Reid,

Funnily enough I did try just running StartGuiTimer() without a specific parameter so it's on a 50ms poll rate and it does indeed seem to sync better with the control panel and no "lost" messages. The control panel "holds" LED states for longer, but it could simply be the case that 25ms is the issue here.

Ironically, the faster refresh rate in MIDIMONO was in the interests of better visual feedback. :?

I might do a little patch to go back to the default.

-Rob

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Wed Feb 01, 2023 11:08 am
by ColinP
Just to chip in here.

I experimented with faster GUI updates a while back and it didn't seem to help much. Rob's intuition that the event handling might be adversely affected by some kind of thread priority interaction might be correct. I've still not managed to work out exactly how the threads interact but it's feasible that some GUI timer events get dropped when things get busy and this might become more likely the faster the timer runs. So leaving the GUI update period at 50 ms might be the best option.

On the MIDI indicator, I use a countdown rather than a flag so as to make the LED stay lit for two updates rather than one in order to make the brief flash from note on/off messages more noticeable. The LED on the VM I/O Panel might use a countdown of 3 or 4 so maybe that's why it holds for so long?

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Wed Feb 01, 2023 2:12 pm
by Steve W
For what its worth on my PC the MIDI IN LED on MIDIMONO v.1.2 (build 64) blinks in sync with all the other MIDI IN LEDs I tested (slight variations acknowledged).

Please understand, I think the module sounds great. If it were hardware, I wouldn't return it, I'd just put a black sticker or tape over the LED. I don't want to do that with my monitor. :o

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Wed Feb 01, 2023 2:18 pm
by Waverley Instruments
Thanks Steve and Colin. That's very interesting and I think between you, you've nailed it. Pretty sure in 1.3, poll rate was changed from default (50ms) to 25ms. :shock:

I'm patching it back to 50ms :oops:

As a related aside, I've got various guitar fx pedals whose LEDs are way too bright - masking tape to the rescue! :D

Thanks again for the kind words regarding the sound! 8-) -Rob @ WI

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Wed Feb 01, 2023 2:53 pm
by Steve W
That would be great. If you want me to double check it with the patches I've been using before pushing it, I'd be happy to do that.

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Thu Feb 02, 2023 7:27 am
by Waverley Instruments
Steve W wrote: Wed Feb 01, 2023 2:53 pm That would be great. If you want me to double check it with the patches I've been using before pushing it, I'd be happy to do that.
Many thanks Steve! As it's a very low risk change, I've pushed it live, v1.5 Build 77.

If you do get a chance to take it for a spin and let us know how it goes, that would be great. -Rob @ WI

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Thu Feb 02, 2023 2:45 pm
by Steve W
Yup!!!! I just did a quick test: updated to v1.5 Build 77 and used the same basic test patches I have been using. The MIDI IN LED on the MIDIMONO works as expected. Thanks!

Thanks also to Reid and Colin for taking an interest in this.

Re: New UI Lag Rate MIDIMONO v1.5

Posted: Thu Feb 02, 2023 9:57 pm
by Waverley Instruments
Steve W wrote: Thu Feb 02, 2023 2:45 pm Yup!!!! I just did a quick test: updated to v1.5 Build 77 and used the same basic test patches I have been using. The MIDI IN LED on the MIDIMONO works as expected. Thanks!
Great news - thanks for the update Steve, and thanks to Colin and Reid too! -Rob @ WI