Welcome to %s forums

BrainModular Users Forum

Login Register

CREATE_LINK confusing behavior... A couple of questions!

I need help on a Patch
Post Reply
shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 07 Sep 2014, 01:39

All -

I'm learning IML... Sorta...

If I create a module from a subpatch, e.g.:
CREATE_MODULE xyz 6 100 100 mypatch.pat

it works great, though the module's caption says it is "mypatch"
Any attempt to use xyz, e.g.,
CREATE_LINK xyz OUT somethingelse IN

and I get a "Var Not Found XYZ"

Question 1: Should I be able to use xyz as a modulename in CREATE_LINK?

Question 2: Where is the module name visible? Everywhere I look I cannot see xyz, I see "MYPATCH" - the subpatch's filename?

If I use the #s, e.g.,
CREATE_LINK 17 2 13 0
everything works great....

Curious, but if I use a:
CREATE_LINK 17 OUT 13 IN (using the terminal's names, not indexes)
everything works great, however, it ALSO tells me
Var Not Found OUT
Var Not Found IN
even though it worked.

Probably noob questions...

Shawn

4/30/15 edit: This was a bug & it was fixed in HH2.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 09 Sep 2014, 10:01

as said in the IML page
The module type is set by the parameter id , then the module is renamed with the modulename.

so
CREATE_MODULE vol 4 100 100 // creates an audio volume module ( because of it's ID 4) , then rename this module vol

so
CREATE_MODULE xyz 4 100 100 // creates an audio volume module and will rename it xyz

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 09 Sep 2014, 21:43

Understood.

Feels like it's not working for subpatches. Still no luck.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 10 Sep 2014, 04:30

I can't tell if this is a bug affecting subpatches, or if I'm just missing something.
The following demonstrates the issues with CREATE_LINK with subpatches.
I have similar issues elsewhere using IML with subpatches.
Shawn

The following code works great:
CREATE_MODULE GEORGE 4 200 200
CREATE_MODULE SUSAN 4 400 200
CREATE_LINK GEORGE 'OUT 1' SUSAN 'IN 1'

And reports the following in the console (the 'Var not found' messages are erroneous, because the link was formed correctly):
process msg CREATE_MODULE GEORGE 4 200 200
Create module TpgVolume_audio 261
SET_VAR String LAST_CREATED_MODULE_NAME = GEORGE
process msg CREATE_MODULE SUSAN 4 400 200
Create module TpgVolume_audio 261
SET_VAR String LAST_CREATED_MODULE_NAME = SUSAN
process msg CREATE_LINK GEORGE OUT 1 SUSAN IN 1
Var not found GEORGE
Var not found OUT 1
Var not found SUSAN
Var not found IN 1

But this does not (IN & OUT are terminals & LIFEPATCH.pat is a subpatch that works fine):
CREATE_MODULE GEORGE 6 200 200 lifepatch.pat
CREATE_MODULE SUSAN 6 400 200 lifepatch.pat
CREATE_LINK GEORGE OUT SUSAN IN

This is reported in the console:
process msg CREATE_MODULE GEORGE 6 200 200 LIFEPATCH.PAT
Create module TPgInput_DATA 20
Create module TPgOutput_Data 21
Create module TpgShape 334
Create module TpgPass_Event 157
Create module TpgEqual 49
Create module TpgEqual 49
Create module TpgOr 51
Create module TpgPlus1 291
Create module TPgInput_DATA 20
Create module TpgSelector_Color 342
Create module TpgColor_Chooser 223
Create module TpgSub_Patch 6
SET_VAR String LAST_CREATED_MODULE_NAME = GEORGE
process msg CREATE_MODULE SUSAN 6 400 200 LIFEPATCH.PAT
Create module TPgInput_DATA 20
Create module TPgOutput_Data 21
Create module TpgShape 334
Create module TpgPass_Event 157
Create module TpgEqual 49
Create module TpgEqual 49
Create module TpgOr 51
Create module TpgPlus1 291
Create module TPgInput_DATA 20
Create module TpgSelector_Color 342
Create module TpgColor_Chooser 223
Create module TpgSub_Patch 6
SET_VAR String LAST_CREATED_MODULE_NAME = SUSAN
process msg CREATE_LINK GEORGE OUT SUSAN IN
Var not found GEORGE
Can't create/delete link GEORGE OUT SUSAN IN
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 13 Sep 2014, 19:26

Never got this to work. (CREATE_LINK between subpatches.)

The beauty of HH, though, is that there a many ways to do what you wanna do...

I found a way to automate using the #s, e.g.,
CREATE_LINK 17 2 13 0

After numerous attempts, I couldn't get IML to talk to modules within a subpatch. Sure looks like it should do that (I think this is another symptom of the same problem...). Rather than pull my hair out, I just created data inputs, negating the need to communicate directly to a module within the subpatch.

There's always an alternative approach to get the job done. I *really* love that about HH.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 30 Apr 2015, 06:59

Followup...

This now works in HH2.

Still get the erroneous 'Var not found' messages though. But the links are properly created in subpatches now.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 30 Apr 2015, 07:21

Nb you sometimes have to manually rename an item to access it via iml. This via clicking with alt or ctrl i dont remember on a module header.on top of the actal name.

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 30 Apr 2015, 15:50

Thanks, good to know.

Hard to do in the middle of a script, though.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 30 Apr 2015, 17:45

yup but i mean man should rename it only once at start Befor anything is done. before iml access it. Like "myfader" at a header name, not just item caption. and this should be then the "id adress" used within the scrip Or sendiml module.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 30 Apr 2015, 17:50

Oh sorry i just get what ya mean by in middle of a script mm

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests