Pitch Bend sounds wrong when exporting to midi?

• Nov 30, 2019 - 21:34

Hi Folks,

Hope this is the right place to ask this question. My problem is pretty simple; when I add a pitch bend to a note in Musescore 3.3.3, it sounds perfectly fine when playing within the application, but when I export the song to midi, it sounds different.
For example, a pitch bend of 1/2 tone sounds like only 1/16 or at best 1/8 tone bend everywhere else.
Is there some additional settings I need to add somewhere to make the Musescore and midi pitch bend to match 1:1?



How/where are you playing back the MIDI file?
The MIDI standard does not define what the maximum amount of pitchbend means, i.e. how many semitones you get if you push the pitch wheel all the way up. VST plugins/synthesizers often have a setting to adjust pitch bend range.
Musescore's MIDI synthesizer (fluidsynth) is probably set to be more sensitive (e.g. 100%=12 semitones) than that of the device/software on which you're playing the MIDI file (e.g. 100%=2 semitones).

In reply to by snieb

I've been looking into this since I posted this question. These other midi application allow me to inspect individual midi events and it seems like what you are saying is what is happening; MuseScore considers a pitch bend for 1 tone to be 1365, however all other midi programs consider a pitch bend of 1 tone to be (I believe) 8191.

What's interesting is that some googling around seems to point to some kind of standard (http://www.ultimatemetal.com/forum/threads/midi-pitch-bend-range.680677/) of which MuseScore is actually adhering too (1365 for 1 tone).

What even more maddening is that I have created and listened to test midis in several other programs: Anvil Studio (https://www.anvilstudio.com/), MidiEditor (https://www.midieditor.org/) and Sekaiju (https://openmidiproject.osdn.jp/index_en.html) and they tend to sound the same. In addition, this music is meant to be played in the Doom engine as in-game music, and even it sounds the same as those other midi programs, it is only MuseScore that seems to stand out.

If there's no real standard, there appears to be some kind of unwritten standard, at least for windows software... Is there a setting somewhere per .mscz file that we can set as the global scale of the pitch bend, so that if I say the 16384 range represents -1 to 0 to +1 tone, then when I add an articulation for a 1 tone pitch bend, it will write interpolated values between 0 and 8191 when I export to midi?

Obviously, I would prefer to use MuseScore due to it's far superior interface and presentation, but I understand it's a scoring application first.

In reply to by cjcat

Ok, I think I have figured it out... The reason MuseScore's pitch bend sounds wrong is because it does not write some data to the midi file which would tell the synthesizer how many tones are the max pitch bend.
Unfortunately, I am not really well versed with Midi events, but I managed to write a hacky program that simply adds in those events into the exported midi file so that the values used in the pitch bend events work in any application (I used the NAudio API).
Specifically, I have found you need to write 3 events (or 4 if you want to specify cents as well):
ControlChangeEvent #101 with value 0
ControlChangeEvent #100 with value 0
ControlChangeEvent #6 where value is how many tones (MuseScore uses 12 tones, so value of 12 works for MuseScore midis)
ControlChangeEvent #38 (the value of this one controls cents)

from what I have seen, 2 semitones seems to be default for most places including Java's midi player.
the 4 control change messages posted above do work to solve the issue, it would be nice if Musescore automatically added those instead of us having to edit them in afterwords

Do you still have an unanswered question? Please log in first to post your question.