Author Topic: MIDI macros and sysex messages  (Read 307 times)

Offline 02FD

  • Shy artist
  • Posts: 3
  • Operating System: Windows 10
MIDI macros and sysex messages
« on: April 26, 2022, 15:22:07 »
I've been interested in using OpenMPT for MIDI hardware work, and I'd argue it's currently one of the best options for making MIDI files in a tracker interface. I know you've expressed that macros are not the solution for plugins, however (currently) they're the only solution for exporting a MIDI with Sysex messages. One of the problems with that, though, is the character limit; it sounds as though you can't change this due to file-related restrictions. So I have some questions before submitting a feature request:
1. Am I correct in my assumption that it would not be theoretically possible to use an unlimited number of characters for macro messages?
2. If possible, is it feasible?
3. Would it be possible to set custom "fill-in" values (such as "z" and "c") to get around this limit? Is there a limit on the length of the values they can represent?
Some advantadges of using the unused fill-in values I could foresee is that it allows you to re-use bytes such as the device ID fields without needing to increase the character limit. For example, in order to send data to my Roland D-110, I need to begin the sysex message with the same 4 bytes (or 8 characters) every time (excluding spaces): 41 10 16 12
If I could represent this with a user-defined lowercase value, I'd be able to use those 8 characters for the actual message data.
Apologies for the formatting issues, I'm on mobile.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,491
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: MIDI macros and sysex messages
« Reply #1 on: April 26, 2022, 15:47:12 »
There's several limits in the current macro system all inherited from the IT format:
- Macros are limited to 31 characters
- There's only 16 parametered macros and 128 fixed macros
- The macro format itself is defined by IT as well

In theory it is possible to extend the length of macro strings for the MPTM format exclusively, which would be easier than adding a new type of macro parameter. That is already mentioned here: https://bugs.openmpt.org/view.php?id=1160
However, I'm not sure if this is really the answer to this problem, since you would still be limited by the number of available macros, especially when also using them for purposes other than SysEx transfer at the same time. Configuring VST plugins with SysEx events is extremely uncommon, so usage of longer SysEx strings would be mostly exclusive to the MIDI I/O plugin - hence I had the idea of a new MIDI macro system that's part to the MIDI I/O plugin instead. Each instance of the plugin would have its own set of MIDI macros (not limited in length) that can be triggered using PC events, and optionally maybe some "setup macros" which would be sent automatically at the start of the song (e.g. to upload patches to the synth at the start of the song).
» 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 02FD

  • Shy artist
  • Posts: 3
  • Operating System: Windows 10
Re: MIDI macros and sysex messages
« Reply #2 on: April 26, 2022, 16:07:56 »
Ah! Thanks for clarifying. Yeah that would definitely be a lot easier to work with.

Offline 02FD

  • Shy artist
  • Posts: 3
  • Operating System: Windows 10
Re: MIDI macros and sysex messages
« Reply #3 on: April 27, 2022, 11:59:23 »
I am curious, though: do you plan to include macro variables be in the new I/O plugin macros? I quite like their versatility. They could also benefit from being able to offset a value instead of just filling in for one, regardless of whether this functionality ends up restricted to Zxx...

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,491
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: MIDI macros and sysex messages
« Reply #4 on: April 27, 2022, 19:29:22 »
There's no specific plans for anything, but I would assume that macros in the plugin would continue to work pretty much as-is, including variables.
» 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.