History

[py] move midiconv.py import to file header

Paul Brossier committed 8 years ago

Commit 1f07bdd1 parent 44582b01 file · +2 −1Browse files

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

Unified · Split

python/lib/aubio/midiconv.py+2−1
@@ -4,6 +4,8 @@ · 3 unmodified lines
44 __all__ = ['note2midi', 'midi2note', 'freq2note']
55
66 import sys
7+from ._aubio import freqtomidi
8+
79 py3 = sys.version_info[0] == 3
810 if py3:
911 str_instances = str
@@ -71,6 +73,5 @@ def midi2note(midi): · 61 unmodified lines
7173
7274 def freq2note(freq):
7375 " convert frequency in Hz to nearest note name, e.g. [0, 22050.] -> [C-1, G9] "
74− from aubio import freqtomidi
7576 nearest_note = int(freqtomidi(freq) + .5)
7677 return midi2note(nearest_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