Changeset 3aad0b1 for python/lib/aubio
- Timestamp:
- Dec 3, 2016, 4:03:47 AM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
- Children:
- c0c3f33
- Parents:
- d554321
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/aubio/midiconv.py
rd554321 r3aad0b1 16 16 " convert note name to midi note number, e.g. [C-1, G9] -> [0, 127] " 17 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, 19 u'\U0001D12A': +2, 20 'b': -1, u'♭': -1, u'\ufffd': -2, 21 u'\U0001D12B': -2, 22 } 18 _valid_modifiers = { 19 u'𝄫': -2, # double flat 20 u'♭': -1, 'b': -1, '\u266d': -1, # simple flat 21 u'♮': 0, '\u266e': 0, None: 0, # natural 22 '#': +1, u'♯': +1, '\u266f': +1, # sharp 23 u'𝄪': +2, # double sharp 24 } 23 25 _valid_octaves = range(-1, 10) 24 26 if not isinstance(note, str_instances):
Note: See TracChangeset
for help on using the changeset viewer.