Skip to content

Distortion module sample rate #5

@oreillyp

Description

@oreillyp

Because the Distortion module does not have a sample_rate attribute, calling .process_normalized() fails:

     42 denorm_param_dict = self.denormalize_param_dict(param_dict)
     44 # now process audio with denormalized parameters
     45 y = self.process_fn(
     46     x,
---> 47     self.sample_rate,
     48     **denorm_param_dict,
     49 )
     51 return y

AttributeError: 'Distortion' object has no attribute 'sample_rate'

One solution would be to add a sample_rate attribute, even if it is a no-op; another would be to store a default sample rate of None in the Processor class to support modules that do not require a sample rate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions