-
Notifications
You must be signed in to change notification settings - Fork 279
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
Feature request: add Fuzz plugin for Pedalboard (#402) #403
base: master
Are you sure you want to change the base?
Conversation
…d. It features a two-stage clipping process: first a hard diode clipping (threshold=0.25), then a soft clipping via tanh, followed by a tone control stage implemented as a low-pass filter.
…t_fuzz_process_signal() methods added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, thank you @LorenzoMonti! I've left a couple comments inline (mostly about touching the actual DSP parameters directly in the setters/getters rather than copies) - but otherwise, this is virtually a perfect pull request. Great job!
pedalboard/plugins/Fuzz.h
Outdated
SampleType driveDecibels; | ||
SampleType toneHz; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't want to keep a copy of these variables here, as they can differ from the variables set in the ProcessorChain
depending on when prepare
is called. (And indeed; if you use Fuzz
in an AudioStream
, it should be possible to call .drive_db = x
and the audio should update without needing to stop and start the stream again.)
pedalboard/plugins/Fuzz.h
Outdated
void setDriveDecibels(const float f) noexcept { driveDecibels = f; } | ||
float getDriveDecibels() const noexcept { return driveDecibels; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void setDriveDecibels(const float f) noexcept { driveDecibels = f; } | |
float getDriveDecibels() const noexcept { return driveDecibels; } | |
void setDriveDecibels(const float f) noexcept { this->getDSP().template get<gainIndex>().setGainDecibels(f); } | |
float getDriveDecibels() const noexcept { return this->getDSP().template get<gainIndex>().getGainDecibels(f); } |
pedalboard/plugins/Fuzz.h
Outdated
}; | ||
|
||
// Third stage: Tone control via low-pass filter | ||
auto coeffs = juce::dsp::IIR::Coefficients<SampleType>::makeLowPass(spec.sampleRate, toneHz); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could try using ArrayCoefficients
here to allow updating the toneHz
parameter without requiring a realloc/extra prepare
call here - with the caveat that I haven't worked with that API in a long time and am not sure if it would actually work here.
Thanks for the thorough and speedy comment! I’m still getting familiar with JUCE, so I really appreciate the guidance. I’ll go through your comments carefully and deepen my understanding of how the |
Problem
Fuzz is a staple effect in many music genres, particularly rock and
experimental electronic music. While distortion and gain effects exist
in Pedalboard, fuzz has a unique aggressive character that cannot be
easily replicated. Adding a fuzz plugin would expand Pedalboard’s
flexibility, providing more options for guitarists and producers
seeking vintage or experimental tones.
This feature request was initially discussed in #402.
Solution
Implemented a new Fuzz effect, emulating a classic fuzz pedal.
The effect consists of:
Result
Pedalboard now includes a fuzz effect, broadening its range of
distortion-based effects. Users can apply fuzz to their audio chains
for a distinctive saturated sound characteristic of classic fuzz pedals.