I've made an abstraction with an arbitrary number of inlets, and in extended you can save it in a patch as its connections will be maintained (using [initbang] to create the inlets), but in vanilla it's not possible cause I'm using [loadbang] and Pd fails to make the connections (as the inlets are being created after the patch has been loaded).
Is there a way to achieve the [initbang] effect in vanilla? Or is there any intention to include [initbang] in a future vanilla release?
Also, can't seem to find any initbang.c or initbang.pd_darwin. I guess it's in a file that contains more classes and is called something else. Is there a way to find a binary or code to compile, so I can use [initbang] in vanilla on os x?
On 07/05/2015 11:56 AM, Alexandros Drymonitis wrote:
Is there a way to achieve the [initbang] effect in vanilla?
hmm. most externals i know of have been coded as externals because there is *no* way to achieve the same effect in Pd-vanilla (rather than - say - for efficiency reasons). so the simple answer is: no, there is no way.
but well: there are new generic classes to Pd added with every release, so I guess what you wanted to ask is whether [initbang] could be done in Pd-vanilla with recent enough versions.
the answer is still: no.
otoh, if you don't mind dirty tricks, the answer could also be "yes". see attached patch. saving the "dynin.pd" abstraction, will break it. using a different version of Pd might also break it. it might have undesired side effects. don't file bug-reports against Pd if the abstraction ever stops working. you have been warned.
Or is there any intention to include [initbang] in a future vanilla release?
iirc, there has been lengthy discussion about this on the list and on the bug tracker. the short answer is: "no, not in the current form". afair, miller would prefer an argument to [loadbang] to select initbang behaviour. and probably an alltogether different design.
Also, can't seem to find any initbang.c or initbang.pd_darwin. I guess it's in a file that contains more classes and is called something else. Is there a way to find a binary or code to compile, so I can use [initbang] in vanilla on os x?
no. [initbang] needs fundamental changes to the Pd-core. afaik it is impossible to implement it as an external.
fmgdsar IOhannes
On Sun, Jul 5, 2015 at 9:19 PM, IOhannes m zmölnig zmoelnig@iem.at wrote:
otoh, if you don't mind dirty tricks, the answer could also be "yes". see attached patch. saving the "dynin.pd" abstraction, will break it. using a different version of Pd might also break it. it might have undesired side effects. don't file bug-reports against Pd if the abstraction ever stops working. you have been warned.
I don't mind dirty tricks, but using this technique doesn't work with my abstraction. I put [r _initbang] but it won't work. I've attached the abstraction cause it might be easier to get some help...
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).
mgdt IOhannes
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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
-----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
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
On 07/06/2015 04:41 AM, i go bananas wrote:
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.
the problem with that abstraction is, that the initial bang will be fired before the parent patch is connected, effectively rendering the abstraction useless.
gfmdsar IOhannes
oops. yeah, i monged it up.
Had forgotten to delete the dynamically created inlets from my test patch. :p
On Sun, Jul 5, 2015 at 10:04 PM, IOhannes m zmölnig zmoelnig@iem.at 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)
Didn't realise I should study the patch in its text form... Jack made this clear. Now it works, thanks!