From 56f9ee6640baea33f2f2faf5aa844a55950429f9 Mon Sep 17 00:00:00 2001 From: John Glover <j@johnglover.net> Date: Sat, 11 Aug 2012 15:45:44 +0100 Subject: [examples] Tidy up resynth example. --- simpl/examples/resynth.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/simpl/examples/resynth.py b/simpl/examples/resynth.py index 7288049..78f3f2d 100644 --- a/simpl/examples/resynth.py +++ b/simpl/examples/resynth.py @@ -1,13 +1,11 @@ import simpl import numpy as np -from scipy.io.wavfile import read, write +from scipy.io.wavfile import write input_file = '../../tests/audio/flute.wav' output_file = 'resynth.wav' -audio_data = read(input_file) -audio = simpl.asarray(audio_data[1]) / 32768.0 # values between -1 and 1 -sample_rate = audio_data[0] +audio = simpl.read_wav(input_file)[0] pd = simpl.SMSPeakDetection() pd.max_peaks = 40 -- cgit v1.2.3