Changeset b257b60 for python/demos/demo_pitch.py
- Timestamp:
- Aug 12, 2015, 7:21:38 PM (9 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:
- 60fc05b
- Parents:
- 3a1a5d6 (diff), 7b2d740 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_pitch.py
r3a1a5d6 rb257b60 23 23 24 24 pitch_o = pitch("yin", win_s, hop_s, samplerate) 25 pitch_o.set_unit(" freq")25 pitch_o.set_unit("midi") 26 26 pitch_o.set_tolerance(tolerance) 27 27 … … 37 37 confidence = pitch_o.get_confidence() 38 38 #if confidence < 0.8: pitch = 0. 39 print "%f %f %f" % (total_frames / float(samplerate), pitch, confidence)39 #print "%f %f %f" % (total_frames / float(samplerate), pitch, confidence) 40 40 pitches += [pitch] 41 41 confidences += [confidence] … … 81 81 ax2.axis( ymin = 0.9 * true_freqs.min(), ymax = 1.1 * true_freqs.max() ) 82 82 # plot raw pitches 83 ax2.plot(times, pitches, ' --g')83 ax2.plot(times, pitches, '.g') 84 84 # plot cleaned up pitches 85 85 cleaned_pitches = pitches … … 91 91 #ax2.axis( ymin = 55, ymax = 70 ) 92 92 plt.setp(ax2.get_xticklabels(), visible = False) 93 ax2.set_ylabel('f0 ( Hz)')93 ax2.set_ylabel('f0 (midi)') 94 94 95 95 # plot confidence
Note: See TracChangeset
for help on using the changeset viewer.