Question: Object to delay a message?

Nov 16, 2012 at 7:25pm

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

#65243
Nov 16, 2012 at 7:50pm

Hi,

how about this?

– Pasted Max Patch, click to expand. –

HTH,
Ádám

#235170
Nov 16, 2012 at 8:12pm

You help me out again, Ádám.
Great solution. Never would have thought that the zl object is that versatile.

Thanks,

Wiebe Marten

#235171
Nov 17, 2012 at 12:06am
– Pasted Max Patch, click to expand. –
#235172
Nov 17, 2012 at 4:35am

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.

#235173
Nov 17, 2012 at 8:36am

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)

#235174
Nov 17, 2012 at 8:43am

I feel like I must have posted something like this before, but I’m senile so here goes again.

– Pasted Max Patch, click to expand. –
#235175
Nov 17, 2012 at 1:49pm

That seems to be a really beautiful solution!

#235176
Nov 17, 2012 at 2:39pm
– Pasted Max Patch, click to expand. –

http://cycling74.com/forums/topic.php?id=41858

http://cycling74.com/forums/topic.php?id=38267

#235177

You must be logged in to reply to this topic.