Showing the changes to python (1 of 5 files). Show all
Unified · Split
| @@ -180,6 +180,8 @@ def plot_pitch(filename, pitch, samplerate=44100., hopsize=512, outplot=None): · 179 unmodified lines | ||
| 180 | 180 | d = [] |
| 181 | 181 | maxpitch = 100 |
| 182 | 182 | for i in range(len(pitch)): |
| 183 | + #if len(pitch[i]) == 0: pitch[i] = [0.]; | |
| 184 | + | |
| 183 | 185 | downtime = (hopsize/samplerate)*numarray.arange(len(pitch[i])) |
| 184 | 186 | d.append(Gnuplot.Data(downtime,pitch[i],with='lines', |
| 185 | 187 | title=('%d' % i))) |