Progress on fluidsynth – first questions to consider regarding note crescendo

Good news everyone,
today I discovered that MuseScore’s internal variant of fluidsynth supports midi CC11 (aka expression pedal). I did this by adding this line to mscore/musescore.cpp:

 void MuseScore::midiCtrlReceived(int controller, int value)
       seq->setController(0, controller, value);
       if (!midiinEnabled())

Now every midi CC gets send to the synth (on channel one – have a look at the implementation). I played around a bit with KORG nanoPad and could change sound’s volume via CC11 on during a note.

I wasn’t sure if fluidsynth had been incorporated into MuseScore before this feature was added. But now I know for sure! So the next step is “just” adding something to libmscore/rendermidi.cpp. But before this can be done some aspects have to be considered!

I had a nice little discussion with jeetee and Jojo-Schmitz on IRC about when to use this feature – crescendo on one note doesn’t make sense for a grand piano for example! I thought it would maybe be nice to add information to instruments.xml – on the other hand it makes sense to use already defined categories in instruments.xml. Instruments that should definitely have this feature are wind instruments, bowed instruments, voice and some organs (which have a swell pedal). Than there were instruments we were not so sure about – mainly electronic instruments like e-guitars and electronic keyboards. In my opinion a guitarist would normally not use a volume pedal if he or she reads a crescendo – but I might be wrong. Furthermore I’m not sure if CC11 should be used for all crescendos or if should just used during a note (and velocity for changes between different notes). Also jeetee said it would make sense for drum rolls – but I think if you have actually separate events for the drum roll using velocity makes more sense (if the roll is a looped sample using CC11 seams reasonable of course!). Last but not least there are instruments that would probably not use CC11 (and thus should have this feature disabled by default) like grand piano, plucked instruments, percussion and so on.

Next thing to consider is – how many (or better in which frequency) do we need these messages? I think it will depend on how drastic the change is and how fast it shall change. It might be different for different synthesizers (hopefully not to different for different instruments or soundfonts?). That is something that needs to be investigated in the next days. Other question if it should be “curved” or flat.

Let me know your thoughts!