Changeset 1f07bdd for python/lib/aubio


Ignore:
Timestamp:
Oct 29, 2018, 11:57:00 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
6f944b5, 7af37df
Parents:
44582b0
Message:

[py] move midiconv.py import to file header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/aubio/midiconv.py

    r44582b0 r1f07bdd  
    55
    66import sys
     7from ._aubio import freqtomidi
     8
    79py3 = sys.version_info[0] == 3
    810if py3:
     
    7274def 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)
Note: See TracChangeset for help on using the changeset viewer.