just trying out scripts in usine.
the one below is very basic, it just connects one output to an input.
(in a nearly empty patch, just 2 subpatches with dummy ins/outs).
it works but it takes nearly 1 second to connect/disconnect.
so:
- is it because of some code uglyness or is that intended (i.e. this method should *not* be used in an audio context) ?
- the same thing in a "Send Usine Internal Messages module" does not have this problem (but is much less flexible).
thanks for your hints.
Code: Select all
[snip]
Procedure Callback(N:integer);
BEGIN
if (n = InCmd) then begin
if (GetValue(InCmd) = 1) then begin
cmd := 'CREATE_LINK';
end
else begin
cmd := 'DELETE_LINK';
end;
SendInternalMsg ('SET_TARGET_PATCH','SENDER_PATCH');
SendInternalMsg ('SET_TARGET_PATCH', '1', '1');
SendInternalMsg (cmd, 'foo', 'output', 'bar', 'input');
end;
END;