Download Max Tutorial Manual - Electronic Art and Design

Transcript
Using Timers
Tutorial 31
•
Patches D and E show two examples of situations that result in stack overflow. Click
on the buttons if you want to make Max very unhappy. (Go ahead, you won’t break
anything.) Remember to choose the Resume command to start Max up again.
tempo
The tempo object is another metronome, but it operates in somewhat more traditional
musical terms than the millisecond specifications necessary with clocker, metro, and line.
The first argument to tempo (or a number received in the left-middle inlet) sets a
metronomic tempo in terms of beats per minute—that is, quarter notes per minute—just
like a traditional metronome.
The second and third arguments (or numbers supplied in the right-middle and right
inlets) specify what fraction of a whole note tempo will use to send out ticks of the
metronome. For example, if the second and third arguments are 1 and 16, the fraction is
1
/16 of a whole note and tempo sends out a number from 0 to 15 for every sixteenth note,
based on the specified quarter note tempo. A fraction of 2/3 would send out half note
triplet ticks (a tick every 2/3 of a whole note), and so on.
The numbers sent out by tempo always go from 0 to the number 1 less than the pulse
division (the third argument). The greatest allowable division is 96 (sixty-fourth note
triplets). The fact that tempo sends out a number (a sort of pulse index), lets you assign
different things to happen on different pulses in a measure. In this way you can generate
metrically-based automated processes.
143