Skip to content

Commit 4ed493c

Browse files
author
Davide Del Vento
committed
helper function needed
1 parent ca312ef commit 4ed493c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎temperanotes.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
note_names_sharp = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#']
66
note_names_flat = ['A', 'Bb', 'B', 'C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab']
77

8+
def get_key_index(key):
9+
if len(key) == 1:
10+
key_index = note_names_sharp.index(key)
11+
else:
12+
raise NotImplementedError()
13+
14+
815
def frequencies(temperament, notes_low, notes_high, key = 'C', base_freq = 440.0, key_freq = 'A'):
916
if key != 'A' or key_freq != 'A':
1017
raise NotImplementedError()

0 commit comments

Comments
 (0)