{"id":4168,"library":"pedalboard","title":"Pedalboard","description":"Pedalboard is a Python library for working with audio: reading, writing, rendering, adding effects, and more. Built by Spotify's Audio Intelligence Lab, it supports most popular audio file formats, a number of common audio effects out of the box, and also allows the use of VST3® and Audio Unit formats for loading third-party software instruments and effects. It's designed for high-performance audio processing, including use in machine learning workflows with TensorFlow. The current version is 0.9.22 and it is actively maintained.","status":"active","version":"0.9.22","language":"en","source_language":"en","source_url":"https://github.com/spotify/pedalboard","tags":["audio processing","effects","VST3","Audio Unit","machine learning","music production","digital audio"],"install":[{"cmd":"pip install pedalboard","lang":"bash","label":"Install the latest version"}],"dependencies":[{"reason":"Requires Python 3.10 or newer.","package":"python","optional":false}],"imports":[{"note":"While 'import pedalboard' works, importing specific classes like 'Pedalboard' and effect plugins directly is the idiomatic and cleaner way for most uses.","wrong":"import pedalboard; board = pedalboard.Pedalboard()","symbol":"Pedalboard","correct":"from pedalboard import Pedalboard"},{"note":"Audio I/O utilities are located in the `pedalboard.io` submodule.","wrong":"from pedalboard import AudioFile","symbol":"AudioFile","correct":"from pedalboard.io import AudioFile"}],"quickstart":{"code":"import numpy as np\nfrom pedalboard import Pedalboard, Chorus, Reverb, Gain\nfrom pedalboard.io import AudioFile\n\n# Generate a 1-second sine wave at 44.1 kHz\nsamplerate = 44100\nduration = 1.0 # seconds\nfrequency = 440.0 # Hz\nt = np.linspace(0., duration, int(samplerate * duration), endpoint=False)\naudio = 0.5 * np.sin(2 * np.pi * frequency * t)\n\n# Ensure audio is float32 for Pedalboard\naudio = audio.astype(np.float32)\n\n# Create a Pedalboard with some effects\nboard = Pedalboard([\n    Chorus(rate_hz=1.0, depth=0.5, mix=0.5),\n    Reverb(room_size=0.7, dampening=0.5, wet_level=0.2, dry_level=0.8),\n    Gain(gain_db=3.0)\n])\n\n# Process the audio\neffected_audio = board(audio, samplerate, reset=False)\n\n# Write the output to a WAV file\noutput_filename = 'output_effected_audio.wav'\nwith AudioFile(output_filename, 'w', samplerate, effected_audio.shape[0]) as f:\n    f.write(effected_audio)\n\nprint(f\"Processed audio saved to {output_filename}\")","lang":"python","description":"This quickstart generates a simple sine wave, applies a chorus, reverb, and gain effect using a `Pedalboard` object, and then saves the processed audio to a WAV file. It demonstrates the basic workflow of creating a pedalboard and processing audio buffers."},"warnings":[{"fix":"Upgrade your Python interpreter to version 3.10 or higher (e.g., Python 3.11, 3.12).","message":"Pedalboard v0.9.16 and later no longer support Python 3.8. Ensure your environment uses Python 3.10 or newer.","severity":"breaking","affected_versions":"0.9.16+"},{"fix":"Consult the `COMPATIBILITY.md` file in the Pedalboard GitHub repository for known compatible plugins. Exercise caution and test thoroughly when integrating third-party plugins.","message":"When using VST3® or Audio Unit plugins via `pedalboard.load_plugin`, some plugins may not work as expected or can even cause the Python interpreter to crash without warning. This is due to variations in plugin adherence to specifications.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Test your specific live audio setup extensively to ensure acceptable latency. Monitor CPU usage and buffer sizes. For critical low-latency applications, consider dedicated audio frameworks if Pedalboard does not meet requirements.","message":"While Pedalboard supports real-time audio processing via `AudioStream`, it was primarily designed for batch processing. Latency guarantees are not always explicit, and performance in strictly low-latency live applications can depend heavily on system resources and plugin complexity.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If experiencing GUI issues, try updating your display drivers or using a different windowing environment. For production, consider running plugins headless if GUI interaction is not strictly necessary.","message":"Calling `Plugin.show_editor()` for VST/AU plugins can lead to GUI issues in some environments, such as 'BadWindow' crashes in X11 or borderless windows on Windows systems.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}