Created
September 3, 2022 05:30
-
-
Save victormurcia/144c538dbb3af1d6f89960fab1a35760 to your computer and use it in GitHub Desktop.
nature_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('nature_harmony_combined.wav', 'r') as f: | |
| audio = f.read(f.frames) | |
| samplerate = f.samplerate | |
| # Make a Pedalboard object, containing multiple plugins: | |
| board = Pedalboard([ | |
| LadderFilter(mode=LadderFilter.Mode.HPF12, cutoff_hz=100), | |
| Delay(delay_seconds = 0.1), | |
| Reverb(room_size = 1, wet_level=0.1, width = 0.5), | |
| PitchShift(semitones = 6), | |
| #Chorus(rate_hz = 15), | |
| Phaser(rate_hz = 5, depth = 0.5, centre_frequency_hz = 500.0), | |
| ]) | |
| # Run the audio through this pedalboard! | |
| effected = board(audio, samplerate) | |
| # Write the audio back as a wav file: | |
| with AudioFile('processed-nature_harmony_combined.wav', 'w', samplerate, effected.shape[0]) as f: | |
| f.write(effected) | |
| ipd.Audio('processed-nature_harmony_combined.wav') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment