That is an awesome hack! Nice one IOhannes :D
Just did a simple test, and it seems you can just take the basic idea and wrap that up as an abstraction to use as a replacement for [initbang], wherever you need it.
Also, i tried using $0, to avoid the need for the spigot. PD console prints an error: "$0_initbang: no such object", but the bang does actually seem to be sent.
On Mon, Jul 6, 2015 at 5:51 AM, Jack jack@rybn.org wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Without this last line in the abstraction, it is possible to use something like : $ sed -i '/inlet;/d' ./dynin.pd && if [[ $(tail -n1 dynin.pd) != "_initbang bang;" ]] ; then echo "_initbang bang;" >> dynin.pd ; fi && pd dynin-test.pd Then you can save your abstraction, this is ugly but seems to work... ++
Jack
Le 05/07/2015 22:07, Jack a écrit :
Yes, nice, all is in the last line in the abstraction ;) ++
Jack
Le 05/07/2015 22:01, Roman Haefeli a écrit :
On Son, 2015-07-05 at 21:04 +0200, IOhannes m zmölnig wrote:
On 07/05/2015 08:57 PM, Alexandros Drymonitis wrote:
saving the "dynin.pd" abstraction, will break it.
[...]
abstraction. I put [r _initbang] but it won't work.
the trick is *not* to have a [r _initbang] in your patch. the trick is to generate a message sent to the "_initbang" label. this is a fragile hack, hence all my warnings; esp. the first warning "do not save" is for real - and it's not because you will save the dynamically generated objects, but because it will break the init logic.
and i would very much prefer if anybody who wants to use that trick discovers themselves how it actually works (e.g. by studying the patch i gave).
Despite your slight tone of discouragement to use such a hack, it's still a cool and smart hack. Thanks for sharing.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEcBAEBAgAGBQJVmZjeAAoJEOuluecjw8GUCsMH/jpLsZiBW21Io1sYI4f/PQYi ltCZmSvJk9/qQ1xRkEPU0TT8TTEKl62otRplT8h91J4tIR/4Z1Uuvx7601o+NpCK udRyoK3E0adleK5xcF+NjMSJTjcR7C+DItQqtIY6YQyKFESgumhjfxwQsMtMVr/d w9pAmE96bzHT6oZR/8eqhVF0ktlnY+4iw9NE8x+4eIi5JycWoFiXBy8A+pHKyfSU IdnR06WlqguW2cnHyUbYzr2JiL1dRmrWYMqkbWcPf9XBVmsuvm1EpE7/MvBWcnX6 Pr1qjA5uEPqY737QiGhhw0RPokhZPHXkpSlg/GYmf2E4+nCmg78FWW02C6V7RhU= =o5pJ -----END PGP SIGNATURE-----
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list