<div dir="ltr"><div>Perhaps Miller would have a better answer but I try:</div><div>When the graph is compiled, the dsp_phase value is used to set up the x_phase value of the block. Thereafter, this x_phase value is used to determine if the block should be performed or not. So I didn't test it but perhaps should try to use it with several subpatches with their own block sizes. For example, if the block size of a subpatch is 128 samples, then perhaps you'll stop the dsp in the main process at 64 samples before this subpatch was performed and when you'll restart the dsp, the block will wait only 64 samples (instead of 128) to execute its chain because dsp_phase%128 would be 64.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-18 14:12 GMT+01:00 Nicolas Danet <span dir="ltr"><<a href="mailto:nicolas.danet@free.fr" target="_blank">nicolas.danet@free.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi,<br>
<br>
Ah Ah, you are right... but that is precisely the part i understand ;-)<br>
<br>
In all the tests i did, at the time it initializes the block value phase, the (dsp_phase % block_size) result is always zero (ditto for inlet prolog). The only code where it is not zero is in the outlet epilog at < <a href="https://sourceforge.net/p/pure-data/pure-data/ci/master/tree/src/g_io.c#l518" rel="noreferrer" target="_blank">https://sourceforge.net/p/<wbr>pure-data/pure-data/ci/master/<wbr>tree/src/g_io.c#l518</a> >. But the result seems weird.<br>
<br>
a/ i did a mistake in my modified code.<br>
b/ it is used only by the one shot dsp-chain feature (that i removed in my code).<br>
c/ it doesn't do anything.<br>
d/ ...<br>
<br>
Anyway, thanks for your reply.<br>
<br>
e/ I will try to remove that stuff and wait for an hypothetical crash!<br>
<br>
----- Mail d'origine -----<br>
De: Pierre Guillot <<a href="mailto:guillotpierre6@gmail.com">guillotpierre6@gmail.com</a>><br>
À: Nicolas Danet <<a href="mailto:nicolas.danet@free.fr">nicolas.danet@free.fr</a>><br>
Cc: <a href="mailto:pd-dev@lists.iem.at">pd-dev@lists.iem.at</a><br>
Envoyé: Fri, 18 Nov 2016 13:37:20 +0100 (CET)<br>
Objet: Re: [PD-dev] More info about dsp_phase in d_ugen.c<br>
<br>
Hi Nicolas,<br>
I'm not sure but I think it's the total amount of dsp ticks since the<br>
opening of PD and it's mostly used by the block objects to know when to run<br>
their DSP blocks (something like if dsp_phase%block_size==0 then perform).<br>
<br>
2016-11-18 7:55 GMT+01:00 Nicolas Danet <<a href="mailto:nicolas.danet@free.fr">nicolas.danet@free.fr</a>>:<br>
<br>
> Hello,<br>
><br>
> I really have hard time to understand what's the dsp_phase variable<br>
> (d_ugen.c) is supposed to do.<br>
> I obtain always zero or weird values in the prolog / epilog calls.<br>
> Is it related to the one shot tick feature provided by the block object?<br>
> Thanks for clues or links to any information/discussion.<br>
><br>
> < <a href="https://sourceforge.net/p/pure-data/pure-data/ci/master/" rel="noreferrer" target="_blank">https://sourceforge.net/p/<wbr>pure-data/pure-data/ci/master/</a><br>
> tree/src/d_ugen.c#l101 ><br>
> < <a href="https://sourceforge.net/p/pure-data/pure-data/ci/master/" rel="noreferrer" target="_blank">https://sourceforge.net/p/<wbr>pure-data/pure-data/ci/master/</a><br>
> tree/src/g_io.c#l518 ><br>
><br>
> ______________________________<wbr>_________________<br>
> Pd-dev mailing list<br>
> <a href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a><br>
> <a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-dev</a><br>
><br>
<br>
</blockquote></div><br></div>