Changeset b0d5a48
- Timestamp:
- Feb 12, 2013, 10:43:32 AM (12 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_onset_file.py
rcf80e59 rb0d5a48 16 16 filename = sys.argv[1] 17 17 onsets = [] 18 oldonsets = []19 18 20 19 s = source(filename, samplerate, hop_s) … … 32 31 print "%.4f" % thisbeat 33 32 onsets.append (thisbeat) 34 # old onset35 thisbeat = (block_read - 3. ) * hop_s / samplerate36 oldonsets.append (thisbeat)37 33 block_read += 1 38 34 if read < hop_s: break … … 47 43 axis(xmin = 0., xmax = max(allsamples_max_times) ) 48 44 for stamp in onsets: plot([stamp, stamp], [-1., 1.], '.-r') 49 for stamp in oldonsets: plot([stamp, stamp], [-1., 1.], '.-g')50 45 xlabel('time (s)') 51 46 ylabel('amplitude')
Note: See TracChangeset
for help on using the changeset viewer.