Author Topic: Another Question about MIDI macros?  (Read 1198 times)

Offline biolizardshadow

  • Inspired artist
  • **
  • Posts: 53
  • Operating System: Windows 10
Another Question about MIDI macros?
« on: November 06, 2020, 18:00:40 »
I just noticed that the MIDI macros export on the proper channel until channel 10 where the macro will stay on channel 9. I have heard you say on other posts that channel 10 is reserved for percussive instruments, what I don't understand is that anything beyond channel 10 is when the macro stops exporting properly. For example using the Zxx macro on channel 11 will export that macro to channel 10 while the software exports the notes to channel 11 and it keeps doing this for some reason and I don't know if I'm doing something wrong or if its a bug or something. It also does this on the example file you uploaded a while back.

I am also using the latest version of OPENMPT

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,333
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Another Question about MIDI macros?
« Reply #1 on: November 06, 2020, 18:58:00 »
Looking at the code, there are indeed some issues with MIDI macros, they use a different, inconsistent code path for calculating the MIDI channel. Should be fixable for the next release.
» 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 biolizardshadow

  • Inspired artist
  • **
  • Posts: 53
  • Operating System: Windows 10
Re: Another Question about MIDI macros?
« Reply #2 on: November 06, 2020, 20:11:47 »
Thanks

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,333
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Another Question about MIDI macros?
« Reply #3 on: November 07, 2020, 10:56:28 »
If you need the fix right now, you can download build 13810 of OpenMPT 1.29 from https://builds.openmpt.org/builds/ which should fix this bug. Otherwise, it will of course be part of the next regular OpenMPT 1.29 update.
» 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 phanoo

  • Inspired artist
  • **
  • Posts: 61
Re: Another Question about MIDI macros?
« Reply #4 on: December 08, 2020, 23:05:59 »
I've been struggling a bit using midi macros with an external expander. How do you ensure they play on a specific MIDI channel ?

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,333
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Another Question about MIDI macros?
« Reply #5 on: December 09, 2020, 08:07:25 »
You can use the lower-case 'c' macro letter, which will be replaced by the MIDI channel of the instrument that last played on that tracker channel. For example, if you play macro "Bc0140" (mod wheel set to 64) on a channel where the last played instrument is set up to use MIDI channel 3, the resulting message will look like "B30140".
If there is no previous note played on that channel, you can also hardcode the MIDI channel but that might be difficult if you have lots of MIDI channels. Maybe in that case playing a very quiet note and instantly stopping it again could help.
For that latter case, I would like to have some "system setup macros" in the future which are automatically transmited at the start of a song. But we're not quite there yet. :)
» 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 phanoo

  • Inspired artist
  • **
  • Posts: 61
Re: Another Question about MIDI macros?
« Reply #6 on: December 09, 2020, 10:15:24 »
Yes that would be cool !

I noticed these quirks when I started using external MIDI gear with OpenMPT, you can clearly see it wasn't made for that purpose but I'm just too addicted to it ;D

I made this track using only MIDI commands with OpenMPT, controlling an EssenceFM synth: https://www.youtube.com/watch?v=w-ZbshW2l48

It's quite easy when you setup everything directly on the synth (patches, poly/mono modes, channel volumes, panning, effects) but using an old EMU Virtuoso 2000 synth is much more complicated for example, as it has to be setup almost entirely by MIDI.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,333
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Another Question about MIDI macros?
« Reply #7 on: December 09, 2020, 10:25:31 »
I feel the pain :) As said, it's something I would like to have as well, but figuring out a good design for this feature requires some more work. Ideas I have:

- Since those system setup macros can take a while to transmit, they should maybe only be transmitted on the first play, and optionally at any later point
- I want to have an extension of the Zxx mechanism specifically for the MIDI I/O plugin; maybe each plugin instance would have its own set of macros that could be triggered with PC events. Maybe? I'm really not sure how well that would work.
» 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 phanoo

  • Inspired artist
  • **
  • Posts: 61
Re: Another Question about MIDI macros?
« Reply #8 on: December 09, 2020, 10:39:31 »
I was thinking about having a set of customizeable 'MIDI setup macros' (not single MIDI commands but lists of MIDI commands) that you call with a single command in the tracker. Then it's up to the user to call them only at the beginning or in the middle of the song. Absolute best would be to have some kind of history that automatically sends MIDI setup macros that happened before the position where the playback was resumed. (like OpenMPT already do for Tempo)

Not sure if it's a good idea, just brainstorming here. And of course that isn't easy to implement, I know  ;D

Easier: a "global midi setup command list" automatically sent at the beginning of the song would already be good enough for most cases really.
« Last Edit: December 09, 2020, 10:43:05 by phanoo »

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,333
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Another Question about MIDI macros?
« Reply #9 on: December 09, 2020, 18:03:48 »
Yes, that's essentially the second option I mentioned. The first one has the advantage that slow MIDI messages (e.g. huge SysEx dumps) could be configured to be just sent when the song is opened, but not every time playback is restarted.
» 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.