Changeset 8b884ef for python


Ignore:
Timestamp:
Apr 9, 2013, 7:49:36 PM (12 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:
483b883
Parents:
dee4164
Message:

src/onset/: rename get_last_onset to get_last

Location:
python/demos
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_onset.py

    rdee4164 r8b884ef  
    2929    samples, read = s()
    3030    if o(samples):
    31         print "%f" % o.get_last_onset_s()
    32         onsets.append(o.get_last_onset())
     31        print "%f" % o.get_last_s()
     32        onsets.append(o.get_last())
    3333    total_frames += read
    3434    if read < hop_s: break
  • python/demos/demo_onset_plot.py

    rdee4164 r8b884ef  
    3434while True:
    3535    samples, read = s()
    36     is_onset = o(samples)
    37     if is_onset:
    38         this_onset = o.get_last_onset()
    39         print "%f" % (this_onset / float(samplerate))
    40         onsets.append(this_onset)
     36    if o(samples):
     37        print "%f" % (o.get_last_s())
     38        onsets.append(o.get_last())
    4139    # keep some data to plot it later
    4240    new_maxes = (abs(samples.reshape(hop_s/downsample, downsample))).max(axis=0)
Note: See TracChangeset for help on using the changeset viewer.