Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # address projection.py G7YyE9s2
- from math import floor
- def notebank(noterange=(0,88), key_is='frequency'):
- notes = ['A', 'A#/Bb', 'B', 'C', 'C#/Db', 'D',
- 'D#/Eb', 'E', 'F', 'F#/Gb', 'G', 'G#/Ab']
- notebank = {}
- for n in range(noterange[0],noterange[1]):
- f = 27.5 * 2**(n/12.0)
- note = notes[n%12] + str(floor((n+9)/12.0))
- print(note + ' = %f'%str(f))
- #if key_is='frequency':
- notebank[f] = note
Add Comment
Please, Sign In to add comment