Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when Appending Effects to Pedalboard Object on Windows 11 #355

Open
g7gg opened this issue Jul 16, 2024 · 1 comment
Open

Crash when Appending Effects to Pedalboard Object on Windows 11 #355

g7gg opened this issue Jul 16, 2024 · 1 comment

Comments

@g7gg
Copy link

g7gg commented Jul 16, 2024

Theres a consistent crash when attempting to append any effects to a Pedalboard instance in a Windows 11 environment. This issue occurs specifically when using the append() method of the Pedalboard class. It crashes without throwing any Python exceptions or messages, just a 2 second delay before crashing entirely.

Error reproducing:
1. Run a script on Windows 11 that appends an effect (e.g., Reverb) to a Pedalboard object and processes a simple audio file.
2. Observe Behavior: The script crashes during the execution of the append() method.

This works perfectly fine on Arch/Ubuntu/Debain Linux, but for some reason it doesn't for windows.

import soundfile as sf
import sounddevice as sd
from pedalboard import Pedalboard, Reverb
import numpy as np


def read_and_process_audio(file_path):
    # Read audio file
    audio_data, sample_rate = sf.read(file_path)
    print("Audio file read successfully.")

    # Create a Pedalboard object, add a Reverb effect
    board = Pedalboard()
    reverb = Reverb(room_size=0.5, damping=0.5, wet_level=0.3, dry_level=0.7)
    board.append(reverb)
    print("Reverb effect added to the pedalboard.")

    # Process the audio file with the pedalboard
    processed_audio = board(audio_data, sample_rate)
    print("Audio processed with reverb effect.")

    return processed_audio, sample_rate



def play_audio(audio_data, sample_rate):
    # Play processed audio
    print("Starting playback...")
    sd.play(audio_data, sample_rate)
    sd.wait()  # Wait until the audio has finished playing
    print("Playback finished.")



if __name__ == "__main__":
    file_path = "file.flac"
    processed_audio, sample_rate = read_and_process_audio(file_path)
    play_audio(processed_audio, sample_rate)
@g7gg g7gg changed the title Crash on Appending Effects to Pedalboard on Windows Crash when Appending Effects to Pedalboard Object on Windows 11 Jul 16, 2024
@g7gg
Copy link
Author

g7gg commented Jul 17, 2024

Quick update:

I tried it with an old version of pedalboard (0.8.2) and it worked, it looks like its an issue with the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants