New UI Lag Rate MIDIMONO v1.5

Steve W
Posts: 758
Joined: Thu Jul 16, 2020 5:55 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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.
UrbanCyborg
Posts: 588
Joined: Mon Nov 15, 2021 9:23 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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
Cyberwerks Heavy Industries -- viewforum.php?f=76
User avatar
Waverley Instruments
Posts: 129
Joined: Thu May 05, 2022 2:10 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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
ColinP
Posts: 939
Joined: Mon Aug 03, 2020 7:46 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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?
Steve W
Posts: 758
Joined: Thu Jul 16, 2020 5:55 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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
User avatar
Waverley Instruments
Posts: 129
Joined: Thu May 05, 2022 2:10 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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
Steve W
Posts: 758
Joined: Thu Jul 16, 2020 5:55 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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.
User avatar
Waverley Instruments
Posts: 129
Joined: Thu May 05, 2022 2:10 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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
Steve W
Posts: 758
Joined: Thu Jul 16, 2020 5:55 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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.
User avatar
Waverley Instruments
Posts: 129
Joined: Thu May 05, 2022 2:10 pm

Re: New UI Lag Rate MIDIMONO v1.5

Post 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
Post Reply

Return to “Waverley Instruments”