Mode(\symbol) -- automatic

Holds a ModalSpec object. ModalSpec describes an arrangement of intervals within the octave and maps a flat semitone representation (e.g., MIDI note number) to and from a modal representation.

ModalSpec(#[0, 2, 3, 5, 7, 9, 10], 12, 2) => Mode(\default); // D dorian

Once you have placed a ModalSpec into the mode collection, its symbolic name can stand in for the ModalSpec in many places.

• mapMode / unmapMode calls:

69.mapMode(\default) == 40

• MIDIRecBuf properties: MIDIRecBuf(..., properties: (mode: \default))

When this MIDI buffer is used in one of the built-in melodic or chord arpeggiator processes, it will be interpreted with reference to that mode.

More interesting modal analysis is possible by referencing several modes within the same, composite mode.

[\cminor, \cmixolydian] => Mode(\cComposite);

// or (I like this syntax better)

#[cminor, cmixolydian] => Mode(\cComposite);

By default, conversion between modal and chromatic representations will use the first mode specified in the array. More important is the fact that the built-in melody and harmony processes divide input MIDI buffers into segments (phrases for melodies and chords for harmonies). Each segment is tested against each given mode and the best fitting mode is associated with the segment. This affects the consonance or dissonance level of further manipulations -- wholly musically relevant.

The asMode method will return a Mode() object for the given Symbol, Mode() or nil. Note data should be converted using the mapMode and unmapMode methods.

nil.asMode --> Mode(\default)

ModalSpec.new.asMode --> the same ModalSpec

\default.asMode --> Mode(\default)

Mode(\default).asMode --> Mode(\default)