mode {name | (name} {option value})} {step}+ [Macro]

Defines a named, transposable subset of a scale. Modes can replace scales when specifying notes, pitches, degrees or intervals and can function as "filters" by using mode-note, mode-degree, or mode-pitch.

Name is the name of the new mode. Following name comes by zero or more option value pairs.

defmode supports the following options:

scale {scale}
Sets the scale of the mode to object, which must be a scale object. Defaults to *standard-scale*.
The step content of a mode is specified as an ascending sequence of relative interval distances. Use the transpose function to set or change the transposition level of a mode.

Example:

? (setf m (mode major 2 2 1 2 2 2 1))
#<MODE: Major>

? (setf x (intervals 0 1 2 3 4 5 6 7 from 'c4) of m))
#<CYCLIC-INTERVAL-STREAM 133753451>

? (read-items x )
(C4 D4 E4 F4 G4 A4 B4 C5)

? (transpose m 'D)
#<MODE: Major (on D)>

? (loop for i from 35 repeat 15 collect (note i m))
(D4 E4 FS4 G4 A4 B4 CS5 D5 E5 FS5 G5 A5 B5 CS6 D6)

? (loop for i from (degree 'c4) below (degree 'c6) by 1
        collect (mode-note i m))
(C4 C4 D4 D4 E4 E4 FS4 FS4 GS4 GS4 AS4 AS4 
    C5 CS5 CS5 DS5 E5 E5 FS5 G5 G5 A5 AS5 AS5)
;;;
;;; a few common mode definitions
;;;

(setf m (mode pentatonic  2 3 2 2 3))
(setf m (mode whole-tone  2 2 2 2 2 2)
(setf m (mode octatonic1  1 2 1 2 1 2 1 2))
(setf m (mode octatonic2  2 1 2 1 2 1 2 1))
(setf m (mode dorian      2 1 2 2 2 1 2))
(setf m (mode phrygian    1 2 2 2 1 2 2))
(setf m (mode lydian      2 2 2 1 2 2 1))
(setf m (mode mixolydian  2 2 1 2 2 1 2))
(setf m (mode aeolian     2 1 2 2 1 2 2))
(setf m (mode locrian     1 2 2 1 2 2 2))
(setf m (mode ionian      2 2 1 2 2 2 1))

See Also:

defscale, mode-note, mode-pitch, mode-degree, transpose [Function], defscales.lisp


Last Modified: 28-Jul-1998