summaryrefslogtreecommitdiff
path: root/examples/harmonicsynthesis.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/harmonicsynthesis.py')
-rw-r--r--examples/harmonicsynthesis.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/harmonicsynthesis.py b/examples/harmonicsynthesis.py
index 99d6e39..401025d 100644
--- a/examples/harmonicsynthesis.py
+++ b/examples/harmonicsynthesis.py
@@ -8,7 +8,7 @@ if len(sys.argv) != 3:
print usage
sys.exit(1)
-audio = simpl.read_wav(sys.argv[1])[0]
+audio, sampling_rate = simpl.read_wav(sys.argv[1])
output_file = sys.argv[2]
pd = simpl.LorisPeakDetection()
@@ -18,4 +18,4 @@ partials = pt.find_partials(peaks)
synth = simpl.LorisSynthesis()
audio_out = synth.synth(partials)
audio_out = np.asarray(audio_out * 32768, np.int16)
-wav.write(output_file, 44100, audio_out)
+wav.write(output_file, sampling_rate, audio_out)