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
4848 "an integer between 0 and 127 is excepted, got %d" % midi)
4949 midi = int(midi)
5050 _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 )
5252
5353 def freq2note(freq):
5454 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