Thanks both.
Antoine's suggestion didn't quite work for me as I want to keep a flat folder 
structure. Alexandre's suggestion to use [savestate] put me on the right path, 
though I had to use a bit of massaging to make sure I would get a bang also the 
first time the abstraction is loaded (not only when opened after save), so I 
put together a mix of savestate and loadbang, making sure only the first bang 
from any of the two is taken into account at any time (see attached patch).
Best,
Giulio

Alexandre Torres Porres wrote on 31/12/2025 12:02:
Em qua., 31 de dez. de 2025 às 11:40, Giulio Moro via Pd-list <[email protected] 
<mailto:[email protected]>> escreveu:

    or - perhaps more simply - to have some vanilla way of sending an initbang?


I agree this is something that should belong to Vanilla. I had a PR for adding 
both [closebang] and [initbang] that had conflicts, see 
https://github.com/pure-data/pure-data/pull/616

I made a new one for [closebang] and will find my time now to add yet another 
just for initbang (I don't remember having a reason not to do that, i guess I 
was lazy?).

Now, as far as a hack goes, I believe one can try and make [savestate] behave 
like initbang, but I wouldn't know how they would differ and about any caveats 
(and I fear there might be ones). This is not something officially documented 
or supported.

Cheers and happy new year to all here in this beloved Pd community
#N canvas 403 77 475 262 12;
#X obj 159 25 loadbang;
#X obj 41 24 savestate;
#X obj 40 139 spigot;
#X obj 41 62 t b b;
#X msg 114 23 bang;
#X obj 134 91 + 1;
#X obj 99 91 f;
#X obj 99 114 == 0;
#X obj 35 204 outlet;
#X text 52 181 A single bang on creation or init. Sort of an initbang;
#X connect 1 0 3 0;
#X connect 1 1 4 0;
#X connect 2 0 8 0;
#X connect 3 0 2 0;
#X connect 3 1 6 0;
#X connect 4 0 1 0;
#X connect 5 0 6 1;
#X connect 6 0 7 0;
#X connect 6 0 5 0;
#X connect 7 0 2 1;
---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/LO6BYIZB5ODNLMHR3U6O2AFWBE7BYPDA/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/

Reply via email to