ModPlug Central

OpenMPT => Help and Questions => Topic started by: biolizardshadow on December 24, 2019, 02:50:09

Title: Can you increase the max pitch bend range?
Post by: biolizardshadow on December 24, 2019, 02:50:09
What is the max pitch bend range when exporting midi; cause for me the max is +128 and -128. So is it possible to increase max pitch bend range when exporting midi.
Title: Re: Can you increase the max pitch bend range?
Post by: Saga Musix on December 24, 2019, 13:28:30
Exporting sample-based instruments defaults them to a +/-12 pitch bend range. For plugin-based instruments the limit is whatever you specify in the instrument editor for that instrument (up to +/-127); so if the default +/-12 is not sufficient for your sample-based instruments, you can work around this by converting them to plugin-based instruments (e.g. by assigning the default MIDI I/O plugin that ships with OpenMPT to those instruments), then you can adjust the pitch bend range freely.
Title: Re: Can you increase the max pitch bend range?
Post by: biolizardshadow on December 25, 2019, 00:12:44
So how can you expand an instruments pitch range to go beyond +128 or -128
Title: Re: Can you increase the max pitch bend range?
Post by: biolizardshadow on December 25, 2019, 01:10:57
Problem fixed :). Actually the problem was the rules for general Midi.

For anyone creating GBA music using sappy (USE MIDIFIX4AGB) it fixed all of the problems I had.

Sorry for wasting your time Mr Developer on something that had nothing to do with the music tracker itself.
Title: Re: Can you increase the max pitch bend range?
Post by: Saga Musix on December 25, 2019, 15:15:36
No worries. But maybe you want to elaborate on the solution to your problem in case someone else runs into the same issue and ends up seeing this thread.
Title: Re: Can you increase the max pitch bend range?
Post by: biolizardshadow on December 27, 2019, 21:18:22
The song I was creating had a extreme portamento section and it worked fine in the tracker, but when I put it on GBA there seemed to be some invisable cap: basically the portamento would stop after the pitch values reached +128 or -128. After doing some more research I found out that the problem was not the tracker but the way the GBA was reading the midi file. midfix4agb fixes this problem.
Title: Re: Can you increase the max pitch bend range?
Post by: ASIKWUSpulse on January 06, 2020, 22:37:31
You can, if you want to go the real manual way, open the midi-file in a midi-editor and put in the channels you want to have the bend-range go futher than 12-/+, and put a RPN parameter sequence, like this (in the event-view):

Event-Type | Data                     | Beat
CC         | 101 RPN MSB          000 | 001:01:000
CC         | 100 RPN LSB          000 | 001:01:001 <-- I've really never seen any issue with the LSB or MSB order, though " MSB Data Entry" must come last in order for the sequence to give any effect, thus why tick-offsetting is a good way to keep them in place when different midi-exporters might mess-up orders of events on the excact same timing
CC         | 6   MSB Data Entry  [xxx]| 001:01:002 <-- xxx = the range you want the pitch-bend to go (in semitone intervals)

Note though, in General Midi Level 1, as far as I know it's impossible to get a higher pitch-bend value than 128, simply because the CCs only use 7 bits, in other words, the only possible values is from 0 to 127. Some other extended midi standards like GS or XG might have an additional CC extending the range.

I noticed while reading the previous replies, right now after writing this above, that this lost a reason to be written, lol! but I post it anyway to be of help for anyone else running into a similar issue but wants to playback the midi file using MS-GS synth, etc. Note that doing this can end up messing with the pitch-bends in the midi-sequence, so be prepared for the risk of doing some additional tweaking.
Title: Re: Can you increase the max pitch bend range?
Post by: Saga Musix on January 07, 2020, 00:08:10
It's also important to note that if you edit the file manually, the pitch bends as exported by OpenMPT will no longer sound as intended (i.e. they will slide a lot faster).