blob: cf06ae1e6ac94ada5565168bc3778eacaafea1e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import sys
import matplotlib.pyplot as plt
import simpl
usage = 'Usage: python {0} <wav file>'.format(__file__)
if len(sys.argv) != 2:
print usage
sys.exit(1)
audio = simpl.read_wav(sys.argv[1])[0]
pd = simpl.LorisPeakDetection()
pd.max_peaks = 30
frames = pd.find_peaks(audio)
pt = simpl.MQPartialTracking()
pt.max_partials = 30
frames = pt.find_partials(frames)
simpl.plot_partials(frames, show_peaks=False)
plt.show()
|