How to map a MIDI CC to multiple parameters?

SDK for VST 3 audio plug-in and host development.
Arne Scheffler
Posts: 291
Joined: Mon Jun 20, 2016 7:53 am

Re: How to map a MIDI CC to multiple parameters?

Post by Arne Scheffler » Thu Jun 23, 2016 12:12 pm

Urs wrote: You also get a race condition when there's automation while the users turns a knob on the user interface with his mouse.
You won't get this race condition if you let the host do this stuff.
If the user turns a knob on the UI-Editor of the plug-in the plug-in sends this change to the host. The host sends this change to the audio processor in the process call and can temporarily turn off sending automation changes until the user ends editing the knob.
Urs wrote: Back to the original topic, we allow for MIDI Learn of multiple controllers to the same parameter because users requested this. For instance, they have one setup with a foot pedal and another setup with a knob on a controller keyboard. One is in their studio, the other one is on stage.
The VST3-Spec does allow to set multiple parameters with the same MIDI CC.
If this doesn't work in the hosts, than I would think that this is a bug in these hosts.

abique
Posts: 39
Joined: Tue Jun 21, 2016 12:43 pm

Re: How to map a MIDI CC to multiple parameters?

Post by abique » Thu Jun 23, 2016 12:21 pm

Arne Scheffler wrote: The VST3-Spec does allow to set multiple parameters with the same MIDI CC.
If this doesn't work in the hosts, than I would think that this is a bug in these hosts.
According to IMidiMapping:

Code: Select all

class IMidiMapping: public FUnknown
{
public:
	virtual tresult PLUGIN_API getMidiControllerAssignment (int32 busIndex, int16 channel,
															CtrlNumber midiControllerNumber, ParamID& id/*out*/) = 0;

	static const FUID iid;
};
We can only map one parameter to one MIDI CC.

If you agree to provide an other interface where we would have:

Code: Select all

virtual tresult PLUGIN_API getMidiControllerAssignments (int32 busIndex, int16 channel,
															CtrlNumber midiControllerNumber, List<ParamID>& ids/*out*/) = 0;
That would be the solution to this topic.

Urs
Posts: 9
Joined: Thu Jun 23, 2016 11:11 am

Re: How to map a MIDI CC to multiple parameters?

Post by Urs » Thu Jun 23, 2016 1:02 pm

Arne Scheffler wrote:
Urs wrote: You also get a race condition when there's automation while the users turns a knob on the user interface with his mouse.
You won't get this race condition if you let the host do this stuff.
The point is, we *are* letting the host handle the stuff in VST3. We are just asking that Cubase (et al) support assignment of multiple MIDI Controllers to one single parameter.

We have actually rewritten our VST3 implementation to fully conform with your designs. We just ask for simple improvements where the design of VST3 does not allow for the same user experience as our implementation of other plug-in formats.

Urs
Posts: 9
Joined: Thu Jun 23, 2016 11:11 am

Re: How to map a MIDI CC to multiple parameters?

Post by Urs » Thu Jun 23, 2016 1:06 pm

To clarify: In our previous installment of VST3 we published 2048 proxy parameters to the host, in order to allow for MIDI Learn. This could lead to race conditions as you describe.

In our current installment, parameters are linked directly, as per your specification. Hence we let the host handle things and all is good.

But we still need the N to M assignment of controllers and parameters, where N and M are >= 1

Arne Scheffler
Posts: 291
Joined: Mon Jun 20, 2016 7:53 am

Re: How to map a MIDI CC to multiple parameters?

Post by Arne Scheffler » Thu Jun 23, 2016 1:46 pm

abique wrote:According to IMidiMapping:

Code: Select all

class IMidiMapping: public FUnknown
{
public:
	virtual tresult PLUGIN_API getMidiControllerAssignment (int32 busIndex, int16 channel,
															CtrlNumber midiControllerNumber, ParamID& id/*out*/) = 0;

	static const FUID iid;
};
We can only map one parameter to one MIDI CC.
I stand corrected, I did read the spec not the API.

We will discuss this at Steinberg how we can put this into an API.

abique
Posts: 39
Joined: Tue Jun 21, 2016 12:43 pm

Re: How to map a MIDI CC to multiple parameters?

Post by abique » Thu Jun 23, 2016 1:58 pm

Arne Scheffler wrote:We will discuss this at Steinberg how we can put this into an API.
Ideally we would need something like this:

Code: Select all

/* implemented by the host */
class IMidiLearnProvider: public FUnknown
{
public:
  /* starts a midi learn from the host */
  virtual tresult PLUGIN_API startMidiLearn(ParamID id) = 0;

  virtual tresult PLUGIN_API stopMidiLearn() = 0;
};

/* implemented by the plugin */
class IMidiMapping2: public FUnknown
{
public:
  virtual tresult PLUGIN_API getMidiControllerAssignments(int32 busIndex,
                                                          int16 channel,
                                                          CtrlNumber midiControllerNumber,
                                                          IList<ParamID>& ids/*out*/) = 0;

  /* callback from IMidiLearnProvider::startMidiLearn().
     the plugin must check the status (in case it has been canceled by the host. */
  virtual tresult PLUGIN_API midiLearnFinished(int32 busIndex,
                                               int16 channel,
                                               CtrlNumber midiControllerNumber,
                                               ParamID id,
                                               tresult status);

   static const FUID iid;
};
Thank you very much!

maker
Posts: 22
Joined: Wed Aug 31, 2016 6:33 am

Re: How to map a MIDI CC to multiple parameters?

Post by maker » Thu Oct 06, 2016 3:59 am

Where does this issue stand right now ? I need several parameters all map to the same 4 CC's (NRPN) just sending different values.

abique
Posts: 39
Joined: Tue Jun 21, 2016 12:43 pm

Re: How to map a MIDI CC to multiple parameters?

Post by abique » Thu Oct 06, 2016 8:51 am

You're best chance is to create a bunch of virtual parameters to capture the MIDI CCs...

maker
Posts: 22
Joined: Wed Aug 31, 2016 6:33 am

Re: How to map a MIDI CC to multiple parameters?

Post by maker » Sat Oct 08, 2016 9:13 am

@Abique, Thanks for your reply. Yes that works fine for receiving NRPN's. The issue I am having is how to send the CC's out. So far in the DAWs I have I don't see CC been transmitted when changing an automated parameter (Live, Bitwig in Windows). Posted the issue here as well.
viewtopic.php?f=4&t=158

Post Reply