Page 1 of 1

Posted: 13 Jul 2014, 12:08
by beammy
Hi, I'm wanting to control some parameters of VST plugins with the rotary encoders on a MIDI controller.

I've learned that I can create a Knob, assign that to my MIDI controller, and patch the Knob's output to my plugin's input for that parameter.

However, suppose I then change that plugin parameter from within the plugin's GUI - the Knob has no way of knowing that the parameter has changed, so remains at an incorrect position.

As an attempted solution, I tried using a second patch "cable", this time from the plugin's output for the parameter to the Knob's input, but this just led to me being unable to turn either the Knob, nor alter that parameter from within the plugin's GUI.

I've actually found a solution involving two scripts as well as the Knob. But I feel like I've introduced a lot of complexity - is there an easier way to MIDI-control a plugin parameter?

Also, for Knobs controlled by "relative" MIDI CC's, as one would do with a rotary encoder, is there any way to alter the "precision", to make it so that each "increment" is smaller, i.e. so you'd have to turn the knob many times in order to get between the max and min values?

Many thanks!

Posted: 13 Jul 2014, 14:21
by nay-seven
about midi and VSt you need some pass if change modules like this:
Image

about encoders, no easy solution, but maybe there's a way to create a patch for this

Posted: 13 Jul 2014, 16:44
by nay-seven
so here an example of a sub patch than transform a midi CC in a kind of encoder
you choose the CC number in the sub patch, and link the sub patch to the VST

Download

Posted: 13 Jul 2014, 17:09
by oli_lab
Hi !

Code: Select all

// totalisateur 2            
// à l'apparition d'un nouvel entier, il s'additionne algébriquement avec la valeur précédente de la sortie.
// sans effet si on dépasse les limites min et max
/////////////////////////

// parameters declaration
Var input, reset, min,max   : TParameter;
Var output      : TParameter;
var buff1       : SINGLE;
var buff2       : SINGLE;
var bmin       : SINGLE;
var bmax       : SINGLE;

// destroy
procedure Destroy;
begin  
 //?
 end;
// initialisation : create parameters
procedure init;
begin  
 SetModuleColor($800080+302999);
 input := createParam('in',ptDataField); 
 SetIsOutPut(input,false);
 reset:=  CreateParam('reset',PtButton);  
 SetIsOutput(reset,false);
 min := createParam('min',ptDataField);
 SetIsOutPut(min,false);
 max := createParam('max',ptDataField);
 SetIsOutPut(max,false);
 output  := createParam('out',ptDataField);
 SetIsInPut(output,false);
end;

// Global variables
//////////////////////////////
// CallBack proc
//////////////////////////////
Procedure CallBack(n:integer);
begin
if (n = min) then
bmin := getValue(min);
if (n = max) then
bmax := getValue(max);
if (n = reset) then begin
 IF (reset >= 1) THEN
  buff1 := 0;
  buff2 := 0;
end;
if (n = input) then begin
 buff1 := getValue(input);
 buff2 := buff2 + buff1;
   if (buff2 > bmax) then
   buff2 := bmax;
   if &#40;buff2 < bmin&#41; then
   buff2 &#58;= bmin;
 end;
 SetValue&#40;output,buff2/bmax&#41;;
end;

Posted: 13 Jul 2014, 17:46
by nay-seven
Thanks Oli_lab
but not sure to understand how you use it ? ;)

the patch i propose works with infinite knobs like on the BCR2000, how do you link your's...?