Forums > MaxMSP

newb Q: Ramping a metro's time

December 8, 2007 | 1:26 am

I thought it might a rather simple affair, a message in the format of "250, 750 10000" connected to a metro’s right inlet to make it go from 250ms to 750ms over the course of 10s, but this isn’t working. What am I missing?

- Wells


December 8, 2007 | 1:35 am

send the message through line object first. looks like the format is right for that.


December 8, 2007 | 12:43 pm

This is a fundamental misunderstanding of metro. It is misnamed. It should
be called alarm clock. I works more like a retriggering delay. Metro
outputs a bang then waits the specified period before banging again. Any
changes in the delay time are ignored until the current delay time expires.

Try this to see it happen. Click 2000 then 1000 immediately after you see a
bang output.

#P button 216 186 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 352 103 34 196617 2000;
#P message 308 104 34 196617 1000;
#P newex 252 186 35 196617 timer;
#P toggle 252 121 15 0;
#P newex 252 148 37 196617 metro;
#P number 252 224 63 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 3 0 0 0;
#P connect 1 0 6 0;
#P connect 1 0 3 0;
#P connect 1 0 3 1;
#P connect 5 0 1 1;
#P connect 4 0 1 1;
#P connect 2 0 1 0;
#P window clipboard copycount 7;

I suggest the tempo object, McCartney’s pulse and my pulsemetro. Pulse and
pulsemetro are available on my web site (below or search MaxObjects.com).
All of these objects have continuously variable tempo.

On 12/7/07 8:26 PM, "Wells Oliver" wrote:

>
> I thought it might a rather simple affair, a message in the format of "250,
> 750 10000" connected to a metro’s right inlet to make it go from 250ms to
> 750ms over the course of 10s, but this isn’t working. What am I missing?
>
> – Wells

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


December 8, 2007 | 8:56 pm

ah yes, I forgot about that. Gary is right about the metro, it’ll wait its full time before banging at the new tempo, unless you stop / start again quickly (and then you get stutter). Sounds like he’s got some other objects that’ll do what you need, they seem handy.

There are a lot of other options for changing rates, using signals, so it’s worth investigating those at some point too.

–CJ


December 13, 2007 | 9:31 am

Wells Oliver schrieb:
> I thought it might a rather simple affair, a message in the format of
> "250, 750 10000" connected to a metro’s right inlet to make it go
> from 250ms to 750ms over the course of 10s, but this isn’t working.
> What am I missing?

Try this:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 111 90 50 196617 line;
#P button 71 155 15 0;
#P message 71 41 90 196617 250 , 750 10000;
#P newex 71 66 50 196617 t 1 l;
#P toggle 71 95 15 0;
#P newex 71 118 50 196617 metro;
#P connect 5 0 0 1;
#P connect 2 1 5 0;
#P connect 0 0 4 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P window clipboard copycount 6;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


December 13, 2007 | 1:51 pm

This sort of works with the limited range of delay times (250..750) but it
general metro will not be useful for continuous tempo changes for the
reasons I gave in a recent post. But, if you continue to be interested in
this I can send you my patch for lighting a match on a wet cake of soap.
:-)

Seriously, have a look at this. It measures the time between ticks from
pulse, tempo and metro responding to the same patterns of tempo change. The
left side works pretty well for smooth continuous tempo changes but notice
the differences between pulse and the other two. The right side changes
tempo randomly every five seconds without ramping. You can see gross errors
in timing at the change points. Note also that the bangs fire out of
sequence almost from the beginning. You will have to get the pulse object
before you can run this example.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 880 165 82 196617 new tempo = $1;
#P newex 879 186 32 196617 print;
#P number 646 144 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 748 70 64 196617 metro 5000;
#P newex 748 95 58 196617 random 90;
#P flonum 768 225 80 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 532 328 187 196617 sprintf pulse %ld tempo %ld metro %ld;
#P newex 532 361 32 196617 print;
#P button 549 41 15 0;
#P newex 749 166 113 196617 expr 1000.*(60./$f1);
#P newex 749 117 31 196617 + 30;
#P newex 695 256 35 196617 timer;
#P button 695 221 15 0;
#P newex 695 196 64 196617 metro 1000;
#P newex 589 255 35 196617 timer;
#P button 589 220 15 0;
#P newex 589 195 70 196617 tempo 60 1 4;
#P newex 532 286 45 196617 buddy 3;
#P toggle 493 127 15 0;
#P newex 531 259 35 196617 timer;
#P button 493 219 15 0;
#P newex 493 194 66 196617 pulse 60 1 4;
#P flonum 343 181 80 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 85 316 187 196617 sprintf pulse %ld tempo %ld metro %ld;
#P newex 85 346 32 196617 print;
#P button 102 29 15 0;
#P message 164 60 290 196617 30 , 120 15000 30 0 30 3000 60 0 60 3000 120 0
120 3000;
#P newex 302 154 113 196617 expr 1000.*(60./$f1);
#P newex 164 80 40 196617 lines 5;
#P newex 248 244 35 196617 timer;
#P button 248 209 15 0;
#P newex 248 184 64 196617 metro 1000;
#P newex 142 243 35 196617 timer;
#P button 142 208 15 0;
#P newex 142 183 70 196617 tempo 60 1 4;
#P newex 85 274 57 196617 pack 0 0 0;
#P toggle 46 115 15 0;
#P newex 84 247 35 196617 timer;
#P button 46 207 15 0;
#P newex 46 182 66 196617 pulse 60 1 4;
#P comment 309 135 100 196617 tempo to ms;
#P connect 15 0 4 0;
#P connect 12 1 4 0;
#P connect 4 0 1 0;
#P connect 1 0 2 0;
#P connect 12 0 1 1;
#P connect 15 0 3 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 17 0;
#P connect 17 0 16 0;
#P connect 8 0 5 1;
#P connect 2 0 3 1;
#P connect 11 0 5 2;
#P connect 4 0 6 0;
#P connect 6 0 7 0;
#P connect 15 0 8 0;
#P connect 7 0 8 0;
#P connect 12 0 6 1;
#P connect 15 0 14 0;
#P connect 14 0 12 0;
#P connect 7 0 8 1;
#P connect 4 0 9 0;
#P connect 9 0 10 0;
#P connect 15 0 11 0;
#P connect 10 0 11 0;
#P connect 10 0 11 1;
#P connect 12 0 13 0;
#P connect 13 0 9 1;
#P connect 13 0 18 0;
#P connect 32 0 22 0;
#P connect 22 0 19 0;
#P connect 19 0 20 0;
#P connect 30 0 19 1;
#P connect 32 0 21 0;
#P connect 20 0 21 0;
#P connect 21 0 23 0;
#P connect 23 0 34 0;
#P connect 34 0 33 0;
#P connect 26 0 23 1;
#P connect 20 0 21 1;
#P connect 29 0 23 2;
#P connect 22 0 24 0;
#P connect 24 0 25 0;
#P connect 32 0 26 0;
#P connect 25 0 26 0;
#P connect 30 0 24 1;
#P connect 25 0 26 1;
#P connect 23 1 34 1;
#P connect 30 0 38 0;
#P connect 22 0 27 0;
#P connect 27 0 28 0;
#P connect 32 0 29 0;
#P connect 28 0 29 0;
#P connect 23 2 34 2;
#P connect 28 0 29 1;
#P connect 32 0 37 0;
#P connect 37 0 36 0;
#P connect 36 0 30 0;
#P connect 30 0 31 0;
#P connect 31 0 27 1;
#P connect 31 0 35 0;
#P connect 40 0 39 0;
#P connect 30 0 40 0;
#P window clipboard copycount 41;

On 12/13/07 4:31 AM, "Stefan Tiedje" wrote:

> Wells Oliver schrieb:
>> I thought it might a rather simple affair, a message in the format of
>> "250, 750 10000" connected to a metro’s right inlet to make it go
>> from 250ms to 750ms over the course of 10s, but this isn’t working.
>> What am I missing?
>
> Try this:
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 111 90 50 196617 line;
> #P button 71 155 15 0;
> #P message 71 41 90 196617 250 , 750 10000;
> #P newex 71 66 50 196617 t 1 l;
> #P toggle 71 95 15 0;
> #P newex 71 118 50 196617 metro;
> #P connect 5 0 0 1;
> #P connect 2 1 5 0;
> #P connect 0 0 4 0;
> #P connect 3 0 2 0;
> #P connect 2 0 1 0;
> #P connect 1 0 0 0;
> #P window clipboard copycount 6;
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


December 13, 2007 | 1:52 pm

PS. Pulse jitters a bit because it is using a different timing method. It
jitters a lot when overdrive is off. I still don’t have the whole story it
seems.

On 12/13/07 4:31 AM, "Stefan Tiedje" wrote:

> Wells Oliver schrieb:
>> I thought it might a rather simple affair, a message in the format of
>> "250, 750 10000" connected to a metro’s right inlet to make it go
>> from 250ms to 750ms over the course of 10s, but this isn’t working.
>> What am I missing?
>
> Try this:
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 111 90 50 196617 line;
> #P button 71 155 15 0;
> #P message 71 41 90 196617 250 , 750 10000;
> #P newex 71 66 50 196617 t 1 l;
> #P toggle 71 95 15 0;
> #P newex 71 118 50 196617 metro;
> #P connect 5 0 0 1;
> #P connect 2 1 5 0;
> #P connect 0 0 4 0;
> #P connect 3 0 2 0;
> #P connect 2 0 1 0;
> #P connect 1 0 0 0;
> #P window clipboard copycount 6;
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


Viewing 7 posts - 1 through 7 (of 7 total)