Question: Object to delay a message?
Hello there,
I have a very basic and probably simple-to-answer question, but I cannot figure it out:
When I want to delay a bang, I can use the [delay]
object. When wanting to delay an int/float, I can use pipe
.
But how can I delay a string or a list for a couple of (mili)seconds?
Thanks,
Wiebe Marten
Hi,
how about this?
HTH,
Ádám
You help me out again, Ádám.
Great solution. Never would have thought that the zl object is that versatile.
Thanks,
Wiebe Marten
Yeah, alersito beat me to it. Unless I have completely misunderstood zl.reg, the problem with Siska's suggestion is that a new incoming item will overwrite the one that's already saved in zl.reg.
I use the pipe with symbol conversion (although I wrap the whole thing up in an abstraction to make it easier to manage). My concern with this solution is the proliferation of large numbers of symbols if what you're piping are things like MIDI events or OSC data.
Hi dwhatever,
yep, you're right. I overlooked this ;-) However, in my experience, both [tosymbol]
and [fromsymbol]
are quite heavy operations. Since the OP wants to delay messages for only a few milliseconds, if he's sending so many messages that there's a chance that a new message would arrive while an old one is still in the queue, I would rather use the solution that one can find in [pipe]
's help file as [p "more about delaying lists"]
.
Cheers,
Ádám (which, again, is my first name)
I feel like I must have posted something like this before, but I'm senile so here goes again.
That seems to be a really beautiful solution!