News » 01 January 2009

Ajm Objects 0.8.6

I'm kicking off 2009 with an update of ajm objects: version 0.8.6. Everything has been reworked for Max 5 and I've added some new objects for sequencing with the transport system.

The new comers include ajm.metro, ajm.makenote, and ajm.midi2coll. Together they allow for transport-synced sequencing using coll objects.

Here's how it works: every event is stored in a coll data structure with timestamps as lookup keys. For example, we might have the following events:

1.1.0 => 60 70 1.5
1.3.0 => 55 90 1.5
2.1.0 => 48 110 3

This is a descending series of pitches with a crescendo, using the rhythm half, half, whole played not quite legato. At bar 1, beat 1, the midi event "60 70 1.5" will occur. That event is the pitch, velocity, and duration of the note to play. Pitch 60 is middle C and velocity 70 is a medium loudness level (pitch and velocity go from 0 to 127). Durations are expressed in beats, so 1.5 means to sustain the note for one and a half beats. Similarly, at bar 1, beat 3, the event "55 90 1.5" occurs. And the last event happens at bar 2, beat 1.

After the bar and beat in the timestamp, the last value is the units (AKA ticks). Max uses 480 units per beat, so the upbeat of the second beat would be 1.2.240

This data is represented by the following format in a coll:

1.1.0, "60 70 1.5";
1.3.0, "55 90 1.5";
2.1.0, "48 110 3";

A single timestamp can store multiple events, so chords are easily supported. Each event is quoted so that different event types can be stored. I use "cc value number" to sequence CC (continuous controller) events, and it would be easy to sequence tempo changes, OSC messages, or anything else you want.

ajm.makenote takes care of splitting MIDI note data from other types of events, and converting durations to an actual time in milliseconds. ajm.makenote also has MIDI transformation features: transpose, velocity scaling, duration scaling.

This coll format is straightforward enough that it can be typed by hand. Alternately the object ajm.midi2coll can import MIDI files to this coll format. So if you like to sequence things with a GUI in a nother program like Logic, you can export it as a MIDI file and then pull it into Max so you can really phuck with it ;) In the future I will be supporting other methods of generating sequenced data for the coll. Once my Cosy project matures a bit more, I will add a new Max object ajm.cosy that can convert Cosy sequences into this coll format.

Finally, to actually playback these sequences, ajm.metro is a transport-based metro that outputs the current time in a variety of formats, including bars.beats.units, so it can be hooked up directly to a coll and drive the sequence.

There are comprehensive examples of how this all works end-to-end in the help patches included with ajm.objects. It will probably make a lot more sense when you see it in action.

You can download ajm objects here.