Change tempo of metro immediately?

Nov 2, 2012 at 2:09pm

Change tempo of metro immediately?

This seems like a classic in the forums, but I have yet to find a definitive answer: Is there a way to make the metro object change its tempo (almost) immediately upon receiving a new tempo value?

As it is now, it waits until the next “tick” before changing tempo, which is kind of long if you have a tempo of, say, 1000. Some suggested the tempo object would react immediately upon a new tempo value, but as far as I can tell, it also waits until the next value.

Nov 2, 2012 at 2:30pm

If you send a bang to tempo right after you change its speed, then it will restart with the right tempo.


Nov 2, 2012 at 2:32pm

I tried that, but that becomes very messy when you are changing the tempo with a slider. I’d rather avoid the re-trig, but it seems that might be difficult.

Nov 2, 2012 at 2:48pm

sorry not to be more help but I recall that someone (?) recently posted a patch in relation to a ‘bang’ timing/quantizing issue, which used the delay object in a novel/unique way; kind of like a sample-and-hold effect. Maybe you could trawl the forum for that? You could use the delay object to quantize bangs from your slider+trigger.


Nov 2, 2012 at 4:41pm

If you are willing to go into the signal domain, train~ has the behavior that you search for.

Nov 2, 2012 at 11:11pm

to change the speed immediately you simply need to stop and restart it.

i´d use a [t 1 f 0] for that job.


Nov 3, 2012 at 12:00am

Here’s an absurdly hard way:

– Pasted Max Patch, click to expand. –
Nov 3, 2012 at 3:02pm

Thanks for the suggestions, Roman and mzed, but Roman – your example still means there will be an extra trigger every time the slider slides from one tempo to another (resulting in lots “extra triggers”), and mzed, you are definitely the closest to getting this to work, but it seems there are some inconsistencies, resulting in the trigger not always immediately catching on to the tempo change.

Nov 3, 2012 at 3:10pm

With the metro object, you are going to have either one problem or the other. You need to “debounce” the slider input in some way, which will inevitably introduce some latency.

I wrote an elaborate solution called tempo~ that is in the cnmat downloads: It uses phasor~ as the timing mechanism. As jvkr says, train~ will also work.


You must be logged in to reply to this topic.