ModPlug Central

OpenMPT => Help and Questions => Topic started by: biolizardshadow on December 06, 2020, 03:41:45

Title: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: biolizardshadow on December 06, 2020, 03:41:45
I've noticed that there seems to be a ceiling and a floor to as to how far you can change the pitch of a note when exporting to midi. Is there a way around this?
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: Saga Musix on December 06, 2020, 11:00:02
Unlike in tracker modules, the MIDI pitch wheel isn't unbounded but always has a fixed note range in which it can operate, and this note range has to be configured upfront. By default, OpenMPT uses a range of +/-12 semitones for sample-based instruments because
1) it's sufficient in most cases and
2) while the theoretical maximum resolution of the pitch wheel is 14386 discrete values (14 bit), a number of synths only supports 7 bit pitch wheel events with 128 discrete values. At +/-12 semitones pitch wheel depth, that's just ~5 pitch wheel steps per semitone.
Hence the default is a tradeoff between flexibility and accuracy.

For plugin-based instruments, OpenMPT uses the pitch wheel depth as configured in the instrument tab. So one possible workaround to increase the pitch wheel depth for a single sample-based instrument is to temporarily turn it into a plugin-based instrument and then set up its pitch wheel depth as desired.
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: biolizardshadow on December 06, 2020, 16:56:04
Are there any recommended vst's that can do that?
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: Saga Musix on December 06, 2020, 16:58:11
You can just load any plugin, it doesn't matter for the MIDI conversion process.
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: biolizardshadow on December 06, 2020, 17:02:15
So I can load an empty plugin and it will work? Also, there is no other way for the user to configure this within openmpt?
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: Saga Musix on December 06, 2020, 17:04:27
Looking at the code, you probably just need to assign any plugin slot to the instrument, it can even be an empty one, then it will use the pitch bend range as defined in the instrument tab. It doesn't do that if no plugin is assigned at all because then it would just use the default value 99% of the time (2 semitones), which is too little, so it defaults to 12 instead.
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: biolizardshadow on December 06, 2020, 17:11:35
So then, how do I get that channel to only play the sample instrument instead of the VST instrument cause now it's playing both.
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: Saga Musix on December 06, 2020, 17:12:29
Again, this is only a workaround for MIDI export. I didn't expect that you would do this for playing the module inside OpenMPT. There is no way to have both options at the moment.
Title: Re: Is there a limit to how far you can bend the pitch of a note with midi?
Post by: biolizardshadow on December 06, 2020, 17:14:24
I found a work around! Thanks for the advice you provided earlier! :)