[PD] [env~] issues

Jonathan Wilkes jancsika at yahoo.com
Tue Dec 16 16:59:02 CET 2014

That's definitely a workable solution.
But if it were truly "trivial" then [trigger] wouldn't exist.

     On Tuesday, December 16, 2014 8:47 AM, IOhannes m zmölnig <zmoelnig at iem.at> wrote:

 On 12/15/2014 11:53 PM, Raphaël Ilias wrote:
> Ok, I get the trick, it seems similar to  the one used to make delay line
> shorter than one block.
> However, I still feel that an object "give-me-RMS enveloppe-on-bang" (for
> the last N samples or blocks) would appear to me an easier way to handle
> this case.
> If it doesn't exist, I'll try to build something like this... one day !
> Many thanks !

oh, but that is just trivial:

messages and signals are always calculated one after each other (first
all messages; once they are done, signals are processed).

so an even easier way would be to use a latch ([f]) and [bang~]+[del 0]
to do the calculation in msg-domain.
[bang~] will output a bang before each signal block (or after; it really
will trigger a bang before the *next* signal block).
unfortunately, this bang can happen before or after the events sent out
by [env~], so we need to make sure to get an event *after* all [env~]s
have triggered.
the simplest way to achieve this is by using an additional [delay 0],
which will schedule an event at the same logical time NOW but after all
events already scheduled for NOW (e.g. those from [env~]).

see attached patch. (in the attached patch i wasn't able to trigger an
undesired behaviour without the [delay 0]; however i haven't tried hard
and i'm pretty sure that you *can*; thus you should use [del 0])

Pd-list at lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20141216/d388ec36/attachment-0001.html>

More information about the Pd-list mailing list