Multiple timers

A couple of questions about timers -

  1. I've seen in some threads that a JS custom module is recommended. Is this necessary to use timers?
  2. In this example file here, there's no JS custom module. It seems to work... though it's a bit odd - the 'pause' button pauses but won't unpause. Is this expected behaviour? (I'm guessing it was written for an older version of Open Stage Control.) Time/Duration spent on project - #2 by jean-emmanuel

Just for context: What I want to do is have several timers running in clones that get restarted when the user makes an action in that clone (they clones are controllers for loopers). The aim is to erase the loop if the user doesn't do anything with it after a few minutes - to keep the music moving along.

Thanks again for all your help! :pray:

Ya know what, I think I got this one too thanks to some friends on Discord and this post.
Looping inside a widget script)

Using timers in widgets is fine too.

In this example file here, there's no JS custom module. It seems to work... though it's a bit odd - the 'pause' button pauses but won't unpause.

It's an unfinished example I didn't had time to finish unfortunately, I just posted a fixed version in that thread.

Just for context: What I want to do is have several timers running in clones that get restarted when the user makes an action in that clone (they clones are controllers for loopers). The aim is to erase the loop if the user doesn't do anything with it after a few minutes - to keep the music moving along.

Each widget can have its own timers, although note that having hundreds of timers running at the same time may perform poorly.

Ace thanks! I'll be using 12 to start with so I guess that should be OK :slight_smile: