in another thread, i learned, that it's possible to create abstractions,object, messages,(...) dynamical by sending messages to a patch.
now my question: is it also possible to delete those dynamic created objects? for exampel i send a message [; pd-test obj 50 50 osc~ 250( to create an osc~ object with a frequency 250 herz inside the subpatch "test" - is there a way to delete this object again, also dynamically by sending a messsage to the "test" subpatch?
-
Dynamic creation of objects
-
Yes.
You can CLEAR a subpatch (unfortunately i don't know of a way to delete ONE object inside a subpatch. But there are workarounds.
I joined a patch, made by Enrique Erne (the creator of Mmm), that will explain it waaaaay better than i would.
When the winds of change are blowing, some people are building shelters while others are building windmills...
-
You can also delete a single object without clearing all the subpatch. I have done a little trick in my multitouch sound app (http://raphael.isdant.free.fr/polychroma3.htm):
Just send a "find" then a "cut" message to your subpatch instead of a "clear
[find myobject, cut(
-
Yai,
Thanks, mrproper. That is very helpful.
When the winds of change are blowing, some people are building shelters while others are building windmills...
-
indeed, a good idea! i try to figure out a technic to dynamically increase/decrease the amount of objects in a patch - this could be the first step to a solution.
i guess, it could be very useful for example, when you want to change the count of voices of a synthesizer or something similar... -
if you know the position <100 100> eg from dynamic creation you can also do:
-first:
[vis 1, editmode 1(
|-then:
[mouse 100 100 0 0 0, cut, mouseup 100 100 0(
|well see attached
-
wow, this is awesome! where can i find more information about this? in the help-browser i couldn't find much...
-
in Pd-extended-0.41 its in
doc/additional/pd-msg