Conversation
|
@psobot nice PR!
|
Member
Author
|
Thanks @faroit!
Not extensively, but a quick test (reading a WAV file backwards, sample-by-sample, by seeking to each sample first) seems to show Pedalboard is more than 6x faster than PySoundFile when seeking. (Pedalboard was able to seek at 224,671 seeks/sec, while SoundFile seeked at 34,691 seeks/sec.)
|
|
this is great! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds:
pedalboard.io, a new submodule containing audio input/output classespedalboard.io.AudioFile, a base class for interfacing with audio filespedalboard.io.ReadableAudioFile, a concrete class for reading audio filespedalboard.io.WriteableAudioFile, a concrete class for writing audio filesQuestions that may arise from this change:
pymad,pyogg, etc), require DLLs to be installed (PySoundFile), or sometimes shell out to FFMPEG (audioread,librosa). Pedalboard (by virtue of JUCE) has the ability to provide high-performance audio reading and writing functionality out-of-the-box without much code, removing the need for third-party dependencies. In tests, this code is up to 20x faster thanlibrosa.loadin certain cases (without resampling).AudioFormatReaderandAudioFormatWriterinterfaces, which only support reading and writing a certain set of audio formats out-of-the-box. Notably, Pedalboard already includeslibmp3lame, which could be used to create a customAudioFormatWritersubclass to allow for MP3 file writing out-of-the-box.