REQUEST: loadbang & loadmess with delay parameter

Geoff Martin's icon

Hi folks-at-Cycling74,

Could you, in a future release, include an optional delay parameter in the loadbang and loadmess objects. For example "loadbang 100" would mean that the bang is sent 100 ms after the patcher is loaded. Similarly, a "loadmess MESSAGE 150" means that the message MESSAGE is sent 150 ms after loading.

Thanks!
-geoff

jvkr's icon

First of all, it would not be too much of a challenge to make an abstraction that would do this. However, you will find that this solution does not solve properly the problem you might run into: how to organize the order of instantiation. Depending on a variety of factors, loadbang will happen at some time during launch, but since you can never know exactly when it happens (in relation to what else is going on), the knowledge that it is 100 ms after that, is hardly of any use.

Even you might find that while a specific solution based on delaying loadbangs always works fine, when you bring that to another computer, it does not work anymore. This is especially an issue when building applications.

Users have been solving this problem in a variety of ways. One option is to work with a counter that enforces order by sending bangs to remote abstractions, while the counter increases by a confirmation that some initialization process has successfully been executed. The object deferlow is of crucial importance.

AudioMatt's icon

mat.orderedloadbang
might be of help.

It's not delay but you can change the order that mat.orderedloadbangs loadbang.

loadbang

1851.V0002.zip
zip
Roman Thilenius's icon

i also use abstractions for things like that; odered, delayed, symbols and lists-loadbang ...
but ... under circumstances [delay] can be a bit dangerous for loadbang.

Luke Hall's icon

I wrote a javascript that does this, I've only tested it with printing to the max window though. It was written more as javascript practise than anything else.

Geoff Martin's icon

Hi,

jvkr, of course this is easy to implement as an abstraction - that's what I'm already doing. And i agree with you and Roman that this wouldn't be a panacea, but there are a number of simple cases when I've found it to be very useful.

AudioMatt - thanks for your patch... the ordered loadbang doesn't help me at the moment, but it would have in the past, and therefore it will in the future!

cheers
-geoff