Ordered [loadbang]

I’ve seen a few ways of doing this, one is a custom java external and one is a abstraction plus javascript that plays off the firing order of [patcherargs], [loadbang] and [loadmess] if I remember correctly.

Here’s a fairly simple javascript that uses a task and a global object to achieve much the same thing. You can create instances of the object and they will fire in the order of the numeric arguments you give to them. These must be in order starting from 1, no missed numbers or everything after will not fire and the task function will continue forever (which is bad). You can disable them like regular [loadbang]s with shift + command when you open a patch. I hope someone finds it useful. It would be fairly easy to implement a [loadmess] equivalent. Post any comments or questions here!

New version! It still relies on crazy polling at the beggining but will now accept the order arguments being non-consecutive, negative and fractional. Any non-numeric arguments will be ignored, any extra arguments will be sent out as a list instead of a "bang" so you can use it as a [loadmess] substitute too. If you include more than one instance with the same argument they are triggered in order of creation (as far as I can tell).

I’m looking into ways of doing away with the short interval task object use as this could cause issues if you have many instances of the object in your patch.