Created
December 26, 2012 15:39
-
-
Save rogerallen/4380962 to your computer and use it in GitHub Desktop.
snippet for use in overtone issue #203
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def SCALE | |
(let [ionian-sequence [2 2 1 2 2 2 1] | |
pentatonic-sequence [3 2 2 3 2] | |
rotate (fn [scale-sequence offset] | |
(take (count scale-sequence) | |
(drop offset (cycle scale-sequence))))] | |
{:diatonic ionian-sequence | |
:ionian (rotate ionian-sequence 0) | |
:major (rotate ionian-sequence 0) | |
:dorian (rotate ionian-sequence 1) | |
:phrygian (rotate ionian-sequence 2) | |
:lydian (rotate ionian-sequence 3) | |
:mixolydian (rotate ionian-sequence 4) | |
:aeolian (rotate ionian-sequence 5) | |
:minor (rotate ionian-sequence 5) | |
:locrian (rotate ionian-sequence 6) | |
:minor-pentatonic (rotate pentatonic-sequence 0) | |
:yu (rotate pentatonic-sequence 0) | |
:major-pentatonic (rotate pentatonic-sequence 1) | |
:gong (rotate pentatonic-sequence 1) | |
:egyptian (rotate pentatonic-sequence 2) | |
:shang (rotate pentatonic-sequence 2) | |
:jiao (rotate pentatonic-sequence 3) | |
:pentatonic (rotate pentatonic-sequence 4) ;; historical match | |
:zhi (rotate pentatonic-sequence 4) | |
:ritusen (rotate pentatonic-sequence 4) | |
;; etc. | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment