Is there a limit to how far you can bend the pitch of a note with midi?

Started by biolizardshadow, December 06, 2020, 03:41:45

Previous topic - Next topic

biolizardshadow

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?

Saga Musix

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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

biolizardshadow


Saga Musix

You can just load any plugin, it doesn't matter for the MIDI conversion process.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

biolizardshadow

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?

Saga Musix

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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

biolizardshadow

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.

Saga Musix

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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

biolizardshadow

I found a work around! Thanks for the advice you provided earlier! :)