created by V.J. Manzo (2006 - present)
The Modal Object Library is a collection of algorithms to control and define modality interactive music software. The first objects were written for the language Max/MSP/Jitter in 2006 and became instrumental to the development of the EAMIR project. The library is now bundled with the V Objects as part of the EAMIR Software Development Kit (SDK).
Modal Object Library (with 64-bit Max support)
the Modal Object Library and V-Tools library is now bundled within the EAMIR SDK
Modal Object Library 3.6a (for older versions of Max prior to 6.1)
Max version 5 or 6:
PD Port (2008) (no longer supported):
Use & Implementation:
The modal_change object allows a user to specify a tonic and diatonic mode in its two inlets and get the pitch class value of each scale degree out its eight outlets. A user can send a pitch class number or a letter name message to its left inlet to set the tonic. A message box with a mode name such as major, minor, Phrygian, Lydian b7, can be sent to the right inlet to build up a scale from the given tonic. The object will output the scale degrees for any tonic within the modes of the major scale, the melodic minor scale, the harmonic minor scale, and the harmonic major scale (the major scale with flatted 6). Instead of using one of the mode names to build a scale, a user can also send a message with the number of whole steps and half steps desired to build their scale, and receive the scale degree pitch classes from its outlets.
Double clicking the object will open a display that allows the user to see what mode they’re in and other information related to the mode including scale degree distances that make up the scale and the particular mode’s context within the larger pitch collection.
The object can receive all of the organized pitch class data into a table or by using an internal table with the argument table1.
The object can also receive the organized pitch class data into a coll list or by using an internal coll list with the argument scale. The coll list also has an added feature: it will take any incoming pitch and filter it to the nearest note from the selected scale.
This allows you to set the tonic and mode, and filter all incoming pitch data so that whatever note is played, it will conform to the diatonic pitch collection you’ve selected.
The modal_triad object allows a user to play tertian chords of any quality. It receives scale data from the modal_change object and, when a tonic and mode is selected, the object receives the numbers 1-8 in its leftmost inlet to output the notes of the chord function associated with that number. For example, in major keys, the numbers 1, 4 and 5 are always major chords, 2, 3, and 6 are minor, so, if C Major is selected, a 2 sent to the modal_triad object will yield the notes of a d minor chord.
For each selected chord, the notes of that chord are sent to the object’s 7 outlets in the following order: root, third, fifth, seventh, ninth, eleventh, and thirteenth. Alterations like flat ninth or sharp eleventh are inferred by the chord function as it relates to the selected tonic and mode.
The second inlet of the object allows the chord tones, received as pitch classes, to be restricted to one octave.
The object also takes Roman numeral functions to yield chords. The standard capital Roman numerals for major, lower case Roman numerals for minor are used. A lower case Roman numeral iv in the key of C Major will yield an F minor chord regardless of the fact that chord has non-diatonic chord tones in it, the Ab.
A capital Roman numeral with a plus sign next to it will yield an augmented chord, and a lowercase Roman numeral with a zero next to it will yield a diminished chord.
In the same manner, a user can use letter names to build chords. A capital C will yield a C Major chord while a lower case e will yield an e minor chord. A capital C plus will yield an augmented chord and a lower case d zero will yield a d diminished chord.
This object also receives messages for tonicizations. A user can send the message Roman numeral V/5, to yield the 5 of 5 (a D Major chord in the key of C Major). The V Chord Tonicizations produce a Dominant 7th chord for each scale degree in the selected mode. That is, the root, 3rd, 5th, and 7th will form a Dominant 7th Chord exactly one perfect 5th above a given scale degree. The 9th, 11th, and 13th pitches of the chord are inferred according to the selected mode and NOT the mode from which the tonicizing chord prevails.
Similarly the object allows other types of tonicizations including leading tone tonications and minor four tonicizations. Augmented 6th chords and Neopolitan chords can also be implemented.
The object also has 7 switches that can be set to restrict notes from reaching the outlets.
The modal_prog object takes a list of chords (as in a progression) in its right inlet and outputs each of those chords one at a time to the modal triad object when a bang is sent to the left inlet. The object integrates with the modal_triad object and will interpret any message that modal triad does.
By default, a new list of chords triggered when a list is currently being played will sound on the next bang received. With the optional argument '@immediate 0', a new list of chords triggered when a list is currently being played will sound as soon as each chord from the first list has been played.
The modal_shiftlist object receives a tonic and mode name in its inlets and populates a list of all related modes sharing 6 of 7 notes. It takes the pitches of the scale and moves each scale degree up or down one at a time to see if a new diatonic mode can be formed. This process will list 42 related modes for any of the major scale modes, 28 related modes for any of the melodic minor scale modes, 21 related modes for any of the harmonic minor scale modes, and 21 related modes for any of the harmonic major scale modes.
When one of these related modes is selected from the list, the object automatically repopulates the list with modes related to the new key.
The modal_shift object is similar to the modal_shiftlist object, but it is optimized to randomly choose one of the related modes when a bang is sent to its left inlet.
The modal mutation object is identical to the modal_shift object, but it outputs only those related modes sharing a common tonic or a semitone inflection of the tonic.
The modal_mediant object receives a tonic and mode name in its inlets and populates a list of modes in a chromatic median relationship with the initial mode. When one of these related modes is selected from the list, the object automatically repopulates the list with modes related to the new key.
Modal Messian Objects
The Modal Messian objects operate similarly to the modal_change object, but output the pitch classes of Messiaen’s Modes of Limited Transposition. You can send it messages like C Whole Tone or E octatonic to receive the pitch classes of that mode. These objects are also useful for creating modes with 6, 8, 9, or 10 unique scale degrees as it also accepts scale degree distances.
Modal Analysis Objects
The modal_analysis object takes incoming notes in its left inlet and determines in what mode and tonic you’re playing when a bang is sent to its right inlet. The object attempts to filter out repetitions and organize notes to infer a mode. Double clicking the object will reveal a window similar to that of the modal change object which shows the mode as well as the scale degree distances that make up the scale and the particular mode’s context within the larger pitch collection.
The ordered scale degrees are output as a list from the objects left outlet and the scale degree distances are output from its second outlet.
The modal_analysis+ object does everything modal_analysis does, but is also set to integrate with the modal change object to trigger a new mode change when a mode is analyzed. A user could conceivably play a scale, have it analyzed and then generate chords from that scale in real-time.
Modal PC Match
The modal_pc_match object takes an incoming note in its left inlet and compares it against the diatonic pitch classes of any scale as defined by the modal_change object. If the incoming pitch matches one of the pitch classes of the scale, the object outputs a bang from one of its first seven outlets.
The object also defines the chromatic notes between diatonic scale degrees. If an incoming pitch matches a chromatic scale degree, the object outputs a bang from one of the next 14 outlets. For example, a C# played in the key of C Major is between scale degrees 1 & 2 - C & D - a whole step. An incoming C# in any octave will send a bang out of the outlet marked “Match Scale Degree #1” [read Sharp One].
The incoming note may also match a chromatic scale degree between a step and a half (3 semitones). In this case, two chromatic notes are next to each other separated by a half step. The lower of the two chromatic notes is referred to as the “#1” (assuming that the step and half interval is located between scale degrees 1 and 2 as is the case in the sixth mode of the harmonic minor scale, Lydian #2). The other chromatic note is closer to the higher scale degree and would be referred to as “b2”, thus the object would output the message “Match Scale Degree b2”. For example, imagine a G played in the key of A Harmonic Minor (between scale degrees 6 & 7 - F & G#). An F# is interpreted as “#6” and the G is interpreted as “b7”. Note: only the harmonic minor and harmonic major scales and their modes have two scale degrees separated by a step and a half.
In addition to matching chromatic pitches, the modal_pc_match object also outputs the chromatic pitch classes out of its last 14 outlets. Note that this means some notes will be redundant. For example, scale degree_b2 will be the same pitch as scale degree_#1 in Major keys. Once again, this will not be the case in the modes of harmonic minor and harmonic major where two pitch classes are separated by 3 semitones.
The modal_fuzzharm object outputs a fuzzy logic chord harmonization based on incoming pitch classes. The object integrates with several objects in the modal_object library including the modal_pc_match object to determine if the incoming note played is diatonic or chromatic and that notes relationship in the context of the specified tonic and mode. For example, is the incoming note scale degree 1? Is it chromatic scale degree #4? If so, how do we want to harmonize that note when we receive it?
Double clicking the modal_fuzzharm object allows a user to see a table of chord symbols that the modal_triad object can interpret. The user can increase the probability weight to the table by clicking on one of the cells in the column for the desired chord/function listed in the top row. By default, all probabilities are set to zero. For example, if the incoming note matches scale degree one, you’d probably want to harmonize that note with the I chord, the IV chord and the vi chord since that scale degree one is present in all of these chords. Other chords may be used to harmonize that note as well, but you’d probably want the object to choose some chords more frequently than others, so we give them a higher table weight by clicking further down on the cells.
A bang sent to the modal_fuzzharm object will choose one of the chords to harmonize that note with based on the weightings you’ve specified. The table can be opened and presets can be saved. In the help file for this object, the seven diatonic scale degrees all have modal_fuzzharm objects connected so that when one of these scale degrees is played, the note will be harmonized in any way the user specifies. A specified table file has been loaded for each modal_fuzzharm object when the help opens which illustrates some default probability settings that harmonize these notes with diatonic chord functions.
Modal_filter is a simple abstraction that utilizes modal_change’s built in coll list feature. The abstraction shows an incoming pitch separated into octave class and pitch class. A chromatic pitch class is then filtered to a diatonic one and merged with its octave class. Thus, any non-diatonic notes will become diatonic ones.
Modal_strictmod is a simple abstraction that allows the modal change object to cause a strict modulation from one key to another. It takes the initial tonic in its right inlet and the new tonic in its left inlet and outputs the index of transposition number through its outlet.
Modal Netsend & Modal Netreceive
The modal_netsend and modal_netreceive objects are simple abstractions designed to optimize sending modal_change messages over a network. It uses normal UDP network features for port and IP address specification.
Modal Line (BETA)
The modal_line object operates similarly to the line object in terms of "ramping" from one number to the next. However, the ramp in modal_line only includes diatonic pitches of a specified mode.
Modal Chord Analysis (BETA)
The modal_chord_analysis object identifies a list of notes as tertian chords. The root, chord quality, harmonic function, inversion, and bass note are given as output. For added notes beyond the triad, M is used to indicate major intervals, m for minor intervals, P for perfect intervals. # and b are used to indicate alterations in perfect intervals.
V Objects (included with MOL)
The V Objects Library provides a number of shortcut tools for Max created by V.J. and included with the Modal Object Library.
an abstraction to bang multiple objects in sequence (based on Peter Elsea's banger object).
remove silence from the beginning of an audio recording within a buffer~ object
reports if a patcher is locked or unlocked
allows a user to dump a bunch of files in a named folder and have those files automatically loaded to Max's temp search path when the patch is loaded
audio player abstraction that plays back compressed and uncompressed audio including MP3's
simple abstraction reports if the patch is being run on a Windows or Mac platform
abstraction that reports a nag screen or closes the patch when the trial expiration time has been reached
abstraction that creates a random filename. Output has descriptive filename and random number in front. No more overwriting sfrecord~ files when batch recording in multiple sessions!!
The EAMIR Forum provides further discussion about EAMIR projects including instructional ideas, bug fixes, features requests, and more.