Skip to content

Instantly share code, notes, and snippets.

@jacobstern
Created February 12, 2013 02:20
Utility to name Forte's pitch class sets. Generate a portable script from a TSV file of PCS data using Python's metaprogramming capabilities. Sample output of gen_pcs_script.py included. Sample usage: python gen_pcs_script.py pitch_classes.tsv; python pitch_class_set.py A C# B
#! /usr/bin/python
import csv
import inspect
__pcs_export = set()
def pcs_function(f):
__pcs_export.add(f)
all_sets = {}
def parse_tsv(fh, ignore_header=True):
reader = csv.reader(fh, dialect='excel-tab')
for row in reader:
if ignore_header:
ignore_header = False
else:
yield row
def forte_sets_from_file(fh):
sets = {}
bad_lines, curr_line = [], 1
for values in parse_tsv(fh):
try:
# Unpack values
index, name, prime, vector, description = values
sets[prime] = (name, vector, description)
except ValueError:
bad_lines.append(curr_line)
curr_line += 1
return (sets, bad_lines)
def write_text_block(fh, text):
fh.write(text + '\n\n')
def write_function(fh, fn):
func_body = inspect.getsource(fn)
func_body = func_body.replace('@pcs_function', '').strip() # Remove the @pcs_function decorator
write_text_block(fh, func_body)
@pcs_function
def normalize(n):
return n % 12
@pcs_function
def increment_pitch(n, increment=1):
return normalize(n + increment)
@pcs_function
def decrement_pitch(n, decrement=1):
return increment_pitch(n, -1 * decrement)
@pcs_function
def parse_note_name(pitch_str):
class NoteNameError(Exception):
def __init__(self):
Exception.__init__(self, 'Invalid note name "{0}"'.format(pitch_str))
names = {
'C': 0,
'D': 2,
'E': 4,
'F': 5,
'G': 7,
'A': 9,
'B': 11
}
n = 0
pitch_clean = pitch_str.upper().strip()
try:
pitch_char = pitch_clean[0]
n = names[pitch_char]
for i in xrange(1, len(pitch_clean)):
if pitch_clean[i] == '#':
n = increment_pitch(n)
elif pitch_clean[i] == 'B': # As in b, notation for flat
n = decrement_pitch(n)
else:
raise NoteNameError()
except:
raise NoteNameError()
return n
@pcs_function
def invert_set(pcs):
largest = max(pcs)
return sorted(map(lambda n: decrement_pitch(largest, n), pcs))
@pcs_function
def candidate_sets(pcs):
ordered = sorted(pcs)
n = len(ordered)
# Find the "break" (largest gap in the set) and normalize by it
idx, splitter = max(enumerate(ordered), key=lambda (idx, val): decrement_pitch(val, ordered[(idx - 1) % n]))
rotated = sorted(map(lambda n: decrement_pitch(n, splitter), ordered))
return [ rotated, invert_set(rotated) ]
@pcs_function
def __pcs_main(argv):
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('pitches', nargs='+')
args = parser.parse_args()
raw_set = set()
for token in args.pitches:
pitch = parse_note_name(token)
raw_set.add(pitch)
for pcs in candidate_sets(raw_set):
str_pcs = map(str, pcs)
encoded = ''.join(str_pcs)
if encoded in all_sets:
print '\t'.join(all_sets[encoded])
return 0
print 'Failed to find match for pitch class set.'
return 1
def __gen_main(argv):
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('tsvfile')
parser.add_argument('outputfile', nargs='?', default='pitch_class_set.py')
args = parser.parse_args()
with open(args.tsvfile) as fh:
all_sets, error_lines = forte_sets_from_file(fh)
if error_lines:
str_lines = map(str, error_lines)
print 'Error reading the following lines from the TSV: {0}'.format(','.join(str_lines))
print 'Successfully read {0} pitch class sets.'.format(len(all_sets))
with open(args.outputfile, 'w') as out:
write_text_block(
out,
'#! /usr/bin/python'
)
write_text_block(
out,
'all_sets = ' + all_sets.__repr__()
)
for fn in __pcs_export:
write_function(out, fn)
write_text_block(
out,
'if __name__=="__main__": import sys; __pcs_main(sys.argv)'
)
if __name__ == "__main__":
import sys
__gen_main(sys.argv)
#! /usr/bin/python
all_sets = {'0123469': ('7-10', '445332', ''), '0123468': ('7-9', '453432', ''), '04567': ('5-5B', '321121', 'Major-third Pentacluster.1'), '0123589': ('7-Z18<..38', '434442', ''), '0123467': ('7-4', '544332', ''), '013679': ('6-30 (6)', '224223', 'Minor-bitonal Hexachord/comb R (6), I (5,b)'), '013678': ('6-18B', '322242', 'comb I (5)'), '012': ('3-1*', '210000', 'BACH /Chromatic Trimirror'), '013': ('3-2', '111000', 'Phrygian Trichord'), '014': ('3-3', '101100', 'Major-minor Trichord.1'), '015': ('3-4', '100110', 'Incomplete Major-seventh Chord.1'), '016': ('3-5', '100011', 'Rite chord.2, Tritone-fourth.1'), '012358': ('6-Z40..11B', '333231', ''), '012357': ('6-9', '342231', 'comb I (b)'), '012356': ('6-Z3..36B', '433221', ''), '0': ('1-1*', '000000', 'Unison'), '01234589': ('8-7*', '645652', ''), '02478': ('5-30B', '121321', 'Enigmatic Pentachord.2, Altered Pentatonic (14223)'), '02479': ('5-35*', '032140', 'Black Key Pentatonic/Slendro/Bilahariraga/Quartal Pentamirror, Yo (23232)'), '012456789': ('9-4B', '766773', ''), '01234789': ('8-8*', '644563', ''), '014689': ('6-31B', '223431', 'comb I (b)'), '01257': ('5-14', '221131', 'Double-seconds Triple-fourth Pentachord.1'), '01256': ('5-6', '311221', 'Oriental Pentacluster.1, Raga Megharanji (13161)'), '01258': ('5-Z38..18', '212221', 'Diminished Pentacluster.1'), '02345689': ('8-12B<', '556543', ''), '01235678': ('8-6*', '654463', ''), '01235679': ('8-Z29..15', '555553', ''), '012678': ('6-7* (6)', '420243', "Messiaen's mode 5 (114114), 2nd ord.all-comb(P3+9,I5,Ib,R6,RI2+8)"), '01235678A': ('9-9*', '676683', 'Raga Ramdasi Malhar (r2) (211122111)'), '0234578': ('7-11B', '444441', ''), '0234579': ('7-23', '354351', ''), '01457': ('5-Z18<..38', '212221', 'Gypsy Pentachord.1'), '02358': ('5-25', '123121', 'Diminished-major Ninth Chord'), '0124789': ('7-20', '433452', 'Chromatic Phrygian inverse (1123113)'), '0123456789': ('10-1*', '988884', 'Chromatic Decamirror'), '02357': ('5-23', '132130', 'Minor Pentachord'), '01458': ('5-21', '202420', 'Syrian Pentatonic/Major-augmented Ninth Chord, Raga Megharanji (13134)'), '0135789': ('7-30B', '343542', ''), '012345678A': ('10-2*', '898884', ''), '012356789': ('9-5B', '766674', ''), '0134567': ('7-4B', '544332', ''), '0134568': ('7-11', '444441', ''), '0134569': ('7-16B', '435432', ''), '0235789': ('7-29B', '344352', ''), '0125789': ('7-20B', '433452', 'Pantuvarali Raga (1321131), Chromatic Mixolydian (1131132), Chromatic Dorian/Mela Kanakangi (1132113)'), '01235689A': ('9-11B', '667773', 'Diminishing Nonachord'), '056': ('3-5B', '100011', 'Rite chord.1, Tritone-fourth.2'), '0258': ('4-27', '012111', 'Half-diminished Seventh Chord'), '0145678': ('7-6B', '533442', ''), '0124567': ('7-5B', '543342', ''), '014589': ('6-20*(4)', '303630', 'Augmented scale, Genus tertium, 3rd ord. all-comb (P2+6+10, I3+7+b, R4+8, RI1+5+9)'), '0245789': ('7-27B', '344451', 'Modified Blues mode (2121132)'), '0124569': ('7-Z17*..37', '434541', ''), '0124579A': ('8-26*', '456562', 'Spanish Phrygian (r9) (12112122)/ Blues mode.2 (21211212)'), '034567': ('6-Z36B..3', '433221', ''), '03678': ('5-Z38B..18', '212221', 'Diminished Pentacluster.2'), '0123579A': ('8-22B', '465562', 'Spanish Octatonic Scale (r9) (12111222)'), '034568': ('6-Z39B..10B', '333321', ''), '02346789': ('8-Z29B..15', '555553', ''), '024578': ('6-Z24B..46', '233331', 'Melodic-minor Hexachord'), '024579': ('6-32*', '143250', 'Arezzo major Diatonic (221223), major hexamirror, quartal hexamirror, 1st ord.all-comb P (6), I (3), RI (9)'), '01234689A': ('9-8B', '676764', ''), '0257': ('4-23*', '021030', 'Quartal Tetramirror'), '014578': ('6-Z19B..44', '313431', ''), '012345789A': ('10-5*', '888894', 'Major-minor mixed (r7)'), '01245679': ('8-14<', '555562', ''), '01245678': ('8-5B', '654553', ''), '01367': ('5-19', '212122', 'Javanese Pentachord'), '0167': ('4-9*(6)', '200022', 'Double Tritone Tetramirror'), '012345689': ('9-3', '767763', ''), '01369': ('5-31', '114112', 'Diminished Minor-Ninth Chord'), '01368': ('5-29', '122131', 'Kumoi Pentachord.2'), '0123689': ('7-19B', '434343', ''), '012468A': ('7-33*', '262623', 'Neapolitan-major mode (1222221)/Leading-Whole-tone mode (222211)'), '0124689': ('7-30', '343542', 'Neapolitan-Minor mode (1222131), Mela Dhenuka'), '03457': ('5-11B', '222220', 'Center-cluster Pentachord.2'), '01234568A': ('9-6*', '686763', ''), '023689': ('6-30B (6)', '224223', 'Petrushka chord, Major-bitonal Hexachord, comb R (6), I (1,7)'), '03458': ('5-Z37*..17', '212320', 'Center-cluster Pentamirror'), '0245679': ('7-23B', '354351', 'Tritone Major Heptachord'), '0245678': ('7-9B', '453432', ''), '01236789': ('8-9* (6)', '644464', "Messiaen's mode 4 (11131113)"), '0123456789AB': ('12-1*(1)', 'CCCCC6', 'Chromatic Scale/Dodecamirror (111111111111)'), '01234679A': ('9-10*', '668664', ''), '0156': ('4-8*', '200121', 'Double Fourth Tetramirror'), '0157': ('4-16', '110121', 'Minor-second Quartal Tetrachord'), '0158': ('4-20*', '101220', 'Major-seventh Chord'), '0134589': ('7-21B', '424641', 'Gypsy hexatonic (1312113)'), '013468': ('6-Z24..46B', '233331', ''), '013469': ('6-27', '225222', 'comb I (b)'), '012568': ('6-Z43..17B', '322332', ''), '012569': ('6-Z44..19B', '313431', 'Schoenberg Anagram Hexachord'), '013589': ('6-31', '223431', 'comb I (7)'), '012567': ('6-Z6*..38', '421242', 'Double-cluster Hexamirror'), '013467': ('6-Z13*..42', '324222', 'Alternating Hexamirror/comb RI7)'), '0246789': ('7-24B', '353442', 'Enigmatic Heptatonic (1322211)'), '02345789': ('8-14B<', '555562', ''), '023478': ('6-16B', '322431', 'Megha or "Cloud" Raga/comb.I (1)'), '023479': ('6-Z47B..25', '233241', 'Blues mode.1 (321132)'), '0123579': ('7-24', '353442', ''), '0123578': ('7-14', '443352', ''), '025': ('3-7', '011010', 'Incomplete Minor-seventh Chord'), '024': ('3-6*', '020100', 'Whole-tone Trichord'), '027': ('3-9*', '010020', 'Quartal Trichord'), '026': ('3-8', '010101', 'Incomplete Dominant-seventh Chord.1/Italian-sixth'), '023': ('3-2B', '111000', 'Minor Trichord'), '012368': ('6-Z41..12B', '332232', ''), '012369': ('6-Z42*..13', '324222', 'comb RI (3)'), '0146789': ('7-Z18B<..38', '434442', ''), '01345678': ('8-4B', '655552', ''), '01345679': ('8-12<', '556543', ''), '01246789': ('8-16B', '554563', ''), '01245': ('5-3', '322210', 'Minor-second Major Pentachord'), '01246': ('5-9', '231211', 'Tritone-Expanding Pentachord'), '01247': ('5-Z36..12', '222121', 'Major-seventh Pentacluster.2'), '01248': ('5-13', '221311', 'Augmented Pentacluster.1'), '0123478': ('7-6', '533442', ''), '0123479': ('7-Z12*..36', '444342', ''), '0267': ('4-16B', '110121', 'Tritone Quartal Tetrachord'), '0268': ('4-25*(6)', '020202', 'French-sixth Chord'), '02345': ('5-2B', '332110', 'Major-second Pentacluster.1'), '02346': ('5-8*', '232201', 'Tritone-Symmetric Pentamirror'), '02347': ('5-11', '222220', 'Center-cluster Pentachord.1'), '02348': ('5-13B', '221311', 'Augmented Pentacluster.2'), '0135679': ('7-28<', '344433', ''), '0135678': ('7-14B', '443352', ''), '01567': ('5-7B', '310132', 'Double Pentacluster.2'), '0124678A': ('8-25* (6)', '464644', 'Messiaen mode 6 (11221122)'), '01235': ('5-2', '332110', 'Major-second Pentacluster.2'), '01234': ('5-1*', '432100', 'Chromatic Pentamirror'), '01237': ('5-5', '321121', 'Major-third Pentacluster.2'), '01236': ('5-4', '322111', 'Blues Pentacluster'), '03456': ('5-4B', '322111', 'Minor-third Pentacluster'), '0125689': ('7-22*', '424542', 'Persian, Major Gypsy, Hungarian Minor, Double Harmonic scale, Bhairav That, Mayamdavagaula Raga (all: 1312131), Oriental (1311312)'), '02456789': ('8-11B', '565552', ''), '03567': ('5-Z36B..12', '222121', 'Minor-seventh Pentacluster.1'), '03568': ('5-23B', '123121', 'Minor-diminished Ninth Chord'), '0125678': ('7-7B', '532353', ''), '013689': ('6-Z29*..50', '224232', 'comb RI (9)'), '01235679A': ('9-11', '667773', ''), '0124578': ('7-Z38..18', '434442', ''), '0124579': ('7-27', '344451', ''), '0235689': ('7-31B', '336333', 'Alternating Heptachord.2'), '034678': ('6-15B', '323421', 'comb I (5)'), '01245789': ('8-20*', '545662', ''), '034578': ('6-14B..14B', '323430', 'comb P (6)'), '0369': ('4-28*(3)', '004002', 'Diminished-seventh Chord'), '01234678A': ('9-8', '676764', ''), '0345678': ('7-3B', '544431', ''), '0367': ('4-18B', '102111', 'Minor-diminished Tetrachord'), '02345679': ('8-10*', '566452', ''), '0124679A': ('8-27B', '456553', ''), '024569': ('6-Z46B..24', '233331', ''), '024568': ('6-21B', '242412', 'comb I (3)'), '023568': ('6-Z23*..45', '234222', 'Super-Locrian Hexamirror/comb RI (8)'), '023569': ('6-27B', '225222', 'Pyramid Hexachord/comb I (1)'), '023567': ('6-Z11B..40', '333231', ''), '024567': ('6-9B', '342231', 'comb I (3)'), '01456': ('5-6B', '311221', 'Oriental Pentacluster.2'), '012346789': ('9-5', '766674', ''), '01378': ('5-20', '211231', 'Balinese Pelog Pentatonic (12414), Raga Bhupala, Raga Bibhas'), '01356789': ('8-Z15B..29', '555553', ''), '0124578A': ('8-27', '456553', ''), '0134': ('4-3*', '212100', 'Alternating Tetramirror'), '0135': ('4-11', '121110', 'Phrygian Tetrachord'), '0136': ('4-13', '112011', 'Minor-second Diminished Tetrachord'), '0137': ('4-Z29..15', '111111', 'All-interval Tetrachord.3'), '02356': ('5-10B', '223111', 'Alternating Pentachord.2'), '02578': ('5-29B', '122131', 'Kumoi Pentachord.1'), '012345789': ('9-4', '766773', ''), '0145': ('4-7*', '201210', 'Arabian Tetramirror'), '0147': ('4-18', '102111', 'Major-diminished Tetrachord'), '0146': ('4-Z15..29', '111111', 'All-interval Tetrachord.1'), '0148': ('4-19', '101310', 'Minor-augmented Tetrachord'), '013479': ('6-Z49*..28', '224322', 'Prometheus Neapolitan mode (132312), comb RI (4)'), '013478': ('6-Z19..44B', '313431', ''), '012579': ('6-Z48*..26', '232341', 'comb RI (2)'), '012578': ('6-18', '322242', 'comb I (b)'), '01234578': ('8-4', '655552', ''), '01234579': ('8-11', '565552', ''), '013578': ('6-Z26*..48', '232341', 'Phrygian Hexamirror/comb RI (8)'), '013579': ('6-34', '142422', "Scriabin's Mystic Chord or Prometheus Hexachord/comb I (B)"), '012478': ('6-Z17..43B', '322332', ''), '012479': ('6-Z47..25B', '233241', ''), '01234578A': ('9-7', '677673', 'Nonatonic Blues Scale (211111212)'), '01469': ('5-32', '113221', 'Neapolitan Pentachord.1'), '0123456789A': ('11-1*', 'AAAAA5', 'Chromatic Undecamirror'), '01234679': ('8-13', '556453', ''), '01234678': ('8-5', '654553', ''), '023467': ('6-Z10B..39B', '333321', ''), '01235689': ('8-18', '546553', ''), '023469': ('6-Z45*..23', '234222', 'comb RI (6)'), '023468': ('6-21', '242412', 'comb I (1)'), '0123568': ('7-Z36..12', '444342', ''), '0123569': ('7-16', '435432', ''), '0123567': ('7-5', '543342', ''), '012378': ('6-Z38*..6', '421242', 'comb RI (3)'), '036': ('3-10*', '002001', 'Diminished Chord'), '037': ('3-11', '001110', 'Minor Chord'), '034': ('3-3B', '101100', 'Major-minor Trichord.2'), '035': ('3-7B', '011010', 'Incomplete Dominant-seventh Chord.2'), '02': ('2-2*', '010000', 'Whole-tone'), '03': ('2-3*', '001000', 'Minor Third'), '01': ('2-1*', '100000', 'Semitone'), '06': ('2-6*(6)', '000001', 'Tritone'), '04': ('2-4*', '000100', 'Major Third'), '05': ('2-5*', '000010', 'Perfect Fourth'), '02458': ('5-26<', '122311', 'Diminished-augmented Ninth Chord'), '023456789': ('9-2B', '777663', ''), '02456': ('5-9B', '231211', 'Tritone-Contracting Pentachord'), '02457': ('5-23B', '132130', 'Major Pentachord'), '01345689': ('8-17*', '546652', ''), '0134679A': ('8-28* (3)', '448444', 'Alternating Octatonic or Diminished scale (12121212)'), '0356': ('4-13B', '112011', 'Perfect-fourth Diminished Tetrachord'), '0357': ('4-22B', '021120', 'Perfect-fourth Minor Tetrachord'), '0358': ('4-26*', '012120', 'Minor-seventh Chord'), '0457': ('4-14B<', '111120', 'Perfect-fourth Major Tetrachord'), '0456': ('4-5B', '210111', 'Major Third Tetracluster.1'), '012589': ('6-Z44B..19', '313431', 'Bauli raga (133131)'), '0235678': ('7-Z36B..12', '444342', ''), '0235679': ('7-25B', '345342', ''), '01245689': ('8-19', '545752', ''), '01578': ('5-20B', '211231', 'Hirajoshi Pentatonic (21414), Iwato (14142), Sakura/Raga Saveri (14214)'), '01479': ('5-32B', '113221', 'Neapolitan Pentachord.2'), '01478': ('5-22*', '202321', 'Persian Pentamirror, Raga reva/Ramkali (13314)'), '01348': ('5-Z17*..37', '212320', 'Minor-major Ninth Chord'), '01345': ('5-3B', '322210', 'Spanish Pentacluster'), 'empty': ('0-1', '000000', 'Null set'), '01346': ('5-10', '223111', 'Alternating Pentachord.1'), '023458': ('6-Z39..10', '333321', ''), '023456': ('6-2B', '443211', 'comb I (1)'), '023457': ('6-8*', '343230', '1st ord.all-comb (P6, I1, RI7)'), '03578': ('5-27B', '122230', 'Minor-Ninth Chord'), '03478': ('5-21B', '202420', 'Lebanese Pentachord/Augmented-minor Chord'), '03467': ('5-16B', '213211', 'Major-minor-dim Pentachord.2'), '024679': ('6-33B', '143241', 'Dominant-11th/Lydian Hexachord/comb I (5)'), '024678': ('6-22B', '241422', 'comb I (5)'), '01234689': ('8-Z15..29', '555553', ''), '012345689A': ('10-4*', '888984', ''), '025678': ('6-Z41B..12', '332232', ''), '0124589': ('7-21', '424641', ''), '0123458': ('7-3', '544431', ''), '0368': ('4-27B', '012111', 'Dominant-seventh/German-sixth Chord'), '0123456': ('7-1*', '654321', 'Chromatic Heptamirror'), '0123457': ('7-2', '554331', ''), '0123468A': ('8-21*', '474643', ''), '012348': ('6-Z37*..4', '432321', 'comb RI (4)'), '0234679': ('7-25', '345342', ''), '0234678': ('7-13B', '443532', ''), '012346': ('6-2', '443211', 'comb I (b)'), '012347': ('6-Z36..3B', '433221', ''), '012345': ('6-1*', '543210', 'Chromatic Hexamirror/1st ord. all-comb (P6, Ib, RI5)'), '02467': ('5-24B', '131221', 'Lydian Pentachord'), '012367': ('6-5', '422232', 'comb I (b)'), '014678': ('6-Z17B..43', '322332', ''), '014679': ('6-Z50*..29', '224232', 'comb RI (1)'), '013456789': ('9-3B', '767763', ''), '02469': ('5-34*', '032221', 'Dominant-ninth/major-minor/Prometheus Pentamirror, Dominant Pentatonic (22332)'), '02468': ('5-33*', '040402', 'Whole-tone Pentamirror'), '0123678': ('7-7', '532353', ''), '0123679': ('7-19', '434343', ''), '023579': ('6-33', '143241', 'Dorian Hexachord/comb I (1)'), '023578': ('6-Z25B..47', '233241', 'Minor Hexachord'), '0237': ('4-14<', '111120', 'Major-second Minor Tetrachord'), '0236': ('4-12<', '112101', 'Harmonic-minor Tetrachord'), '0235': ('4-10*', '122010', 'Minor Tetramirror'), '0234': ('4-2B', '221100', 'Major-second Tetracluster.1'), '01234579A': ('9-7B', '677673', ''), '01268': ('5-15*', '220222', 'Assymetric Pentamirror'), '0124679': ('7-29', '344352', ''), '01267': ('5-7', '310132', 'DoublePentacluster.1, Raga Nabhomani (11415)'), '013568A': ('7-35*', '254361', 'Major Diatonic Heptachord/Dominant-13th, Locrian (1221222), Phrygian (1222122), Major inverse'), '0127': ('4-6*', '210021', 'Perfect Fourth Tetramirror'), '0126': ('4-5', '210111', 'Major Third Tetracluster.2'), '0125': ('4-4', '211110', 'Minor Third Tetracluster.2'), '0124': ('4-2', '221100', 'Major-second Tetracluster.2'), '0123': ('4-1*', '321000', 'BACH /Chromatic Tetramirror'), '0135689': ('7-32B', '335442', 'Dharmavati Scale (2131221), Harmonic minor inverse (1312212), Mela Cakravana, Raga Ahir Bhairav'), '01245689A': ('9-12* (4)', '666963', 'Tsjerepnin/Messiaen mode 3 (112112112)'), '02356789': ('8-13B', '556453', ''), '02568': ('5-28B<', '122212', 'Augmented-sixth Pentachord.2'), '02567': ('5-14B', '221131', 'Double-seconds Triple-fourth Pentachord.2'), '0234569': ('7-10B', '445332', ''), '0234568': ('7-8*', '454422', ''), '02368': ('5-28<', '122212', 'Augmented-sixth Pentachord.1'), '02369': ('5-31B', '114112', 'Ranjaniraga/Flat-Ninth Pentachord'), '02367': ('5-Z18B<..38', '212221', 'Gypsy Pentachord.2'), '0124568A': ('8-24*', '464743', ''), '0234567': ('7-2B', '554331', ''), '023678': ('6-Z43B..17', '322332', ''), '0234689': ('7-28B<', '344433', ''), '013569': ('6-Z28*..49', '224322', 'Double-Phrygian Hexachord/comb RI (6)'), '013568': ('6-Z25..47B', '233241', 'Locrian Hexachord/Suddha Saveriraga'), '01234569': ('8-3*', '656542', ''), '012468': ('6-22', '241422', 'comb I (b)'), '012467': ('6-Z12..41B', '332232', ''), '013567': ('6-Z12B..41', '332232', ''), '0123568A': ('8-22', '465562', ''), '0134579': ('7-26<', '344532', ''), '0134578': ('7-Z37*..17', '434541', ''), '0245689': ('7-26B<', '344532', ''), '0134678': ('7-Z38B..18', '434442', ''), '0134679': ('7-31', '336333', 'Alternating Heptachord.1/Hungarian Major mode (3121212)'), '048': ('3-12*(4)', '000300', 'Augmented Chord'), '047': ('3-11B', '001110', 'Major Chord'), '046': ('3-8B', '010101', 'Incomplete Half-dim-seventh Chord'), '045': ('3-4B', '100110', 'Incomplete Major-seventh Chord.2'), '01346789': ('8-18B', '546553', ''), '01235789': ('8-16', '554563', ''), '0347': ('4-17*', '102210', 'Major-minor Tetramirror'), '0346': ('4-12B<', '112101', 'Major-third Diminished Tetrachord'), '0345': ('4-4B', '211110', 'Minor Third Tetracluster.1'), '0348': ('4-19B', '101310', 'Augmented-major Tetrachord'), '01345789': ('8-19B', '545752', ''), '0123578A': ('8-23*', '465472', 'Quartal Octachord, Diatonic Octad'), '012346789A': ('10-6* (6)', '888885', 'Messiaen mode 7 (1111211112)'), '0467': ('4-Z29B..15', '111111', 'All-interval Tetrachord.4'), '014567': ('6-5B', '422232', 'comb I (3)'), '0246': ('4-21*', '030201', 'Whole-tone Tetramirror'), '0247': ('4-22', '021120', 'Major-second Major Tetrachord'), '0245': ('4-11B', '121110', 'Major Tetrachord'), '0248': ('4-24*', '020301', 'Augmented Seventh Chord'), '02345678': ('8-2B', '665542', ''), '014568': ('6-16', '322431', 'comb I (3)'), '035678': ('6-Z40B..11', '333231', ''), '012345679A': ('10-3*', '889884', ''), '01468': ('5-30', '121321', 'Enigmatic Pentachord.1'), '0124678': ('7-15*', '442443', ''), '01467': ('5-19B', '212122', 'Balinese Pentachord'), '0124568': ('7-13', '443532', ''), '01358': ('5-27', '122230', 'Major-Ninth Chord'), '01347': ('5-16', '213211', 'Major-minor-dim Pentachord.1'), '01356': ('5-Z12*..36', '222121', 'Locrian Pentamirror'), '01357': ('5-24', '131221', 'Phrygian Pentachord'), '012345679': ('9-2', '777663', ''), '012345678': ('9-1*', '876663', 'Chromatic Nonamirror'), '013468A': ('7-34*', '254442', 'Harmonic/Super-Locrian, Melodic minor ascending (1212222)/Aug.13th Heptamirror, Jazz Minor'), '012469': ('6-Z46..24B', '233331', ''), '01234568': ('8-2', '665542', ''), '01234567': ('8-1*', '765442', 'Chromatic Octamirror'), '0256': ('4-Z15B..29', '111111', 'All-interval Tetrachord.2'), '03468': ('5-26B<', '122311', 'Augmented-diminished Ninth Chord'), '02468A': ('6-35*(2)', '060603', 'Wholetone scale/6th ord.all-comb.(P+IoddT, R+RIevenT)'), '012456': ('6-Z4*..37', '432321', 'comb RI (6)'), '012457': ('6-Z11..40B', '333231', ''), '013458': ('6-14..14', '323430', 'comb P (6)'), '024689': ('6-34B', '142422', 'Harmonic Hexachord/Augmented-11th/comb I (7)'), '013457': ('6-Z10..39', '333321', ''), '013456': ('6-Z3B..36', '433221', ''), '012458': ('6-15', '323421', 'comb I (b)'), '0134689': ('7-32', '335442', 'Harmonic-Minor mode (2122131), Spanish Gypsy, Mela Kiravani, Pilu That')}
def parse_note_name(pitch_str):
class NoteNameError(Exception):
def __init__(self):
Exception.__init__(self, 'Invalid note name "{0}"'.format(pitch_str))
names = {
'C': 0,
'D': 2,
'E': 4,
'F': 5,
'G': 7,
'A': 9,
'B': 11
}
n = 0
pitch_clean = pitch_str.upper().strip()
try:
pitch_char = pitch_clean[0]
n = names[pitch_char]
for i in xrange(1, len(pitch_clean)):
if pitch_clean[i] == '#':
n = increment_pitch(n)
elif pitch_clean[i] == 'B': # As in b, notation for flat
n = decrement_pitch(n)
else:
raise NoteNameError()
except:
raise NoteNameError()
return n
def normalize(n):
return n % 12
def invert_set(pcs):
largest = max(pcs)
return sorted(map(lambda n: decrement_pitch(largest, n), pcs))
def candidate_sets(pcs):
ordered = sorted(pcs)
n = len(ordered)
# Find the "break" (largest gap in the set) and normalize by it
idx, splitter = max(enumerate(ordered), key=lambda (idx, val): decrement_pitch(val, ordered[(idx - 1) % n]))
rotated = sorted(map(lambda n: decrement_pitch(n, splitter), ordered))
return [ rotated, invert_set(rotated) ]
def increment_pitch(n, increment=1):
return normalize(n + increment)
def __pcs_main(argv):
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('pitches', nargs='+')
args = parser.parse_args()
raw_set = set()
for token in args.pitches:
pitch = parse_note_name(token)
raw_set.add(pitch)
for pcs in candidate_sets(raw_set):
str_pcs = map(str, pcs)
encoded = ''.join(str_pcs)
if encoded in all_sets:
print '\t'.join(all_sets[encoded])
return 0
print 'Failed to find match for pitch class set.'
return 1
def decrement_pitch(n, decrement=1):
return increment_pitch(n, -1 * decrement)
if __name__=="__main__": import sys; __pcs_main(sys.argv)
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 132.
# Forte cross-referenced Set-name Prime Interval Vector Descriptive name/properties
0 0-1 empty 000000 Null set
1 1-1* 0 000000 Unison
2 2-1* 01 100000 Semitone
3 2-2* 02 010000 Whole-tone
4 2-3* 03 001000 Minor Third
5 2-4* 04 000100 Major Third
6 2-5* 05 000010 Perfect Fourth
7 2-6*(6) 06 000001 Tritone
8 3-1* 012 210000 BACH /Chromatic Trimirror
9 3-2 013 111000 Phrygian Trichord
10 3-2B 023 111000 Minor Trichord
11 3-3 014 101100 Major-minor Trichord.1
12 3-3B 034 101100 Major-minor Trichord.2
13 3-4 015 100110 Incomplete Major-seventh Chord.1
14 3-4B 045 100110 Incomplete Major-seventh Chord.2
15 3-5 016 100011 Rite chord.2, Tritone-fourth.1
16 3-5B 056 100011 Rite chord.1, Tritone-fourth.2
17 3-6* 024 020100 Whole-tone Trichord
18 3-7 025 011010 Incomplete Minor-seventh Chord
19 3-7B 035 011010 Incomplete Dominant-seventh Chord.2
20 3-8 026 010101 Incomplete Dominant-seventh Chord.1/Italian-sixth
21 3-8B 046 010101 Incomplete Half-dim-seventh Chord
22 3-9* 027 010020 Quartal Trichord
23 3-10* 036 002001 Diminished Chord
24 3-11 037 001110 Minor Chord
25 3-11B 047 001110 Major Chord
26 3-12*(4) 048 000300 Augmented Chord
27 4-1* 0123 321000 BACH /Chromatic Tetramirror
28 4-2 0124 221100 Major-second Tetracluster.2
29 4-2B 0234 221100 Major-second Tetracluster.1
30 4-3* 0134 212100 Alternating Tetramirror
31 4-4 0125 211110 Minor Third Tetracluster.2
32 4-4B 0345 211110 Minor Third Tetracluster.1
33 4-5 0126 210111 Major Third Tetracluster.2
34 4-5B 0456 210111 Major Third Tetracluster.1
35 4-6* 0127 210021 Perfect Fourth Tetramirror
36 4-7* 0145 201210 Arabian Tetramirror
37 4-8* 0156 200121 Double Fourth Tetramirror
38 4-9*(6) 0167 200022 Double Tritone Tetramirror
39 4-10* 0235 122010 Minor Tetramirror
40 4-11 0135 121110 Phrygian Tetrachord
41 4-11B 0245 121110 Major Tetrachord
42 4-12< 0236 112101 Harmonic-minor Tetrachord
43 4-12B< 0346 112101 Major-third Diminished Tetrachord
44 4-13 0136 112011 Minor-second Diminished Tetrachord
45 4-13B 0356 112011 Perfect-fourth Diminished Tetrachord
46 4-14< 0237 111120 Major-second Minor Tetrachord
47 4-14B< 0457 111120 Perfect-fourth Major Tetrachord
48 4-Z15..29 0146 111111 All-interval Tetrachord.1
49 4-Z15B..29 0256 111111 All-interval Tetrachord.2
50 4-16 0157 110121 Minor-second Quartal Tetrachord
51 4-16B 0267 110121 Tritone Quartal Tetrachord
52 4-17* 0347 102210 Major-minor Tetramirror
53 4-18 0147 102111 Major-diminished Tetrachord
54 4-18B 0367 102111 Minor-diminished Tetrachord
55 4-19 0148 101310 Minor-augmented Tetrachord
56 4-19B 0348 101310 Augmented-major Tetrachord
57 4-20* 0158 101220 Major-seventh Chord
58 4-21* 0246 030201 Whole-tone Tetramirror
59 4-22 0247 021120 Major-second Major Tetrachord
60 4-22B 0357 021120 Perfect-fourth Minor Tetrachord
61 4-23* 0257 021030 Quartal Tetramirror
62 4-24* 0248 020301 Augmented Seventh Chord
63 4-25*(6) 0268 020202 French-sixth Chord
64 4-26* 0358 012120 Minor-seventh Chord
65 4-27 0258 012111 Half-diminished Seventh Chord
66 4-27B 0368 012111 Dominant-seventh/German-sixth Chord
67 4-28*(3) 0369 004002 Diminished-seventh Chord
68 4-Z29..15 0137 111111 All-interval Tetrachord.3
69 4-Z29B..15 0467 111111 All-interval Tetrachord.4
70 5-1* 01234 432100 Chromatic Pentamirror
71 5-2 01235 332110 Major-second Pentacluster.2
72 5-2B 02345 332110 Major-second Pentacluster.1
73 5-3 01245 322210 Minor-second Major Pentachord
74 5-3B 01345 322210 Spanish Pentacluster
75 5-4 01236 322111 Blues Pentacluster
76 5-4B 03456 322111 Minor-third Pentacluster
77 5-5 01237 321121 Major-third Pentacluster.2
78 5-5B 04567 321121 Major-third Pentacluster.1
79 5-6 01256 311221 Oriental Pentacluster.1, Raga Megharanji (13161)
80 5-6B 01456 311221 Oriental Pentacluster.2
81 5-7 01267 310132 DoublePentacluster.1, Raga Nabhomani (11415)
82 5-7B 01567 310132 Double Pentacluster.2
83 5-8* 02346 232201 Tritone-Symmetric Pentamirror
84 5-9 01246 231211 Tritone-Expanding Pentachord
85 5-9B 02456 231211 Tritone-Contracting Pentachord
86 5-10 01346 223111 Alternating Pentachord.1
87 5-10B 02356 223111 Alternating Pentachord.2
88 5-11 02347 222220 Center-cluster Pentachord.1
89 5-11B 03457 222220 Center-cluster Pentachord.2
90 5-Z12*..36 01356 222121 Locrian Pentamirror
91 5-13 01248 221311 Augmented Pentacluster.1
92 5-13B 02348 221311 Augmented Pentacluster.2
93 5-14 01257 221131 Double-seconds Triple-fourth Pentachord.1
94 5-14B 02567 221131 Double-seconds Triple-fourth Pentachord.2
95 5-15* 01268 220222 Assymetric Pentamirror
96 5-16 01347 213211 Major-minor-dim Pentachord.1
97 5-16B 03467 213211 Major-minor-dim Pentachord.2
98 5-Z17*..37 01348 212320 Minor-major Ninth Chord
99 5-Z18<..38 01457 212221 Gypsy Pentachord.1
100 5-Z18B<..38 02367 212221 Gypsy Pentachord.2
101 5-19 01367 212122 Javanese Pentachord
102 5-19B 01467 212122 Balinese Pentachord
103 5-20 01378 211231 Balinese Pelog Pentatonic (12414), Raga Bhupala, Raga Bibhas
104 5-20B 01578 211231 Hirajoshi Pentatonic (21414), Iwato (14142), Sakura/Raga Saveri (14214)
105 5-21 01458 202420 Syrian Pentatonic/Major-augmented Ninth Chord, Raga Megharanji (13134)
106 5-21B 03478 202420 Lebanese Pentachord/Augmented-minor Chord
107 5-22* 01478 202321 Persian Pentamirror, Raga reva/Ramkali (13314)
108 5-23 02357 132130 Minor Pentachord
109 5-23B 02457 132130 Major Pentachord
110 5-24 01357 131221 Phrygian Pentachord
111 5-24B 02467 131221 Lydian Pentachord
112 5-25 02358 123121 Diminished-major Ninth Chord
113 5-23B 03568 123121 Minor-diminished Ninth Chord
114 5-26< 02458 122311 Diminished-augmented Ninth Chord
115 5-26B< 03468 122311 Augmented-diminished Ninth Chord
116 5-27 01358 122230 Major-Ninth Chord
117 5-27B 03578 122230 Minor-Ninth Chord
118 5-28< 02368 122212 Augmented-sixth Pentachord.1
119 5-28B< 02568 122212 Augmented-sixth Pentachord.2
120 5-29 01368 122131 Kumoi Pentachord.2
121 5-29B 02578 122131 Kumoi Pentachord.1
122 5-30 01468 121321 Enigmatic Pentachord.1
123 5-30B 02478 121321 Enigmatic Pentachord.2, Altered Pentatonic (14223)
124 5-31 01369 114112 Diminished Minor-Ninth Chord
125 5-31B 02369 114112 Ranjaniraga/Flat-Ninth Pentachord
126 5-32 01469 113221 Neapolitan Pentachord.1
127 5-32B 01479 113221 Neapolitan Pentachord.2
128 5-33* 02468 040402 Whole-tone Pentamirror
129 5-34* 02469 032221 Dominant-ninth/major-minor/Prometheus Pentamirror, Dominant Pentatonic (22332)
130 5-35* 02479 032140 "Black Key" Pentatonic/Slendro/Bilahariraga/Quartal Pentamirror, Yo (23232)
131 5-Z36..12 01247 222121 Major-seventh Pentacluster.2
132 5-Z36B..12 03567 222121 Minor-seventh Pentacluster.1
133 5-Z37*..17 03458 212320 Center-cluster Pentamirror
134 5-Z38..18 01258 212221 Diminished Pentacluster.1
135 5-Z38B..18 03678 212221 Diminished Pentacluster.2
136 6-1* 012345 543210 Chromatic Hexamirror/1st ord. all-comb (P6, Ib, RI5)
137 6-2 012346 443211 comb I (b)
138 6-2B 023456 443211 comb I (1)
139 6-Z3..36B 012356 433221
140 6-Z3B..36 013456 433221
141 6-Z4*..37 012456 432321 comb RI (6)
142 6-5 012367 422232 comb I (b)
143 6-5B 014567 422232 comb I (3)
144 6-Z6*..38 012567 421242 Double-cluster Hexamirror
145 6-7* (6) 012678 420243 Messiaen's mode 5 (114114), 2nd ord.all-comb(P3+9,I5,Ib,R6,RI2+8)
146 6-8* 023457 343230 1st ord.all-comb (P6, I1, RI7)
147 6-9 012357 342231 comb I (b)
148 6-9B 024567 342231 comb I (3)
149 6-Z10..39 013457 333321
150 6-Z10B..39B 023467 333321
151 6-Z11..40B 012457 333231
152 6-Z11B..40 023567 333231
153 6-Z12..41B 012467 332232
154 6-Z12B..41 013567 332232
155 6-Z13*..42 013467 324222 Alternating Hexamirror/comb RI7)
156 6-14..14 013458 323430 comb P (6)
157 6-14B..14B 034578 323430 comb P (6)
158 6-15 012458 323421 comb I (b)
159 6-15B 034678 323421 comb I (5)
160 6-16 014568 322431 comb I (3)
161 6-16B 023478 322431 Megha or "Cloud" Raga/comb.I (1)
162 6-Z17..43B 012478 322332
163 6-Z17B..43 014678 322332
164 6-18 012578 322242 comb I (b)
165 6-18B 013678 322242 comb I (5)
166 6-Z19..44B 013478 313431
167 6-Z19B..44 014578 313431
168 6-20*(4) 014589 303630 Augmented scale, Genus tertium, 3rd ord. all-comb (P2+6+10, I3+7+b, R4+8, RI1+5+9)
169 6-21 023468 242412 comb I (1)
170 6-21B 024568 242412 comb I (3)
171 6-22 012468 241422 comb I (b)
172 6-22B 024678 241422 comb I (5)
173 6-Z23*..45 023568 234222 Super-Locrian Hexamirror/comb RI (8)
174 6-Z24..46B 013468 233331
175 6-Z24B..46 024578 233331 Melodic-minor Hexachord
176 6-Z25..47B 013568 233241 Locrian Hexachord/Suddha Saveriraga
177 6-Z25B..47 023578 233241 Minor Hexachord
178 6-Z26*..48 013578 232341 Phrygian Hexamirror/comb RI (8)
179 6-27 013469 225222 comb I (b)
180 6-27B 023569 225222 Pyramid Hexachord/comb I (1)
181 6-Z28*..49 013569 224322 Double-Phrygian Hexachord/comb RI (6)
182 6-Z29*..50 013689 224232 comb RI (9)
183 6-30 (6) 013679 224223 Minor-bitonal Hexachord/comb R (6), I (5,b)
184 6-30B (6) 023689 224223 Petrushka chord, Major-bitonal Hexachord, comb R (6), I (1,7)
185 6-31 013589 223431 comb I (7)
186 6-31B 014689 223431 comb I (b)
187 6-32* 024579 143250 Arezzo major Diatonic (221223), major hexamirror, quartal hexamirror, 1st ord.all-comb P (6), I (3), RI (9)
188 6-33 023579 143241 Dorian Hexachord/comb I (1)
189 6-33B 024679 143241 Dominant-11th/Lydian Hexachord/comb I (5)
190 6-34 013579 142422 Scriabin's Mystic Chord or Prometheus Hexachord/comb I (B)
191 6-34B 024689 142422 Harmonic Hexachord/Augmented-11th/comb I (7)
192 6-35*(2) 02468A 060603 Wholetone scale/6th ord.all-comb.(P+IoddT, R+RIevenT)
193 6-Z36..3B 012347 433221
194 6-Z36B..3 034567 433221
195 6-Z37*..4 012348 432321 comb RI (4)
196 6-Z38*..6 012378 421242 comb RI (3)
197 6-Z39..10 023458 333321
198 6-Z39B..10B 034568 333321
199 6-Z40..11B 012358 333231
200 6-Z40B..11 035678 333231
201 6-Z41..12B 012368 332232
202 6-Z41B..12 025678 332232
203 6-Z42*..13 012369 324222 comb RI (3)
204 6-Z43..17B 012568 322332
205 6-Z43B..17 023678 322332
206 6-Z44..19B 012569 313431 Schoenberg Anagram Hexachord
207 6-Z44B..19 012589 313431 Bauli raga (133131)
208 6-Z45*..23 023469 234222 comb RI (6)
209 6-Z46..24B 012469 233331
210 6-Z46B..24 024569 233331
211 6-Z47..25B 012479 233241
212 6-Z47B..25 023479 233241 Blues mode.1 (321132)
213 6-Z48*..26 012579 232341 comb RI (2)
214 6-Z49*..28 013479 224322 Prometheus Neapolitan mode (132312), comb RI (4)
215 6-Z50*..29 014679 224232 comb RI (1)
216 7-1* 0123456 654321 Chromatic Heptamirror
217 7-2 0123457 554331
218 7-2B 0234567 554331
219 7-3 0123458 544431
220 7-3B 0345678 544431
221 7-4 0123467 544332
222 7-4B 0134567 544332
223 7-5 0123567 543342
224 7-5B 0124567 543342
225 7-6 0123478 533442
226 7-6B 0145678 533442
227 7-7 0123678 532353
228 7-7B 0125678 532353
229 7-8* 0234568 454422
230 7-9 0123468 453432
231 7-9B 0245678 453432
232 7-10 0123469 445332
233 7-10B 0234569 445332
234 7-11 0134568 444441
235 7-11B 0234578 444441
236 7-Z12*..36 0123479 444342
237 7-13 0124568 443532
238 7-13B 0234678 443532
239 7-14 0123578 443352
240 7-14B 0135678 443352
241 7-15* 0124678 442443
242 7-16 0123569 435432
243 7-16B 0134569 435432
244 7-Z17*..37 0124569 434541
245 7-Z18<..38 0123589 434442
246 7-Z18B<..38 0146789 434442
247 7-19 0123679 434343
248 7-19B 0123689 434343
249 7-20 0124789 433452 Chromatic Phrygian inverse (1123113)
250 7-20B 0125789 433452 Pantuvarali Raga (1321131), Chromatic Mixolydian (1131132), Chromatic Dorian/Mela Kanakangi (1132113)
251 7-21 0124589 424641
252 7-21B 0134589 424641 Gypsy hexatonic (1312113)
253 7-22* 0125689 424542 Persian, Major Gypsy, Hungarian Minor, Double Harmonic scale, Bhairav That, Mayamdavagaula Raga (all: 1312131), Oriental (1311312)
254 7-23 0234579 354351
255 7-23B 0245679 354351 Tritone Major Heptachord
256 7-24 0123579 353442
257 7-24B 0246789 353442 Enigmatic Heptatonic (1322211)
258 7-25 0234679 345342
259 7-25B 0235679 345342
260 7-26< 0134579 344532
261 7-26B< 0245689 344532
262 7-27 0124579 344451
263 7-27B 0245789 344451 Modified Blues mode (2121132)
264 7-28< 0135679 344433
265 7-28B< 0234689 344433
266 7-29 0124679 344352
267 7-29B 0235789 344352
268 7-30 0124689 343542 Neapolitan-Minor mode (1222131), Mela Dhenuka
269 7-30B 0135789 343542
270 7-31 0134679 336333 Alternating Heptachord.1/Hungarian Major mode (3121212)
271 7-31B 0235689 336333 Alternating Heptachord.2
272 7-32 0134689 335442 Harmonic-Minor mode (2122131), Spanish Gypsy, Mela Kiravani, Pilu That
273 7-32B 0135689 335442 Dharmavati Scale (2131221), Harmonic minor inverse (1312212), Mela Cakravana, Raga Ahir Bhairav
274 7-33* 012468A 262623 Neapolitan-major mode (1222221)/Leading-Whole-tone mode (222211)
275 7-34* 013468A 254442 Harmonic/Super-Locrian, Melodic minor ascending (1212222)/Aug.13th Heptamirror, Jazz Minor
276 7-35* 013568A 254361 Major Diatonic Heptachord/Dominant-13th, Locrian (1221222), Phrygian (1222122), Major inverse
277 7-Z36..12 0123568 444342
278 7-Z36B..12 0235678 444342
279 7-Z37*..17 0134578 434541
280 7-Z38..18 0124578 434442
281 7-Z38B..18 0134678 434442
282 8-1* 01234567 765442 Chromatic Octamirror
283 8-2 01234568 665542
284 8-2B 02345678 665542
285 8-3* 01234569 656542
286 8-4 01234578 655552
287 8-4B 01345678 655552
288 8-5 01234678 654553
289 8-5B 01245678 654553
290 8-6* 01235678 654463
291 8-7* 01234589 645652
292 8-8* 01234789 644563
293 8-9* (6) 01236789 644464 Messiaen's mode 4 (11131113)
294 8-10* 02345679 566452
295 8-11 01234579 565552
296 8-11B 02456789 565552
297 8-12< 01345679 556543
298 8-12B< 02345689 556543
299 8-13 01234679 556453
300 8-13B 02356789 556453
301 8-14< 01245679 555562
302 8-14B< 02345789 555562
303 8-Z15..29 01234689 555553
304 8-Z15B..29 01356789 555553
305 8-16 01235789 554563
306 8-16B 01246789 554563
307 8-17* 01345689 546652
308 8-18 01235689 546553
309 8-18B 01346789 546553
310 8-19 01245689 545752
311 8-19B 01345789 545752
312 8-20* 01245789 545662
313 8-21* 0123468A 474643
314 8-22 0123568A 465562
315 8-22B 0123579A 465562 Spanish Octatonic Scale (r9) (12111222)
316 8-23* 0123578A 465472 Quartal Octachord, Diatonic Octad
317 8-24* 0124568A 464743
318 8-25* (6) 0124678A 464644 Messiaen mode 6 (11221122)
319 8-26* 0124579A 456562 Spanish Phrygian (r9) (12112122)/ Blues mode.2 (21211212)
320 8-27 0124578A 456553
321 8-27B 0124679A 456553
322 8-28* (3) 0134679A 448444 Alternating Octatonic or Diminished scale (12121212)
323 8-Z29..15 01235679 555553
324 8-Z29B..15 02346789 555553
325 9-1* 012345678 876663 Chromatic Nonamirror
326 9-2 012345679 777663
327 9-2B 023456789 777663
328 9-3 012345689 767763
329 9-3B 013456789 767763
330 9-4 012345789 766773
331 9-4B 012456789 766773
332 9-5 012346789 766674
333 9-5B 012356789 766674
334 9-6* 01234568A 686763
335 9-7 01234578A 677673 Nonatonic Blues Scale (211111212)
336 9-7B 01234579A 677673
337 9-8 01234678A 676764
338 9-8B 01234689A 676764
339 9-9* 01235678A 676683 Raga Ramdasi Malhar (r2) (211122111)
340 9-10* 01234679A 668664
341 9-11 01235679A 667773
342 9-11B 01235689A 667773 Diminishing Nonachord
343 9-12* (4) 01245689A 666963 Tsjerepnin/Messiaen mode 3 (112112112)
344 10-1* 0123456789 988884 Chromatic Decamirror
345 10-2* 012345678A 898884
346 10-3* 012345679A 889884
347 10-4* 012345689A 888984
348 10-5* 012345789A 888894 Major-minor mixed (r7)
349 10-6* (6) 012346789A 888885 Messiaen mode 7 (1111211112)
350 11-1* 0123456789A AAAAA5 Chromatic Undecamirror
351 12-1*(1) 0123456789AB CCCCC6 Chromatic Scale/Dodecamirror (111111111111)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment