i was curious to know if you could use some kind of command inside of a message
atom in runtime mode to connect/disconnect objects/atoms together i thought
i remember reading in the past it could be done.
-
question about using messages within runtime....
-
@nthl0gik 0.all_msg.pd
You need to look at your patch in a text editor to find the "number", starting at zero and counting up to your objects (as you go down the list), of the objects you want to connect/disconnect.
The message is [connect "sending object number" "sending object outlet number (0 at left)" "receiving object number" "receiving object inlet"(
David. -
ok i looked at the text view of your sent patch & my wip patch. it looks easy enough
but i think i'll need to upload a file to show you where i'm at and then hopefully
you or someone could correct it perhaps for me with some slight added
notation. i did not quite understand as you've explained it to me at first.
sorry about that david..... -
@nthl0gik Well..... it is a strange concept to grasp.
Pd is all about messages. When you put an object on a canvas Pd gets the mouse position and sends a message to the canvas to put the object on the canvas.
What actually happens is that Pd writes a line into the text file that "is" that canvas..... and that will be saved as your "patch" when you save it........ https://puredata.info/docs/developer/PdFileFormat
The special thing about Pd is that it is always running....... so such things take effect straight away..... there is no "Run" command.But you can send those very same messages to a patch or sub-patch...... and so create objects and connect and disconnect them....... everything that you could do with the "gui" ...... the menus and the mouse.
this.zip
I have added a message that will add an object to [simple2] as well........ as you can send to the same patch. But keeping track of object "numbers" then becomes more difficult.
If you don't click the messages "Click us in order" from top to bottom, then connections will not be made, because the object "numbers" will be incorrect.Messages are the "stuff" of Pd and very powerful in dynamic patching.
David.
-
ok thanks david after looking this patch over it seems much more clear now
thanks a million !!