Welcome to %s forums

BrainModular Users Forum

Login Register

How to create "pass if changed" output in script in HH??

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

Unread post by woodslanding » 12 May 2016, 01:24

I've tried:

setLength(output, -1);

and

setValue(output, -1);

and both A and B.

And in all cases my outputs are tied....

How can I free them up??
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 » 12 May 2016, 01:35

Okay, looks like the problem is when I use an array of tParameter--I'm trying:
[c]
for i := 0 to SEND_COUNT-1
do begin
setLength(OUTs,-1);
setValue(OUTs, -1);
end; [/c]

And just getting zeroes on output.

Regular tParameters work.
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

drakh
Member
Posts: 198
Location: Bratislava, SK
Contact:

Unread post by drakh » 12 May 2016, 13:43

for the array as output parameter use this
for i:=0 to some_number
do begin
SetDataArrayValue(your_output_data_array,i,element_value);
end;
SetLength(output_data_array,some number); //you dont need to do this after setting each value, doing it after you end the iteration is fine

if you want just send "empty array" SetLength(output_data_array,0);

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 12 May 2016, 21:28

I figured it out. I thought I had tried every combination, but I had not. This is what worked. The outputs still show 0, but they are red, and the switches they are connected to can be turned on and off by the user.

[c] for i := 0 to SEND_COUNT-1
do begin
setLength(OUTs,-1);
//setValue(OUTs, -1); // undoes the previous code!!
end; [/c]

Maybe this will help someone someday (maybe me ;))
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 13 guests