History

python/lib/aubio/midiconv.py: make sure midi2note uses midi int (python3)

Paul Brossier committed 10 years ago

Commit 7ffb5541 parent 4de5f351 file · +1 −1Browse files

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

Unified · Split

python/lib/aubio/midiconv.py+1−1
@@ -48,7 +48,7 @@ def midi2note(midi): · 47 unmodified lines
48 "an integer between 0 and 127 is excepted, got %d" % midi)48 "an integer between 0 and 127 is excepted, got %d" % midi)
49 midi = int(midi)49 midi = int(midi)
50 _valid_notenames = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']50 _valid_notenames = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']
51 return _valid_notenames[midi % 12] + str( midi / 12 - 1)51 return _valid_notenames[midi % 12] + str( int(midi / 12) - 1 )
52 52
53def freq2note(freq):53def freq2note(freq):
54 from aubio import freqtomidi54 from aubio import freqtomidi

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