Changeset b0d5a48 for python


Ignore:
Timestamp:
Feb 12, 2013, 10:43:32 AM (11 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, pitchshift, sampler, timestretch, yinfft+
Children:
ae81726
Parents:
cf80e59
Message:

demos/demo_onset_file.py: remove old onsets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_onset_file.py

    rcf80e59 rb0d5a48  
    1616filename = sys.argv[1]
    1717onsets = []
    18 oldonsets = []
    1918
    2019s = source(filename, samplerate, hop_s)
     
    3231        print "%.4f" % thisbeat
    3332        onsets.append (thisbeat)
    34         # old onset
    35         thisbeat = (block_read - 3. ) * hop_s / samplerate
    36         oldonsets.append (thisbeat)
    3733    block_read += 1
    3834    if read < hop_s: break
     
    4743axis(xmin = 0., xmax = max(allsamples_max_times) )
    4844for stamp in onsets: plot([stamp, stamp], [-1., 1.], '.-r')
    49 for stamp in oldonsets: plot([stamp, stamp], [-1., 1.], '.-g')
    5045xlabel('time (s)')
    5146ylabel('amplitude')
Note: See TracChangeset for help on using the changeset viewer.