Changeset 7445aea for python/aubio


Ignore:
Timestamp:
Mar 29, 2005, 5:46:05 PM (20 years ago)
Author:
Paul Brossier <piem@altern.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, pitchshift, sampler, timestretch, yinfft+
Children:
19b56b0
Parents:
20f9748
Message:

updated aubiocompare-onset and onsetcompare.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubio/onsetcompare.py

    r20f9748 r7445aea  
    5454    ok    = n - missed
    5555    hits  = m - bad
     56    # at this point, we must have ok = hits. if not we had
     57    #   - a case were one onset counted for two labels (ok>hits)
     58    #   - a case were one labels matched two onsets (hits>ok)
     59    # bad hack for now (fails if both above cases have happened):
     60    if ok > hits: bad += ok-hits; ok = hits
     61    if hits > ok: missed += hits-ok; hits = ok
    5662    total = n
    5763    return ok,bad,missed,total,hits
Note: See TracChangeset for help on using the changeset viewer.