shithub: aubio

Download patch

ref: 7ffb55476b0d6d4db123158186aed7ea72492915
parent: 4de5f356ac5f8b5bd3df4fbcd222cca8d79a15fe
author: Paul Brossier <piem@piem.org>
date: Mon Apr 18 19:22:45 EDT 2016

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

--- a/python/lib/aubio/midiconv.py
+++ b/python/lib/aubio/midiconv.py
@@ -48,7 +48,7 @@
                 "an integer between 0 and 127 is excepted, got %d" % midi)
     midi = int(midi)
     _valid_notenames = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']
-    return _valid_notenames[midi % 12] + str( midi / 12 - 1)
+    return _valid_notenames[midi % 12] + str( int(midi / 12) - 1 )
 
 def freq2note(freq):
     from aubio import freqtomidi