Discussion:
[fluid-dev] Intercepting midi events
Christopher Leger
2018-06-13 19:52:06 UTC
Permalink
It may have been the threads I was seeing in top instead of processes. I
guess it won't help my problem but I still found it suspicious that setting
the cores to 4 in the fluidsynth from GitHub generated four extra rows in
top where as in my program I notice no difference in top from the core
setting.

No, the issue isn't only in my program; everything I have tried to solve
this so far I have done on the fluidsynth I compiled from GitHub and my own
program. They both have the same issue with noteon or noteoff events being
shipped.

Is there any way I can see the output of the midi driver to see if it is an
issue going from the driver to fluidsynth? Or do you think it is just a
problem with the driver not catching all the events from the keyboard?

Not too sure what to try at this point. I think I may try out my friend's
midi keyboard just to rule out any issue with the keyboard even though it
is a cheap keyboard I don't think that would be the issue because it works
without any problem on my desktop Ubuntu PC.
Make sure your app actually has permission to run fluidsynth in realtime
prio.
Try using a different midi driver, like hooking up alsa_raw through jack.
(compiled from the original git source code)
Try stable 1.1.11.
Tom
Ceresa Jean-Jacques
2018-06-13 23:00:37 UTC
Permalink
but I still found it suspicious that setting the cores to 4 in the fluidsynth from GitHub generated four extra rows in top where as in my program I notice no difference in top from the core setting.
Yes, it is curious as the behaviour should be the same (if the Github version and the one you use within the program you write are the same of course !).

Could you please report the output of top in both case ?. May be this can help ?

 
Is there any way I can see the output of the midi driver.. ?
If you use this:  midiDriver = new_fluid_midi_driver(settings, intercept, synth),  the driver call your intercept() function in which you can print any messages, but as you have aldready tried that i don't have any other idea !?.

 
I don't think that would be the issue because it works without any problem on my desktop Ubuntu PC.
But you should check one more time. Also if this is an USB keyboard connected to your Rpi3, please try to pass thougth a usb hosthub with a separate power supply for the usb host-hub.(i mean both, the keyboard and usb host-hub should be powered by another power supply, not the one used for the Rpi3).

jjc

 
Message du 13/06/18 21:52
De : "Christopher Leger"
A : "FluidSynth mailing list"
Objet : Re: [fluid-dev] Intercepting midi events
 
It may have been the threads I was seeing in top instead of processes. I guess it won't help my problem but I still found it suspicious that setting the cores to 4 in the fluidsynth from GitHub generated four extra rows in top where as in my program I notice no difference in top from the core setting.
No, the issue isn't only in my program; everything I have tried to solve this so far I have done on the fluidsynth I compiled from GitHub and my own program. They both have the same issue with noteon or noteoff events being shipped.
Is there any way I can see the output of the midi driver to see if it is an issue going from the driver to fluidsynth? Or do you think it is just a problem with the driver not catching all the events from the keyboard?
Not too sure what to try at this point. I think I may try out my friend's midi keyboard just to rule out any issue with the keyboard even though it is a cheap keyboard I don't think that would be the issue because it works without any problem on my desktop Ubuntu PC.
On Fri, Jun 8, 2018, 12:27 AM Tom M. wrote:
Make sure your app actually has permission to run fluidsynth in realtime prio.
Try using a different midi driver, like hooking up alsa_raw through jack.
(compiled from the original git source code)
Try stable 1.1.11.
Tom
Tom M.
2018-06-15 12:12:05 UTC
Permalink
How would I be sure my program has realtime prio?
fluidsynth takes care of this, unless you see warnings like:

fluidsynth: warning: Failed to set thread to high priority

But it really sounds more like a problem of arriving midi events to me.

Tom
Christopher Leger
2018-08-12 18:03:43 UTC
Permalink
Hey, just wanted to say that I found a solution to midi events being
dropped from my midi keyboard. It randomly causes notes to stay on and
sometimes notes don't play.

I tested my friend's nice $1,000 midi keyboard with my setup and the
problem went away, no midi events were dropped. Everything worked
flawlessly. It must be an issue with the keyboard. I tried all the drivers
with this keyboard but I always have the sam issue.

I bought one of these:

midiplus AK490 MIDI Keyboard Controller

https://www.amazon.com/gp/aw/d/B00VHKM72Q/ref=ya_aw_od_pi?ie=UTF8&psc=1#
Post by Tom M.
How would I be sure my program has realtime prio?
fluidsynth: warning: Failed to set thread to high priority
But it really sounds more like a problem of arriving midi events to me.
Tom
Loading...