Changeset 7d89e61 for python/lib/aubio
- Timestamp:
- Mar 10, 2013, 5:37:28 PM (12 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, pitchshift, sampler, timestretch, yinfft+
- Children:
- 8c4560e
- Parents:
- 9ead7a9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/aubio/midiconv.py
r9ead7a9 r7d89e61 1 # -*- encoding: utf8 -*-1 # -*- coding: utf-8 -*- 2 2 3 3 def note2midi(note): … … 5 5 _valid_notenames = {'C': 0, 'D': 2, 'E': 4, 'F': 5, 'G': 7, 'A': 9, 'B': 11} 6 6 _valid_modifiers = {None: 0, u'♮': 0, '#': +1, u'♯': +1, u'\udd2a': +2, 'b': -1, u'♭': -1, u'\ufffd': -2} 7 _valid_octaves = range(-1, 10) 7 _valid_octaves = range(-1, 10) 8 8 if type(note) not in (str, unicode): 9 9 raise TypeError, "a string is required, got %s" % note
Note: See TracChangeset
for help on using the changeset viewer.