Hi everyone --

I'm running into an odd problem trying to export Mixer info as a
command-line process in a customized version of MuseScore I'm using to
create data for a music visualization project. (I asked this question on
IRC earlier this afternoon; asking again here in case it gets missed there.)

What my code does is get a pointer to the Fluid synth, and use
fluid->get_num_channels() and fluid->get_channel_preset(int) to get the
mixer info. This works as expected, giving the list of presets shown in the
Mixer window.

However, it doesn't work as expected when running in command-line mode
(which I need to process a large number of scores). What I do command-line
mode is first make sure to load the synthesizer state into the synth, via
synti->setState(score->synthesizerState()). (The scores have the loaded
soundfonts saves in the score.)

Given the synth state is loaded from the score, the above calls to
fluid->get_num_channels() and fluid->get_channel_preset(int) should work as
they do in GUI mode. And indeed they do... sometimes.

I'm seeing non-deterministic behavior. Sometimes I get the preset info from
fluid as expected, other times I get 0 as the number of presets. Same
scores, different behavior across multiple runs.

So I'm suspecting some kind of race condition.

NOTE: I do remove the noSeq = true statement in musescore.cpp to make sure
the synth is still created in batch mode -- normally it isn't.

My question: any tips or thoughts on what could be causing this
non-deterministic batch mode behavior? Possible race conditions? Something
to do with the initialization of fluid?

Thanks, Ien
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to