From: Paul Brossier Date: Tue, 12 Feb 2013 09:43:32 +0000 (-0500) Subject: demos/demo_onset_file.py: remove old onsets X-Git-Tag: 0.4.0-beta1~327 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=b0d5a4829cb24f19de93d13b9ea4fdcadfabca8f;p=aubio.git demos/demo_onset_file.py: remove old onsets --- diff --git a/python/demos/demo_onset_file.py b/python/demos/demo_onset_file.py index cea96986..2c3738fb 100755 --- a/python/demos/demo_onset_file.py +++ b/python/demos/demo_onset_file.py @@ -15,7 +15,6 @@ if len(sys.argv) < 2: filename = sys.argv[1] onsets = [] -oldonsets = [] s = source(filename, samplerate, hop_s) o = onset("default", win_s, hop_s) @@ -31,9 +30,6 @@ while True: thisbeat = (block_read - 4. + isbeat[0]) * hop_s / samplerate print "%.4f" % thisbeat onsets.append (thisbeat) - # old onset - thisbeat = (block_read - 3. ) * hop_s / samplerate - oldonsets.append (thisbeat) block_read += 1 if read < hop_s: break @@ -46,7 +42,6 @@ plot(allsamples_max_times, allsamples_max, '-b') plot(allsamples_max_times, -allsamples_max, '-b') axis(xmin = 0., xmax = max(allsamples_max_times) ) for stamp in onsets: plot([stamp, stamp], [-1., 1.], '.-r') -for stamp in oldonsets: plot([stamp, stamp], [-1., 1.], '.-g') xlabel('time (s)') ylabel('amplitude') show()