Hi, Folks!
I'm building small python app for windows (piano sight-reading) with
fluidsynth 2.5.4 as sound module.
Actually everything works fine, but there is one case which is of
unwanted behavior.
I have 'check_port' function for connecting/disconnecting in and out
ports of usb-midi devices.
When the app already started and then i'm plugging in usb device then
function works fine.
But, when usb device was plugged before the app started then
fluidsynth during initialization somehow attaching available midi
device outside of my logic and as a result midi-in events are doubled
and sounds are doubling as well.
Could someone, please, recommend how to avoid this?
My initialization of fluidsynth is as follows:
def fs_create(self):
fs = fluidsynth.Synth()
fs.setting('midi.autoconnect', 0)
fs.setting('no-midi-in', 'yes')
fs.setting('synth.gain', self.fs_gain)
fs.setting('synth.sample-rate', 48000.0)
fs.setting('audio.sample-format', '16bits')
fs.setting('synth.cpu-cores', 4)
fs.setting('audio.periods', 4)
fs.setting('audio.period-size', 132)
fs.start(driver="wasapi")
self.sfid = fs.sfload(self.sf_path)
fs.program_select(0, self.sfid, 0, 0)
fs.cc(0,7,127)
fs.cc(0,11,127)
return fs
Thanks,
Stanislav
_______________________________________________
fluid-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fluid-dev