History

python/lib/aubio/midiconv.py: add unicode double sharp and double flat

Paul Brossier committed 9 years ago

Commit 473ab111 parent 3d148291 file · +4 −1Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/lib/aubio/midiconv.py+4−1
@@ -16,7 +16,10 @@ def note2midi(note): · 15 unmodified lines
16 " convert note name to midi note number, e.g. [C-1, G9] -> [0, 127] "16 " convert note name to midi note number, e.g. [C-1, G9] -> [0, 127] "
17 _valid_notenames = {'C': 0, 'D': 2, 'E': 4, 'F': 5, 'G': 7, 'A': 9, 'B': 11}17 _valid_notenames = {'C': 0, 'D': 2, 'E': 4, 'F': 5, 'G': 7, 'A': 9, 'B': 11}
18 _valid_modifiers = {None: 0, u'♮': 0, '#': +1, u'♯': +1, u'\udd2a': +2,18 _valid_modifiers = {None: 0, u'♮': 0, '#': +1, u'♯': +1, u'\udd2a': +2,
19 'b': -1, u'♭': -1, u'\ufffd': -2}19 u'\U0001D12A': +2,
20 'b': -1, u'♭': -1, u'\ufffd': -2,
21 u'\U0001D12B': -2,
22 }
20 _valid_octaves = range(-1, 10)23 _valid_octaves = range(-1, 10)
21 if not isinstance(note, str_instances):24 if not isinstance(note, str_instances):
22 raise TypeError("a string is required, got %s (%s)" % (note, str(type(note))))25 raise TypeError("a string is required, got %s (%s)" % (note, str(type(note))))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t