mruby-zest / mruby-zest-build

Root repo for mruby-zest containing links to all submodules
GNU Lesser General Public License v2.1
19 stars 24 forks source link

Bank selection fixes #86

Closed polluxsynth closed 2 years ago

polluxsynth commented 2 years ago

These commits have been lying about in my development tree attempting to fix some minor issues that I discovered after https://github.com/zynaddsubfx/zyn-fusion-issues/issues/331 was closed. I think they're still useful.

fundamental commented 2 years ago

Per the second commit, would a short delay work for the search? I'm in favor of merging both commits, but it would be nice to know that my mental model fits with your commit description.

polluxsynth commented 2 years ago

I suppose it might help to delay a bit and then call doBank, if it's possible to do that. Or, what would be better would be to call doBank first when the rescan result has arrived. Wouldn't that cause some flicker though, with two search results arriving close to each other in time?

The problem here as far as I understand is that /bank/rescan elicits a response, and so does /bank/search (invoked by doBank()). So doing a rescan and then a bank search directly after (before the result from the rescan has arrived) causes the latter to be ignored (or perhaps the responses just end up in reverse order?), so that the bank search in practice does not happen. So the commit just really makes the code correspond to the actual behaviour.

I suppose it could be researched further so that a more appropriate behavior could be reached.

fundamental commented 2 years ago

Yeah, you're right about the flicker which personally tends to drive me nuts when it happens (usually in web browsers, not in zyn). The true right fix would likely be on the backend side as it sounds like the messages aren't being handled correctly when dispatched in order, but these fixes will work for the time being.