Can you change plugin presets mid-song?

Started by KaijuMan, June 06, 2024, 02:45:37

Previous topic - Next topic

KaijuMan

As the title implies, I'm wondering if there is a way to switch between plugin presets in the pattern editor, not unlike modifying individual parameters with Zxx macros.

For context, I have a guitar VST that has various built-in sample groups and ASDR settings; I want to be able to use one VST instrument and change guitar sounds in the middle of a song without needing another VST.

Harbinger

This is done thru MIDI messages for bank and program changes. It only works though for MIDI-capable VSTI's, and you'll need to know the preset number you want to switch to. I dont think its currently possible without MIDI messages.

Fortunately the devs lined up the numbers with Modplug in a recent version, so you now you dont have to subtract one from the parameter value. Just use the exact preset index number.

This capability is in the online manual. 

KaijuMan

Quote from: Harbinger on June 06, 2024, 12:41:37This is done thru MIDI messages for bank and program changes. It only works though for MIDI-capable VSTI's, and you'll need to know the preset number you want to switch to. I dont think its currently possible without MIDI messages.

Fortunately the devs lined up the numbers with Modplug in a recent version, so you now you dont have to subtract one from the parameter value. Just use the exact preset index number.

This capability is in the online manual.

Thanks, I'll test this out later today if I can.

KaijuMan

I've been fiddling around with MIDI messages for about an hour now, but I haven't been able to get it working. The MIDI Mapping window doesn't seem to have any way of accessing the preset index of a VSTI, and I can't find what I'm looking for in the manual.

What section of the manual would cover bank and program changes?

Saga Musix

MIDI mapping is the wrong place; there are two solutions to this problem:

In the [Plugin/MIDI section](https://wiki.openmpt.org/Manual:_Instruments#Plugin_.2F_MIDI) of the instrument tab, specify the program (1-128) and potentially bank (if you need to access the 129th preset onwards; you can type in a number large than 128 into the program field and it will automatically calculate the correct MIDI bank). Note that the following quote from above:
QuoteFortunately the devs lined up the numbers with Modplug in a recent version, so you now you dont have to subtract one from the parameter value
is entirely implementation-specific; plugins can start numbering the presets in their GUI from 0 or 1 however they please, and OpenMPT has no influence over that. Program numbers within OpenMPT are 1-based, as they are in many plugins, but not all.

You can duplicate the current instrument by shift-clicking the New Instrument button to create a second instrument for this particular plugin, and then assign a different program number to that instrument.

The alternative solution, if you for some reason don't want to create multiple instruments, involves MIDI macros. You can choose "MIDI program change" from the dropdown list of available presets, and then a MIDI program change message will be assigned to the currently selected macro. Then you can use command Z from the pattern to change the currently active program on that channel. I'd strongly recommend to go with the first solution though.
» 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.

KaijuMan


KaijuMan

I tried fiddling around with the program number, the bank number, or both in several plugins, but there seems to be no effect whatsoever.

Saga Musix

If you tell us which plugins you tried, we might be able to tell what's the exact issue - but as mentioned, the plugins in question need to support MIDI program change messages, which is not the case with every plugin. If nothing happens when changing the MIDI program in the corresponding instrument, chances are high that this plugin doesn't support program changes in any way. Sometimes a look into the manual may reveal if there are other MIDI messages the plugin responds to that could help working around the problem.
» 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.

KaijuMan

#8
The plugins were:
FunkBass 3
ttm012
DSK ElectriK GuitarZ (in retrospect, this one handles its presets differently, and I think can be changed via macros.) EDIT: Sort of. This one's a bit glitchy in the final sound, and some presets don't seem to be set-able via Zxx.

Saga Musix

I did test ttm012 and can confirm that it does not respond to any program changes, so right now the only way to change a program would be by automating all its parameters. Given how lightweight that particular plugin is, just loading a second plugin instance is probably a wiser solution though. The plugin also appears to still receive updates now and then, so one possibility is always to just ask the plugin author if they would be willing to add support for MIDI program change messages.
» 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.

KaijuMan

So, basically, if a VSTI supports program changes, I have a direct solution; if not, then work around it as usual?

Saga Musix

Yes, that's essentially it. As plugins run arbitrary code, OpenMPT (or any other DAW) has no say over what kind of features they can or cannot support, so unfortunately it completely depends on the plugin to offers this functionality.
» 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.

KaijuMan

Well, it can't be helped. At least I got a partial solution, so thanks for that.