Investigate in MuseScore's Fluidsynth

Posted 8 years ago

Finding out about the CC11 capability of Fluidsynth in MuseScore is nice. But what would be interesting is - when was it integrated and what happened since then to upstream?

By browsing the musescore-old repository I found that Fluidsynth got integrated with this commit on Feb-13th in 2007. At this time the last commit on fluidsynth side was this one from January 2007.

By looking at the synth.cpp file here and comparing it to this addition in fluidsynth we see that Werner used the latest development version of fluidsynth instead of the quite old release at this point (1.0.7a from February 2006 for the ones interested you can find the source here).

So now that we know what was when (I love source version control systems) we can figure out what changed in fluidsynth and what would be potentially interesting for MuseScore. Since I'm working on getting better synthesizers in MuseScore having an up to date version of fluidsynth seems pretty straight forward. So I had a look at all changelogs since then and created this nice google doc. I sorted out the things I thing would be good for MuseScore (but I haven't checked of some of them might be already in MuseScore!) and which might be good for MuseScore and I'm not sure about it. In the lists with all changes I also marked the ones I sorted out - green means might be interesting and red means is definitely interesting. If you know something about fluidsynth and it's state in MuseScore I would love to read your comment! (It should be also possible to comment in the gdoc!)

I think it is worth to mention that I think there aren't too many commits between the fork of fluidsynth in February 2007 and fluidsynth 1.0.8 in November 2007. But the changelog refers to changes from 1.0.7a to 1.0.8 - so there might be things already present in MuseScore that are mentioned in the changelog of fluidsynth 1.0.8.

Further more fluidsynth 1.1.6 (most recent release) is from August 2012 and it's last change in git is from May 2015. So there might be nice things lying in trunk that might be worth to integrate as well. I haven't looked into that but I will!

Next thing I'll investigate is actual volume of various combinations using velocity and expression on some of the default sounds in MuseScore and after that I'll try to have the first usable implementation in libmscore/rendermidi.cpp of CC11 commands. (I have a very stupid and naive implementation in my branch testCC11 which was just to play around if things would work as I thought ;))


Comments

Ciao Johannes,
first of all thank you for your interest in MuseScore and your willingness in improving it.
Since you are looking at the changes in upstream FluidSynth, can you also please take a look at the bug reports about FluidSynth, and see if some of the changes are dealing with them? In particular, I am thinking about these:
#87066: FluidSynth plays Incorrect Pitch When Alternate Values Used for “Scale Tune”
#89216: extra notes heard with some sf3 sound fonts (in this case the fault is probably due to the custom-made sf3 implementation or sf3 encoding, rather than the original FluidSynth)
I tried looking at them and I think I porbably found what is going wrong in those cases, but I have little knowledge of the whole FluidSynth architecture and I am not really sure on how to properly tackle those bugs.
Thank you again.
Ciao,
ABL

In reply to by ABL

Hi, the two of you, in https://musescore.org/en/node/89216 I’ve noticed multiple errors causing (some) audible glitches and (some) even crashes, some with SF2 and more with SF3, and prepared a PR dealing with all of them (I got a soundfont-related crash bugreport against MuseScore in Debian). In that node, I also documented some of the things why I changed some things in the PR, such as the end thing.

I’d be pleased if you could also help review and/or test that PR! Thanks in advance!