The accompanying patches can be found here:
http://www.milkcrate.com.au/_other/downloads/max_patches/sequencer/Sequencer_1.pat
http://www.milkcrate.com.au/_other/downloads/max_patches/sequencer/Sequencer_2.pat
http://www.milkcrate.com.au/_other/downloads/max_patches/sequencer/Sequencer_3.pat
Let us begin!
Simple Patch
Let us begin with almost the simplest patch that will allow one step-sequence MIDI data. This patch can then be expanded upon.
Please note that there are many ways of doing one thing in a program such as Max/MSP, and my way is just one way. It is probably not the best way, but it works.

• a sixteen step MIDI pitch sequencer
• variable global velocity
• variable BPM
The interface for the sequencer is a multislider object (the item that looks like a graph in the patch). The multislider object is set up for integer use, and currently has a range of 30 - 54. This object represents the MIDI pitch data, and as such has a musical range of two octaves (24 semitones, because 54 - 20 = 24).
A multislider object outputs all of its sliders' values to the left output when one or more sliders change their value. In other words, it outputs a list with a length of sixteen integer values, where the first number in the list is the left most slider value and the last number in the list is . The aim of this simple patch is to read through these values in sequence, one after the other, with an interval in between reads and convert the values to MIDI notes.
This long list is fed into an object called listfunnel, which is a very simple yet very useful object at times. Listfunnel takes a list of numbers (such as our sixteen integers) and outputs them as a series of indexed pairs, starting with an index beginning at zero.
For example, if there is a list with the value
'57 60 72 43'
and this is put in to the listfunnel object, it will return four lists of two numbers, where the first value in each list is an index and the second is the individual value. In the example, list funnel will return:
'0 57'
'1 60'
'2 72'
'3 43'
This is very useful for sorting and dealing with lists quickly and efficiently.
Now, the MIDI pitch data is represented as a set of sixteen indexed pair. These indexed pairs are fed into the coll collection.
The coll object is a general memory area where values are stored and can be retrieved for later use. To store a value in a coll object, it must have a symbol associated with it. When this symbol (ie. number etc) is sent to the coll, then the coll retrieves the data at the location of the symbol and outputs it to its left most output.
This symbol association can be thought of as an address or an index, somewhere to look something up. So, to store a value in the coll, a list of at least two values must be sent to it. The first value in the list is the address or index (ie. the symbol that is associated with the data) and any other items in the list are then associated with that particular address. Then, when the address (by itself - ie. a single number) is sent to the coll, then the coll retrieves the data from that location.
For example, if we send four lists to the coll, like:
'0 57'
'1 60'
'2 72'
'3 43'
then we have store the value 57 at index 0, 60 at index 1, 72 at index 2 and 43 at index 3. If, after this point in time, we send the value 0 to the coll, the coll will return the value 57 because we stored that value at that index earlier.
Because our sixteen values are now already correctly formatted for the coll object, they will appear at index points 0 to 15.
A tempo object is connected to a bang button, which is in turn connected to a counter object. It is this counter that actually controls which value comes out of the coll when. The counter counts up from 0 to 15 and repeats indefinetaly. This is governed by the arguments '0 0 15'. The first zero represents the direction (o for up, 1 for down, 2 for up / down operation). The other two numbers represents the minimum and maximum values of the counter. This is simply the index range of the data in the coll object.
The counter increments up by one each time it receives a bang to its left input. This bang is sent from the bang button, which is connected to the temp object. Because the tempo object is set to a bpm of 120, with a multiplier of 1 and a beat division of 4, the next note in the sequence will be triggered every crotchet note at 120 bpm. The second-left inlet of the tempo object sets the tempo of the output in bpm by changing the number boxed marked 'bpm'. The left most inlet starts and stops the tempo object (with the toggle marked 'start', 0 for off an 1 for on).
Finally, the data from the coll object (which is the pitch data from the multislider) is sent to a makenote object as the pitch element in a MIDI note. The makenote object generates a note on and follows it up automatically with a note off after a user-defined period of time. The velocity and length of the note are initially set by the arguments '60 300' where 60 is the velocity and 300 the time in ms. The velocity is also user-controllable by the number box marked 'velocity'.
The output (left outlet for pitch and right outlet for velocity) is sent to a noteout object, which makes the transition into actual MIDI data.
And, Sequencing Velcocity

This simple extension adds the following features to the patch described above:
• The ability to sequence not only pitch but also velocity
This straightforward extension of the previous version adds only three objects, yet it allows the user to sequence the pitch of a note as well as velocity.
A second multislider, listfunnel and coll are added and connected to the counter identically to the first set. This multislider is also an integer-based object, but has a range of 0 to 127. The data contained within the second coll and generated by the second multislider is representative of the velocity of a note.
Since both coll objects have their data requested by the same counter object, the first note will also have the first velocity and so on.
The output of the second coll is connected to the makenote object's second inlet (which controls the velocity of the generated note). Because of this, there is no use for a global velocity control (and it has been removed).
Phase-relative step-sequencing

• The ability to sequence not only pitch but also velocity using loops of different lengths, creating more complex time signatures and the possibility of simple phase-relative musical structures
Once again, this patch is almost identical to the version preceding it. Only three objects have been added, but these objects offer a different type of control to that explored previously.
Imagine if it were possible to step-sequence in a loop velocity and pitch data where the loops for the velocity and the pitch data are of different lengths. This opens the door for phase-relative phrases and structures, which can produce more complex musical patterns than the source data might have one initially believe.
The idea is that although both coll objects for pitch and velocity are being clocked out by the same tempo object (and are therefore in time), different length loops of the data itself is achieved by using a counter for each coll instead of sharing a counter like the previous example. Furthermore, the maximum point for each counter (which determines the loop range) is user-definable and can be set to any number between 0 and 15. The right-most inlet of the counter objects set the maximum counts and are controlled by the length (pitch) and length (velocity) number boxes.
So, if the pitch length is set to 15, then the pitch coll will always read the index from 0 to 15. But if the velocity is set only to 2, then the velocity coll will only always read from 0 to 2 (in other words, only the first three velocity sliders) before going back to 0.