These patches use timed counting—in both cases using a metro object and a counter—to step through a series of MIDI notes.
This patch demonstrates use of the table and coll objects to read through a data set to automate musical parameters.
Once you get to a large number of booleans, you might want to pack all those 0/1 states together as a single integer and use that integer to look up a behavior. Here’s an example using four booleans; extend and alter to suit your needs.
Any message that consists of a single word is a message of type symbol (as opposed to int or float or list or some other word followed by other items). The coll object explicitly puts the word symbol ahead of its output if the output is a single word. The advantage of that is that you can detect single-word outputs as being different from all other outputs, by using a route symbol object.
Here’s an example patch that takes MIDI pitch and velocity information, runs it through borax and stores time-tagged note information in a coll, which you can then look up and play later.
This is an example that generates a sixteenth-note rhythm, formats the information as MIDI note messages with midiformat, and stores them in a seq object, which can be saved as a MIDI file with the write message.
To set a list of cue points in an audio file and have them played in order, use either sfplay~ (with a set of cues established by preload messages to sfplay~ or to sflist~) or buffer~ (with start messages to play~, the parameters of which are stored in a coll).
The simplest way to remove objects after a set duration using jit.lcd – because jit.lcd doesn’t support sprites – is to keep track of the individual drawing components and then redraw the whole stage. The example does so by storing the paintoval messages in a coll then sending the output of the coll to the jit.lcd.
While zl lace interweaves two lists, zl group allows you to interweave more than two lists. Retrieve the length of the list using zl, send it to uzi to retrieve the data in each index stored in the coll files, and pack them all to be interweaved by zl group.