Page 1 of 1

Posted: 14 Sep 2012, 09:34
by joffo78
Hi
i try to make a script based on the advanced iml patch.
My goal is to control every kind of parameters on every line and track. i'd like to choose target line and tracks.
this is the script:
/////////////////////////////////////////////
// Send value to vst param
////////////////////////////////////////////

// parameters declaration
var input1 : Tparameter;
var input2 : Tparameter;
var input3 : Tparameter;
var input4 : Tparameter;
var input5 : Tparameter;
var s : String;


// destroy
procedure Destroy;
begin
end;

// initialisation : create parameters
procedure init;
begin
Input1 := CreateParam('plug name',ptTextField);
Input2 := CreateParam('param name',ptTextField);
Input3 := CreateParam('param value',ptDataField);
Input4 := CreateParam('track',ptDataField);
Input5 := CreateParam('line',ptDataField);

SetIsOutPut(Input1,false);
SetIsOutPut(Input2,false);
SetIsOutPut(Input3,false);
SetIsOutPut(Input4,false);
SetIsOutPut(Input5,false);


end;


procedure Callback(n:integer);
var i : integer;
begin
SendInternalMsg('SET_TARGET_PATCH (Input4)(input5)');
if n =1 //retreive the old value
then begin
SendInternalMsg ('GET_VALUE',GetStringValue(Input1),GetStringValue(Input2),'THEPARAMVALUE');
SendInternalMsg ('SET_VALUE','PARAM','1','THEPARAMVALUE');
end
else begin
SendInternalMsg('SET_VALUE',GetStringValue(Input1),GetStringValue(Input2),FloatTostr(GetValue(Input3)));
end;

end;

// no process bloc
input4 & input5 are variables to choose target.
Actually it dosen't work.
Does somebody could help me ?
Thanks.
Joffo

Posted: 14 Sep 2012, 15:17
by joffo78
For who is interested to try i posted an example which doesn't work at this time : here
this patch contains a script very usefull because when you change control all parameters are recalled.
But for now i don't manage to send parameters on another track and line than sender patch

Posted: 14 Sep 2012, 21:59
by r.erorr
Hi, joffo78
How exactly do you want control tracks and lines - like this?
http://www.sensomusic.com/forums/upload ... nes_01.wkp

Posted: 14 Sep 2012, 23:12
by joffo78
thanks a lot
The trouble with your solution is value isn't send to master knob so the values of the targets are not constants

Posted: 14 Sep 2012, 23:13
by joffo78
Have a look on this : http://www.sensomusic.com/forums/upload ... matext.wkp
It works but it would be a little less tricky with script solution

Posted: 15 Sep 2012, 05:25
by joffo78
For your method you could do that : another