ideoforms / signalflow

A sound synthesis framework for Python, designed for clear and concise expression of complex musical ideas
https://signalflow.dev
MIT License
166 stars 14 forks source link

Multichannel Buffer? #118

Open jarmitage opened 1 month ago

jarmitage commented 1 month ago
    audio_buf = Buffer([audio_path])
                ^^^^^^^^^^^^^^^^^^^^
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. signalflow.Buffer()
    2. signalflow.Buffer(filename: str)
    3. signalflow.Buffer(num_channels: int, num_frames: int)
    4. signalflow.Buffer(num_channels: int, num_frames: int, data: List[List[float]])
    5. signalflow.Buffer(arg0: List[List[float]])
    6. signalflow.Buffer(data: List[float])
    7. signalflow.Buffer(function: Callable[[float], float])
    8. signalflow.Buffer(num_frames: int, function: Callable[[float], float])
    9. signalflow.Buffer(num_channels: int, num_frames: int, function: Callable[[float], float])
ideoforms commented 2 weeks ago

Can you say more about what you're trying to accomplish? If you're looking to load a multichannel .wav, SignalFlow uses libsndfile beneath the hood, which can load multichannel audio files without issues. You can create multichannel Buffers by passing Buffer a list[list[float]], or numpy ndarray. Or maybe you're trying to do something else?