Re: [PD] Selfdestroying patches
De: Ronni Montoya ronni.mont...@gmail.com Hi, im opening multiple instances of a pd patch from openframeworks using the ofxPd library . My patch generates a grain, so when i create multiple instances of this patch from openframeworks it generates a granular cloud. I need that after the grain is generated ( when sound finishes) the patch can selfdestroy itself ( instance get closed) . How can i do this? Hello, you can do this with internal message menuclose to a canvas [; my_patch_name menuclose( Here is a method I've found yet to send internal messages through FUDI: http://blog.tridek.com/post/29834155461/using-libpd-with-unity3d-on-mobile-devices-part-1 In your patch create a [receive 3000] object with '3000' connected to an empty message box, then you can fill the message box with the internal message and bang it. By this way it's possible to create dynamically whatever you want in the patch, or simply close it. pc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Selfdestroying patches
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2013-11-18 11:06, Patrice Colet wrote: De: Ronni Montoya ronni.mont...@gmail.com Hi, im opening multiple instances of a pd patch from openframeworks using the ofxPd library . My patch generates a grain, so when i create multiple instances of this patch from openframeworks it generates a granular cloud. I need that after the grain is generated ( when sound finishes) the patch can selfdestroy itself ( instance get closed) . How can i do this? Hello, you can do this with internal message menuclose to a canvas [; my_patch_name menuclose( the full syntax would be [; pd-my_patch_name.pd menuclose( with my_patch_name expanded to the patch-name. so if you open a patch named foo.pd, you could do [; pd-foo.pd menuclse( the problem with this is, that it will not only destroy the patch, but make Pd commit suicide, if part of the message-chain that triggers the self-destruction is within the patch itself. e.g. if your foo.pd contains the above example and you click it, your Pd will go poof. so make sure that the destruction logic is (completely) outside of your patch. another problem is, that this method will delete *all* instances of a given name. if using an external is an option (i don't know how this is with ofxPd), the [canvasdelete] object in iemgut's might help you here: it allows single instances of abstractions to commit suicide without killing Pd. (afair it only works on abstractions, not on top-level patches though). fgmasdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQIcBAEBCAAGBQJSifDwAAoJELZQGcR/ejb4PNgP/0OoZW/we31I0NqKLmwMJquB raZSAfV117IcDXk8lCHn9vJVTdXdzkHbyukbFCEOmdm+gNc8NpG6jpOoqr3wxZzR sMI04CpaEZO0heFze1WDJjJI/v/+8ap5miizZvj5UP2fbJdiVyoe4tDduHcsXNLK BPmLPyGnUGg8MnBlOeJ7yhkeFeDuAoyEINRwVGC49JcW8T3v5WEcYtmparVa96Qt y3T3OonrJub4ud+GdpS3yLkNl7SJ+9Eh5H0bqjGNRbvJOt2smpe8pOU5cQtgLwfo kmlXgy6p3ouyb/R2773UZL8aoohIhXaD1hx3NClOn3LfLR399AnUBO4knbwgF5di 1+YWgwaEVeRd04/VW/5va4yg0JyZr+JJO/9RV6CTh0MypBw7sDXpkIrwMvXsc3Ps KT+pHFkVW5BzgPpZ1TVgO206xw29ledWJ+Xp8pXUQiFXNAu50YdhE4Rqk0nI9F0y Du0Xo14C34kUwSgiG/KYJ61VcdcWDL7TcryPifDe54d3WGjStbdS9aDMVsVci9DT 9CtDaLogje1XO4yJ9DYZ32guucmv2M+uE2Cq4E8+Y2Z0LXPZExFyxRsTQbilLYBN nrsGUXVwh6voWtfE9nP9aZ+GlOcfgbBSIdV4nCV8rvPl28LqXndzne+pj/wA3VP6 NiIhUEy0BTmoyXAL/K5y =hhQa -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Selfdestroying patches
Sine you're opening the patches via libpd through ofxPd, you already have the pointer to the patch instance. Simply use that to close each instance individually. If you want to have the patch close itself, you can have it send a message to the C++ layer with it's $0 or a custom index so you know which object to close. On Nov 18, 2013, at 6:00 AM, pd-list-requ...@iem.at wrote: From: Ronni Montoya ronni.mont...@gmail.com Subject: [PD] Selfdestroying patches Date: November 17, 2013 at 10:44:59 PM EST To: PD List pd-list@iem.at Hi, im opening multiple instances of a pd patch from openframeworks using the ofxPd library . My patch generates a grain, so when i create multiple instances of this patch from openframeworks it generates a granular cloud. I need that after the grain is generated ( when sound finishes) the patch can selfdestroy itself ( instance get closed) . How can i do this? cheers R. Dan Wilcox @danomatika danomatika.com robotcowboy.com ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] Selfdestroying patches
Hi, im opening multiple instances of a pd patch from openframeworks using the ofxPd library . My patch generates a grain, so when i create multiple instances of this patch from openframeworks it generates a granular cloud. I need that after the grain is generated ( when sound finishes) the patch can selfdestroy itself ( instance get closed) . How can i do this? cheers R. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list