Hi,
l want to replicate certain objects a variable number of times and patch them to others automatically. Is that possible and if Yes - how?
Thanks!
Is automatic patching possible?
Hi,
l want to replicate certain objects a variable number of times and patch them to others automatically. Is that possible and if Yes - how?
Thanks!
@elden Yes, using messages, any object can be put into a patch.
I have messed about with this help file in the past, so some bits might not work.........send_messages_to_pd.pd
More info........ https://puredata.info/docs/developer/PdFileFormat
which lists the objects that can be patched and modified with messages.... at the bottom of the page it shows the parameters that can be set at the same time.
Some parameters do not set properly at creation, but if you set a receive name then you can update them afterwards with messages.
The only difficult bit is keeping track of object creation order, so as to correctly use the [connect( message to join them up.
It can be useful to set a counter that puts, with arguments, and then connects as it counts, and also spaces the objects across the patch as they are "put".......
I use it a lot for building patches of variable size......but here to build a vanilla equivalent of [matrix~]...... matrix~.zip
You will see in [matrix_test~] that there are no audio connections made. That is because the inlets and outlets of [matrix~] have been created dynamically..... they were not there when the patch was opened. You need another patch to tell [matrix_test~] to reconnect...... ... When I use [matrix~] my patch then creates [throw~] and [catch~ objects in the correct quantity and connects those to [matrix~].......... job done. I had to do that in extended anyway.
Always use input (go) and output (go next) bangs so that things build in the correct order.
Usually anything is possible in Pd.
A bit more........0.all_msg.pd
David.
Oh, thank you! That's a good start - although l don't really get the meaning of the numbers of the [connect( message, yet and what influences the positioning of an object in a patch?
@elden [obj 350 10 r test( means put [r test] at x =350 y = (minus) 10 (from top left corner)..... build_bus_panels.pd
[connect 0 0 1 0( connects the first objects first outlet to the second objects first inlet.
[connect 2 1 3 4( connects the third objects second outlet to the fourth objects fifth inlet.
... object... outlet .... object .... inlet.... as you would draw it in Pd.
It's great counting from zero isn't it......?
Better than Hex though.......
The object "id's" are the order they were created in. If in doubt put all the objects by message before you put anything in the patch manually, or count up the objects that you have already and go from that number + 1
As a rule, you need to put any permanent objects first..... as you might need to connect to them.
But if you change them... add or take away..... you will need to change all of your connect messages.
That is why I prefer to set a base number and derive all my connect messages from that using [+ n] and $ variables in the messages. Much easier like that to modify the dynamic patching.
If you are adding to an already existing patch, and want to connect to something, you will have to open the patch in a text editor and count from the top of the page down to that object (objects only) because you have no idea in what order they were created..
David.
Oops! Looks like something went wrong!