counter

Arpeggiate the harmonic series

This example repeatedly arpgeggiates the first 16 notes of the harmonic series based on the frequency 65.406395 Hz, which is the fundamental frequency of the open C string on a cello. The note rate can be adjusted anywhere from 1 note per second to 100 notes per second. The default initial rate is 8 notes per second.

A 16-stage note sequencer

Analog synthesizers of the early 1970s often included a "sequencer" capable of cycling through a timed sequence of 16 different voltages (which would most commonly be used to control the pitch of an oscillator). This likely explains why so many fast 16-note repeating patterns appeared in electronic music of that time period. Most voltage sequencers allowed the user to set the voltage for each step of the sequence, and to adjust the timing interval (rate) of the sequence.

Two ways to get BPM timing

Sometimes it’s more convenient to think about musical time in "beats per minute" (BPM) instead of milliseconds. (Beats per minute is also a much better unit to use when you want to express an accelerando or decelerando.) Here are two easy ways to express timing in terms of beats per minute.

Delaying MIDI notes

There are many objects available for delaying events (i.e., for scheduling events to happen at a specific future moment). For timing and scheduling events, the most common object is the metro object (send bang periodically at a specified time interval), which can be used to trigger events, start/stop entire processes, or trigger a counter to step through a table or a coll or any sort of sequence of things.

Timed counting in Max

The upper example shows how to count from 1 to 10 at a specific rate (e.g., one count every 500 ms) and stop when you reach 10. The metro object sends out a bang message when it is turned on (when it receives a nonzero number in its left inlet), and continues to send out bang every x milliseconds (specified by the typed-in argument or by a number received in its right inlet). You can type in minimum and maximum values as arguments in the counter object.