Welcome to %s forums

BrainModular Users Forum

Login Register

Setting preset name with IML

I need help on a Patch
Post Reply
gthibert
Member
Posts: 46
Location: Chicoutimi, Québec
Contact:

Unread post by gthibert » 26 Feb 2011, 20:28

Hi all,

I'm trying to set the name of a preset in preset manager using internal messages, but I can't get it to work.

I use SET_STRING_VALUE, but I can't set a value on terminals "0, 1, 2..." .

It actualy works if I set the value to a text field and link the text field to the preset terminal, but I wonder if it's possible to set it directly.

Guillaume
Guillaume Thibert
www.cemproduction.com

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 26 Feb 2011, 20:40

It should work. I've just tested it and it's ok....

If the name of your preset manager is "pm", the message will be for example:
SET_STRING_VALUE pm 4 "yo!"
Seb.Dub

gthibert
Member
Posts: 46
Location: Chicoutimi, Québec
Contact:

Unread post by gthibert » 26 Feb 2011, 20:59

I'm trying thru a script, and it does'nt work.

SendInternalMsg('SET_STRING_VALUE', 'pm', '4', 'yo!');
Guillaume Thibert
www.cemproduction.com

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 28 Feb 2011, 20:22

hi gthibert.
strange ive tested and it works here, did you made something to trig the code? set the patch as active patch? module is same renamed to PM?
here with a button i can rename correctly when clic on it, look like this:

Code: Select all

/////////////////////////
// parameters declaration
var go: Tparameter;
////////////////////////
procedure init;
begin  
go:= CreateParam('go',PtButton); SetisOutput(go,false);
end;
////////////////////////////
Procedure Callback(N:integer); 
begin
 if ((n=go) and (getvalue(go)=1)) then begin
   SendInternalMsg('SET_TARGET_PATCH','SENDER_PATCH');
   SendInternalMsg('SET_STRING_VALUE', 'PM', '4', 'yo!');
 end;
end;
/////////////////////////

gthibert
Member
Posts: 46
Location: Chicoutimi, Québec
Contact:

Unread post by gthibert » 28 Feb 2011, 23:52

Thanks,

It works,

The line SendInternalMsg('SET_TARGET_PATCH','SENDER_PATCH'); was missing in my code.
Guillaume Thibert
www.cemproduction.com

Post Reply

Who is online

Users browsing this forum: No registered users and 54 guests