-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot change instrument when external MIDI keyboard w/ clock is connected #19
Comments
Hi
Unfortunately I don't have a midi keyboard which generate midi clock data. |
I can reproduce this on my system with
Now, selecting a sf2 after connecting results in the instrument list staying at None. Connecting it after loading the sf2 leads to the behavior described above. With something like this in the code I see about 48 messages per second (same as in
If you can't reproduce this do you see a similar amount of midi clock messages? Maybe in the end this is some pipewire-jack weirdness (I'm using pipewire |
Ah, now I got it. I just changed the instrument with the midi keyboard and that works. That leads me to |
I did not know that setting the instrument via midi keyboard is an option. How does that work? And thanks for the fix! Just compiled it and it works now even when the clock is on. |
I just found out that this only fixes this first case, but not the second case.
The instrument list stays at |
… clock is connected, fix issue #20 Incorrect highlighting in instrument combobox when advancing instrument via click
Oh, yes, I've introduce that with the last commit were I've forgotten to remove a testcase. Fixed now. |
Loading a sf2 when |
Looks like carlas message bus is overwhelmed. I do some debug checks and see that some messages send from dsp to ui don't been forwarded by carla. That happen sporadic when the midi clock is running. |
here is a example, Flida send the instrument list in chunks , carla froward them to the UI. |
did you try specify the minimum size of the atom ports? on the atom ports, use like:
|
Yes, I've used and btw. what is the bigest allowed buffersize here? Also, I send chunks of data, contain max 12 strings. So buffersize shouldn't be a issue. |
@falkTX However, when I switch to send all instruments at once, that works, sometimes. But sometimes even then carla didn't deliver the data to the UI. All that only happen when the midi clock run. Otherwise both solutions works flawless within the default buffersize of carla. So it looks to me as if the midi clock eats up the atom buffer of carla. |
So I've implemented a work around for this issue. It seems that carla fail on handle the amount of messages, so now, when a midi clock is detected, Fluida switch to send the instrument list in one big chunk instead as multiple smaller chunks. That reduce the amount of messages carla needs to handle. But still, that works only 99% of the time. |
Likely fixed in falkTX/Carla@a97fd20, please test and report back, thanks! |
When I run Fluida.lv2 in BespokeSynth, Carla or reaper changing instruments works fine until I connect my MIDI keyboard (a "Novation Launchkey 37 MK3"), then I cannot change the instrument anymore. The instrument changes in the UI, but the instrument I hear does not change. It only changes once I have disconnected the midikeyboard (in my plugin host only, the keyboard remains plugged in via USB the whole time) and THEN choose a new instrument.
I could not reproduce this with a virtual midi keyboard or a self-made midi footswitch (they all don't provide a midi clock).
While trying to figure this out I took a look at the midi loop and one difference I can see is that my keyboard sends out a MIDI clock and that quite frequently, at least there are a lot of messages with type 0xF8 aka
LV2_MIDI_MSG_CLOCK
inFluida_::run_dsp_()
that otherwise seem to have a zero payload.Turning off the MIDI clock in the settings of my keyboard seems to do the trick and instrument changing works again. I wonder though, is this is something that is a problem in Fluida that could be fixed there?
The text was updated successfully, but these errors were encountered: