Skip to main content

A Python library for adding effects to audio.

Project description

Pedalboard Logo

License: GPL v3 PyPI - Python Version Supported Platforms Apple Silicon supported PyPI - Wheel Test Badge Coverage Badge GitHub Repo stars

pedalboard is a Python library for adding effects to audio. It supports a number of common audio effects out of the box, and also allows the use of VST3® and Audio Unit plugin formats for third-party effects. It was built by Spotify's Audio Intelligence Lab to enable using studio-quality audio effects from within Python and TensorFlow.

Usage

  • Built-in support for a number of basic audio transformations:
    • Convolution
    • Compressor
    • Chorus
    • Distortion
    • Gain
    • HighpassFilter
    • LadderFilter
    • Limiter
    • LowpassFilter
    • Phaser
    • Reverb
  • Supports VST3® plugins on macOS, Windows, and Linux
  • Supports Audio Units on macOS
  • Strong thread-safety, memory usage, and speed guarantees
    • Releases Python's Global Interpreter Lock (GIL) to allow use of multiple CPU cores
      • No need to use multiprocessing!
    • Even when only using one thread:
      • Processes audio up to 300x faster than pySoX
  • Tested compatibility with TensorFlow - can be used in tf.data pipelines!

Installation

pedalboard is available via PyPI (via Platform Wheels):

pip install pedalboard

Compatibility

pedalboard is thoroughly tested with Python 3.6, 3.7, 3.8, and 3.9, as well as experimental support for PyPy 7.3.

  • Linux
    • Tested heavily in production use cases at Spotify
    • Tested automatically on GitHub with VSTs
    • Platform manylinux wheels built for x86_64
    • Most Linux VSTs require a relatively modern Linux installation (with glibc > 2.27)
  • macOS
    • Tested manually with VSTs and Audio Units
    • Tested automatically on GitHub with VSTs
    • Platform wheels available for both Intel and Apple Silicon
    • Compatible with a wide range of VSTs and Audio Units
  • Windows
    • Tested automatically on GitHub with VSTs
    • Platform wheels available for amd64 (Intel/AMD)

Examples

A very basic example of how to use pedalboard's built-in plugins:

import soundfile as sf
from pedalboard import (
    Pedalboard,
    Convolution,
    Compressor,
    Chorus,
    Gain,
    Reverb,
    Limiter,
    LadderFilter,
    Phaser,
)

audio, sample_rate = soundfile.read('some-file.wav')

# Make a Pedalboard object, containing multiple plugins:
board = Pedalboard([
    Compressor(threshold_db=-50, ratio=25),
    Gain(gain_db=30),
    Chorus(),
    LadderFilter(mode=LadderFilter.Mode.HPF12, cutoff_hz=900),
    Phaser(),
    Convolution("./guitar_amp.wav", 1.0),
    Reverb(room_size=0.25),
], sample_rate=sr)

# Pedalboard objects behave like lists, so you can add plugins:
board.append(Compressor(threshold_db=-25, ratio=10))
board.append(Gain(gain_db=10))
board.append(Limiter())

# Run the audio through this pedalboard!
effected = board(audio)

# Write the audio back as a wav file:
with sf.SoundFile('./processed-output-stereo.wav', 'w', samplerate=sr, channels=effected.shape[1]) as f:
    f.write(effected)

Loading a VST3® plugin and manipulating its parameters

import soundfile as sf
from pedalboard import Pedalboard, Reverb, load_plugin

# Load a VST3 package from a known path on disk:
vst = load_plugin("./VSTs/RoughRider3.vst3")

print(vst.parameters.keys())
# dict_keys([
#   'sc_hpf_hz',
#   'input_lvl_db',
#   'sensitivity_db',
#   'ratio',
#   'attack_ms',
#   'release_ms',
#   'makeup_db',
#   'mix',
#   'output_lvl_db',
#   'sc_active',
#   'full_bandwidth',
#   'bypass',
#   'program',
# ])

# Set the "ratio" parameter to 15
vst.ratio = 15

# Use this VST to process some audio:
audio, sample_rate = soundfile.read('some-file.wav')
effected = vst(audio, sample_rate=sample_rate)

# ...or put this VST into a chain with other plugins:
board = Pedalboard([vst, Reverb()], sample_rate=sample_rate)
# ...and run that pedalboard with the same VST instance!
effected = board(audio)

For more examples, see the Pedalboard Demo Colab notebook example.

Contributing

Contributions to pedalboard are welcomed! See CONTRIBUTING.md for details.

License

pedalboard is Copyright 2021 Spotify AB.

pedalboard is licensed under the GNU General Public License v3, because:

VST is a registered trademark of Steinberg Media Technologies GmbH.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pedalboard-0.3.5-pp37-pypy37_pp73-win_amd64.whl (2.5 MB view details)

Uploaded PyPy Windows x86-64

pedalboard-0.3.5-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.9 MB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

pedalboard-0.3.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

pedalboard-0.3.5-cp39-cp39-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.9 Windows x86-64

pedalboard-0.3.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pedalboard-0.3.5-cp39-cp39-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pedalboard-0.3.5-cp39-cp39-macosx_10_9_universal2.whl (5.7 MB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

pedalboard-0.3.5-cp38-cp38-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.8 Windows x86-64

pedalboard-0.3.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pedalboard-0.3.5-cp38-cp38-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pedalboard-0.3.5-cp38-cp38-macosx_10_9_universal2.whl (5.7 MB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

pedalboard-0.3.5-cp37-cp37m-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.7m Windows x86-64

pedalboard-0.3.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pedalboard-0.3.5-cp37-cp37m-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pedalboard-0.3.5-cp36-cp36m-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.6m Windows x86-64

pedalboard-0.3.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

pedalboard-0.3.5-cp36-cp36m-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file pedalboard-0.3.5-pp37-pypy37_pp73-win_amd64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-pp37-pypy37_pp73-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: PyPy, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-pp37-pypy37_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 fd3555a1e5197b1354b219fe7844fd0942fff1bded21d86f3152746fa96c2411
MD5 a9f28a437db3cd65c69cdb857efca0dd
BLAKE2b-256 70749ebed52ac6afd541fa52646b330290a85e286796cad41760576fa9218979

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pedalboard-0.3.5-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f0745acdd65de535cd4ccdaa55d9951e39a512e00d0e74758ad1b9158daa820e
MD5 d28c1bbe0ec09b2b4d1df15487742eb8
BLAKE2b-256 7a2f873881138c98e6291c8cc60787447571489f709c1606b4785eed354414a8

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: PyPy, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 26c53b0a5ef398eaa3cdcb9a600145e7bbdd505cc50632be8aa88fc9817760e6
MD5 04a5f5bf11db85d8935743ad3c854f44
BLAKE2b-256 b44ae838245d71d1de41e97bdce5a480d51e02c0716fd1bb80625b3c7c47464d

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 64843ed3361becc490559f331d76998a1a6a51cec778d4a28900a7d58bda3414
MD5 4f2fff20bd22718079045102f00a8e87
BLAKE2b-256 7b5e8ab47805788dc78f6967934b2e831015c95b2d0f4adf34f4bade0a6c9272

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pedalboard-0.3.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 354716e013cc88b517893c35a9413a126abb7ff21cf9135dee7c03cc5e71345e
MD5 60acb2e7397d38d537b84d77f01ecb86
BLAKE2b-256 bdd4e7af45e75699ec2588c9908e9a2dd5d7af07213fc39a2fc941aaa178cf37

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6b87905f0a52ab679b7579f712f8bc520c3d737683cbff960c751f51a69edc39
MD5 db8c8bed72b0d157d01ae562f4b0b7a9
BLAKE2b-256 95f2586ca1342ed51141f6cd6fdf4b738c347cd82aab82abe23fd0e35e63d053

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp39-cp39-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 13274fb0f8a95b094a454e449486f6fb0263740034a1b5a1aea3b09d585afe8e
MD5 000e32db5254525a88dc38ba76af3177
BLAKE2b-256 9de0987d08dc037d3db044b7e020bed708e66713c4e991cb2851638904d62984

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 caf6ae389615cb423016c89044a5577587e0c7549a78b1f0e7d5528d10be746d
MD5 0936817f24847fa92f3967495de81541
BLAKE2b-256 e5b8deb5fc5d1e7c3957c8cba534a35b3edfe3a83bfb6d3d2e43fb6158fd3438

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pedalboard-0.3.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5d301bec16853acec0a04f6a6c166d58c41c6e534fda9e9e19c5076c51503986
MD5 8b5a1d60e5004d011675e81366f26144
BLAKE2b-256 5ddf0ad9366a1c9737bfb70a0e0eac4e69b11083a71dda110ae352d1ac55c3d7

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4925a0962f2feabf3d1caf1b9703911d7dcfc8144edb4cf25ce662a043d44ed9
MD5 dc446c38fcbe568f7d6aa0343dc4d378
BLAKE2b-256 c3171d44b2fbe9ab4ed27858c68b3e213b4d6c4cb8d3232a0c4e467327981136

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp38-cp38-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c472b5679f5bc68b4ee1c39a61a029fb92513637e92bf1c7cc10b54db01038a7
MD5 1a3bbeb5ef3540a900e591d7084de7f7
BLAKE2b-256 6e686d63c804e4afbe827361cb45a385ff9073d27c0896d5af50b9068481668b

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a30fe9490ae7ac5ca618057b2fafec161485511fa28cc0fdcc2e36010522e64e
MD5 3fe9a1845b0ca891568c030857b89b04
BLAKE2b-256 1eaaa6c28ae5bf6edee61fce911ef17064eefcd02dec4ffd5b8688598374504c

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pedalboard-0.3.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8786486b4a0ac005f809c3d6d36d9a5614ccf678e064dfdd33326300440641e1
MD5 32f2826929eeb45e27ffdcb361c88baf
BLAKE2b-256 63a5b24de0f36ac807da9033c9d5090296cac17c088be7451222f4c3e9d0c3fb

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4447c471775f9ed00e722cfa5b5c32500e092ca613139ed9c8d92036170b25f1
MD5 2dc8212697e2d8b61fb5aa0127a560b3
BLAKE2b-256 64751c0af9d58adf856975413045741b30c28de6deec142e05fd02febed69473

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 41dace1c9eeb85db13a780b90979f49a60737ef9b7d18f95c21c6e68928294cb
MD5 438b68a14778860cec375964de58258e
BLAKE2b-256 d738e74ccd521a0bcc074e6be69dc4e3437cde2e59b5afac14c36dd64cc5dea6

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pedalboard-0.3.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 93201e8b80850164cdab94661b5bbeedd97858e133a3f4442aaf5b606ece4252
MD5 78f6aef808397748267971f9ec6717fc
BLAKE2b-256 b698a1cf4a048669f09d4359e0212f654cd869e33e7658a20a6f9f7cf515651a

See more details on using hashes here.

File details

Details for the file pedalboard-0.3.5-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pedalboard-0.3.5-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pedalboard-0.3.5-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 edaa25535c3ebc0466407086d50137509b2c19fffc03d6098358063ffdbf1860
MD5 631e17de16295cca03126bcdcdc87667
BLAKE2b-256 403f7f41eaedb04d15aa508155b5cae31e235c6707ed14d57798962092e9c821

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page