ref: b0d5a4829cb24f19de93d13b9ea4fdcadfabca8f
parent: cf80e59e80a6fd2c867af36155d99db419a6cfab
author: Paul Brossier <[email protected]>
date: Mon Feb 11 23:43:32 EST 2013
demos/demo_onset_file.py: remove old onsets
--- a/python/demos/demo_onset_file.py
+++ b/python/demos/demo_onset_file.py
@@ -15,7 +15,6 @@
filename = sys.argv[1]
onsets = []
-oldonsets = []
s = source(filename, samplerate, hop_s)
o = onset("default", win_s, hop_s)
@@ -31,9 +30,6 @@
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')
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()