Hans Roels wrote:
I think/hope that I managed to isolate the problem with writesf~ and readsf~. There are two patches in attach that print out every step that you take so one can't forget to click 'open' for example, it also measures the time between the 'open' and 'start' command. Copy these 2 patches in the same folder.
the answer is simple: there is a (known) bug in Pd that does not re-start the dsp-graph in some situations when live-patching. i think there is at least 1 bug-report in the sf bug-tracker.
so what happens here is: after you have started the dsp you create [rec] but for whatever reasons, the dsp-graph is not updated and thus your [writesf~] is not working at all.
you can test this by: adding [env~] plust floatatom to [osc~] in your [rec] patch. save it. then re-start Pd, open main.pd, create [rec], open it up and lo-and-behold, the numberbox might still show 0 (and is not updated by [env~])
workaround: manually restart the dsp after you have dynamically created an object: [loadbang]->[; pd dsp 0; pd dsp 1(
fgnmasdr IOhannes