diff --git a/audio_pitcher.py b/audio_pitcher.py index ed84a0d..de16b97 100644 --- a/audio_pitcher.py +++ b/audio_pitcher.py @@ -21,13 +21,8 @@ def pitcher(): for element in octaves: new_sample_rate = int(sound.frame_rate * (2.0 ** octaves)) - # keep the same samples but tell the computer they ought to be played at the - # new, higher sample rate. This file sounds like a chipmunk but has a weird sample rate. hipitch_sound = sound._spawn(sound.raw_data, overrides={'frame_rate': new_sample_rate}) - # now we just convert it to a common sample rate (44.1k - standard audio CD) to - # make sure it works in regular audio players. Other than potentially losing audio quality (if - # you set it too low - 44.1k is plenty) this should now noticeable change how the audio sounds. hipitch_sound = hipitch_sound.set_frame_rate(44100) #sound.export(str("./wav/"+str(name)), format="wav") hipitch_sound.export(str("./wav/"+name+"_pitched_"+str(octaves)+".wav"), format="wav") @@ -37,4 +32,4 @@ def pitcher(): print("starting") pitcher() -print("program executed") \ No newline at end of file +print("program executed")