From b0d5a4829cb24f19de93d13b9ea4fdcadfabca8f Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 12 Feb 2013 04:43:32 -0500 Subject: [PATCH] demos/demo_onset_file.py: remove old onsets --- python/demos/demo_onset_file.py | 5 ----- 1 file changed, 5 deletions(-) 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() -- 2.26.2