Welcome to %s forums

BrainModular Users Forum

Login Register

IML working for text fader, but not button

I need help on a Patch
Post Reply
woodslanding
Member
Posts: 1327
Contact:

IML working for text fader, but not button

Unread post by woodslanding » 18 Nov 2022, 06:35

This code works on the text fader, for control = 'MYTEXTFADER' and data = 'name':

Code: Select all

    SendUsineMsg('SET_TARGET_PATCH','PARENT_PATCH');
    SendUsineMsg('SET_STRING_VALUE',control,'1',data);
but this code does not seem to be changing the value of a button, for control = 'MYBUTTON' and data = '1':

Code: Select all

    SendUsineMsg('SET_TARGET_PATCH','PARENT_PATCH');
    SendUsineMsg('SET_VALUE',control,'1',data);
I can't figure out why one is working and the other is not.... do I have this syntax right?
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 18 Nov 2022, 07:00

okay, I remembered the trace within a trace, and the IML does seem to be going through:

Code: Select all

process msg SET_TARGET_PATCH PARENT_PATCH    
SET_VAR patch 4928425519550224534 = D:\WINDOWS_MOON\Desktop\HH 5\gui.pat
process msg SET_STRING_VALUE INST 1 Reaktor  
Set String Value INST 1 Reaktor
process msg SET_TARGET_PATCH PARENT_PATCH    
SET_VAR patch 4928425519550224534 = D:\WINDOWS_MOON\Desktop\HH 5\gui.pat
process msg SET_VALUE INSTMOUSE 1 1  
Set Value INSTMOUSE 1 1
process msg SET_TARGET_PATCH PARENT_PATCH    
SET_VAR patch 4928425519550224534 = D:\WINDOWS_MOON\Desktop\HH 5\gui.pat
process msg SET_VALUE INSTMOUSE 1 0  
Set Value INSTMOUSE 1 0
If I change the name of the control, I get an error saying it can't be found. However, with the inspector on the out cable of the button, I am not seeing any changes:
iml_button_issue.png
I am calling both from a processIdle thread in a script like so:

Code: Select all

if gLoadInst then
    begin
        debug('sending inst load                       @@@@@@@@@@@@@@@   INST: '  + instToLoadIN.asString);
        sendText('INST',instToLoadIN.asString); 
        gMouseName := 'INSTMOUSE';
        sendVal(gMouseName,'1');
        gMouseDown := TRUE;
        gLoadInst := FALSE;
    end;

    if gMouseDown then 
    begin
        sendVal(gMouseName, '0');
        gMouseDown := FALSE;
    end;
edit: okay, I changed the above code to 'else if gMouseDown' so the two would be sent on separate passes, and now the mouse button sometimes triggers.... I guess I'll try putting more space between IML events.

oh yes, I see, the mouse down and mouse up events ended up being sent simultaneously, so that makes sense....
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 18 Nov 2022, 08:00

okay, I put a countdown in and it seems to be working. Thanks anyway...

Always helpful to figure out how to explain your problem to someone else!!
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify


Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests