ModPlug Central

OpenMPT => Help and Questions => Topic started by: kitchen_ace on May 23, 2020, 18:34:55

Title: MIDI export and instrument envelopes
Post by: kitchen_ace on May 23, 2020, 18:34:55
Hi, is there any way to have the MIDI export function of OpenMPT make use of instrument envelopes, say mapping them to the associated channel's volume/pitch wheel/panning? I realize that they don't work the same way as they do for modules, but they would still be incredibly useful to have.
Title: Re: MIDI export and instrument envelopes
Post by: Saga Musix on May 23, 2020, 19:28:26
Currently there is no automatic way to do that, and it's difficult to support this as there is no per-note volume in MIDI, only per-channel.

It's very hacky and probably not worth the effort, but what you can try is creating a MIDI macro (e.g. for MIDI CC 7, channel volume) that uses the letter "u" rather than "z" as its parameter, which would insert the current note volume including envelopes into the macro (e.g. Bc07u for CC 7). Then you'd select this macro on all channels and replace all empty effect cells with command Z00 to execute that macro.
Title: Re: MIDI export and instrument envelopes
Post by: kitchen_ace on May 23, 2020, 19:51:20
Yeah I know all volume stuff is per channel, it would still be useful IMO. But I understand it's probably hard to implement.

I'm actually using Schism Tracker to make MIDI-modules and OpenMPT to export. For MIDI output, Schism treats basically all volume commands as changing the channel's volume, which produces some interesting results sometimes but as long as you know this beforehand it's usable.

Anyhow thanks for the quick reply, I'll give the macro thing a try.
Title: Re: MIDI export and instrument envelopes
Post by: Saga Musix on May 23, 2020, 19:53:21
I forgot, you should actually use \00 instead of Z00 for a MIDI macro that is evaluated on every tick. Otherwise the envelope will only be evaluated on the first tick of the row.