Another Question about MIDI macros?

Started by biolizardshadow, November 06, 2020, 18:00:40

Previous topic - Next topic

biolizardshadow

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

Saga Musix

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.

biolizardshadow


Saga Musix

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.

phanoo

I've been struggling a bit using midi macros with an external expander. How do you ensure they play on a specific MIDI channel ?

Saga Musix

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.

phanoo

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.

Saga Musix

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.

phanoo

#8
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.

Saga Musix

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.