π π A Python library for audio.
C audioaudio-processingaudio-productionaudio-researchaudio-unitaugmentationjucemachine-learningpybind11pythonvst3vst3-host
Update pedalboard.py
Peter Sobotdf83763621ec
diff --git a/pedalboard/pedalboard.py b/pedalboard/pedalboard.pyindex a5756f4..f66e6f3 100644--- a/pedalboard/pedalboard.py+++ b/pedalboard/pedalboard.py@@ -20,7 +20,6 @@ import weakreffrom functools import update_wrapperfrom contextlib import contextmanagerfrom typing import List, Optional, Dict, Union, Tuple, Iterable-from curses.ascii import isascii # needed for Python 3.6 compatibilityimport numpy as np@@ -467,7 +466,7 @@ def to_python_parameter_name(parameter: _AudioProcessorParameter) -> Optional[stif parameter.label and not parameter.label.startswith(":"):name = "{} {}".format(name, parameter.label.lower())# Replace all non-alphanumeric characters with underscores- name = [c if (c.isalpha() or c.isnumeric()) and isascii(c) else "_" for c in name]+ name = [c if (c.isalpha() or c.isnumeric()) and c.isprintable() and ord(c) < 128 else "_" for c in name]# Remove any double-underscores:name = [a for a, b in zip(name, name[1:]) if a != b or b != "_"] + [name[-1]]# Remove any leading or trailing underscores: