Abstract: We present PyNeuralFx, an open-source Python toolkit designed for research on neural audio effect modeling. The toolkit provides an intuitive framework and offers a comprehensive suite of features, including standardized implementation of well-established model architectures, loss functions, and easy-to-use visualization tools. As such, it helps promote reproducibility for research on neural audio effect modeling, and enable in-depth performance comparison of different models, offering insight into the behavior and operational characteristics of models through DSP methodology. The toolkit can be found at https://github.com/ytsrt66589/pyneuralfx.
Introduction
In recent years, deep learning has shown incredible promise in emulating analog gear—such as compressors, tube amplifiers, and distortion pedals—using neural networks instead of traditional Digital Signal Processing (DSP) code. However, the field currently faces two major hurdles: inconsistency in training strategies and the "black box" nature of neural networks. Different research groups often use disparate loss functions and evaluation metrics, making fair comparisons nearly impossible. Furthermore, models that appear to perform well on standard metrics may produce hidden artifacts like aliasing that are unacceptable in professional audio settings.
PyNeuralFx addresses these challenges by providing a unified, modular framework that standardizes the workflow for neural audio effect modeling, moving the field toward reproducible and interpretable audio synthesis.
The PyNeuralFx Framework
The toolkit is built on a modular philosophy, separating the modeling backbone from the control mechanism. This allows researchers to isolate variables and test specific components without rewriting entire codebases. The system follows a standardized five-stage pipeline to ensure consistency across experiments.
Modeling and Control
PyNeuralFx supports a variety of backbones and conditioning methods:
- Backbones: The toolkit includes implementations for Convolutional Neural Networks (CNNs)—specifically Temporal Convolutional Networks (TCNs) and Gated Convolutional Networks (GCNs)—as well as Recurrent Neural Networks (RNNs) like LSTMs and GRUs.
- Control Mechanisms: Beyond standard methods like concatenation or FiLM (Feature-wise Linear Modulation), the authors include novel "Hypernetwork" conditioning methods (StaticHyper and DynamicHyper). these allow models to adapt internal weights based on user-defined parameters like "Gain" or "Threshold."
- Loss Functions: To capture the nuances of audio, the toolkit implements Energy-to-Signal Ratio (ESR), multi-resolution STFT loss, and specialized filters to handle DC offset and pre-emphasis.
Data Management and Benchmarking
While data-agnostic, PyNeuralFx provides built-in support for popular benchmarks to facilitate immediate research:
- SignalTrain: For profiling audio compressors.
- EGDB: An electric guitar dataset.
- Boss OD-3: Specifically for overdrive pedal emulation.
A standardized preprocessing pipeline allows researchers to easily integrate custom recordings of analog hardware into the framework using .yml configuration files, ensuring every detail of a training run is recorded for reproducibility.
DSP-Centric Evaluation and Visualization
One of the most powerful features of PyNeuralFx is the inclusion of visualization tools that treat neural networks like hardware. Most research focuses solely on reconstruction loss (e.g., Mean Squared Error), which often fails to capture the "character" of sound. PyNeuralFx includes metrics for loudness error, crest factor, RMS energy, and spectral centroid.
By using "sine sweeps," researchers can visualize the harmonic response and detect aliasing—issues where high frequencies "fold back" into the audible range. These visualization tools successfully identify harmonic distortion patterns in models like the Boss OD-3, catching artifacts that would be invisible in standard loss plots.
Conclusion and Future Work
PyNeuralFx provides a robust foundation for the audio research community. While currently focused on core architectures and DSP-style debugging, future versions aim to include a library of pre-trained weights for common effects and support for newer architectures like State-Space Models (SSMs) and Generative Adversarial Network (GAN) based loss functions. The project remains open-source and community-driven, hosted on GitHub to encourage collaborative expansion of the library.
Summary updated