Hi list!
I have a patch for automatic scripting different objects--lets say : i create 10 [metro]s among each other next to them 10 [random]s how can i connect them automatically? Has someone got a simple patch showing that?
thx Gerda
Hallo, Gerda Strobl hat gesagt: // Gerda Strobl wrote:
I have a patch for automatic scripting different objects--lets say : i create 10 [metro]s among each other next to them 10 [random]s how can i connect them automatically?
You need to generate "connect" messages, whose syntax is as follows:
"connect obj_A outlet_A obj_B inlet_B"
obj_A, outlet_A, obj_B, inlet_B are all numbers.
The meaning of outlet_A and inlet_B should be clear, but note, that in/outlets are numbered starting with 0.
obj_A and obj_B also are numbers, they are given according to creation order. So basically you need to keep track of these numbers yourself. The object that was created first gets the number "0", the second is number "1", the third gets a "2" and so on.
If you created these objects using dynamic messages:
obj 10 0 metro 100 obj 10 25 random 200
then this message will connect the metro to the random as you would usually do by hand:
connect 0 0 1 0
The metro is obj_A==0, the random is obj_B==1, and we use both outlet and inlet 0, that is, the first.
If you then create another object, say a sender:
obj 10 50 send randoms
You can connect the "random" to the "send" using:
connect 1 0 2 0
Now guess, what adding this will do:
obj 0 0 tgl connect 3 0 0 0
Attached is an example.
Frank Barknecht _ ______footils.org__
_ __latest track: "plak" @ http://footils.org/cms/show/44
I have a patch for automatic scripting different objects--lets say : i
create 10 [metro]s among each other next to them 10 [random]s how
can i connect them automatically? Has someone got a simple patch showing that?
dyn~? live can be so easy ;-)
t