spotify / pedalboard

🎛 🔊 A Python library for audio.
https://spotify.github.io/pedalboard
GNU General Public License v3.0
4.96k stars 249 forks source link

Question: On demand file playback with effects #343

Closed rhythminbytes closed 3 days ago

rhythminbytes commented 6 days ago

Hi Peter,

Is it possible to take audio files, process them chunk by chunk, and play the chunks back contiguously through your speakers. I'm thinking about an application like the pads on a sampler/drum machine where you hit a button and the sample just plays with effects, but is chunked so it doesn't totally have to be loaded into memory.

psobot commented 3 days ago

Hi @rhythminbytes!

This is not yet possible with just Pedalboard, as it doesn't support passing live audio I/O to and from Python. You can use pyAudio at the moment - there are a couple incomplete examples in our GitHub issues so far (see https://github.com/spotify/pedalboard/issues/190#issuecomment-1382854180 and https://github.com/spotify/pedalboard/issues/288#issuecomment-1905078976, for example).

This is something that others have tried to add (see https://github.com/spotify/pedalboard/pull/317) but which isn't quite ready to be merged just yet. If you're willing and interested in contributing, feel free to try implementing the approach in that PR (https://github.com/spotify/pedalboard/pull/317#issuecomment-2079999624).

rhythminbytes commented 3 days ago

Thanks Peter!