Created
September 3, 2022 05:28
-
-
Save victormurcia/660f82af4f0c423438f0810953139477 to your computer and use it in GitHub Desktop.
catterina_song_pedalboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Read in a whole audio file: | |
| with AudioFile('catterina_song.wav', 'r') as f: | |
| audio = f.read(f.frames) | |
| samplerate = f.samplerate | |
| print(samplerate) | |
| # Make a Pedalboard object, containing multiple plugins: | |
| board = Pedalboard([ | |
| LadderFilter(mode=LadderFilter.Mode.HPF12, cutoff_hz=100), | |
| Delay(delay_seconds = 0.3), | |
| Reverb(room_size = 0.6, wet_level=0.2, width = 1.0), | |
| PitchShift(semitones = 6), | |
| ]) | |
| # Run the audio through this pedalboard! | |
| effected = board(audio, samplerate) | |
| # Write the audio back as a wav file: | |
| with AudioFile('processed-catterina_song.wav', 'w', samplerate, effected.shape[0]) as f: | |
| f.write(effected) | |
| ipd.Audio('processed-catterina_song.wav') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment