Author Topic: MIDI export and instrument envelopes  (Read 92 times)

Offline kitchen_ace

  • Shy artist
  • Posts: 2
MIDI export and instrument envelopes
« 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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,955
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: MIDI export and instrument envelopes
« Reply #1 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.
» 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.

Offline kitchen_ace

  • Shy artist
  • Posts: 2
Re: MIDI export and instrument envelopes
« Reply #2 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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,955
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: MIDI export and instrument envelopes
« Reply #3 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.
» 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.