REQUEST: loadbang & loadmess with delay parameter
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.
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.
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.
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!