Skip to content
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

ADAA #11

Merged
merged 13 commits into from
Mar 23, 2024
Merged

ADAA #11

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .idea/valib.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions bundler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ name = "Dirty Biquad"
[diodeclipper]
name = "Diode Clipper"

[saturators]
name = "Saturators"

[slew]
name = "Slew"

Expand Down
22 changes: 11 additions & 11 deletions examples/diodeclipper/src/dsp.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use enum_map::Enum;
use nih_plug::util::gain_to_db_fast;
use num_traits::Zero;
use std::fmt;
use std::fmt::Formatter;

use enum_map::Enum;
use num_traits::Zero;

use valib::dsp::parameter::{HasParameters, Parameter, SmoothedParam};
use valib::dsp::{DSPBlock, DSP};
use valib::filters::biquad::Biquad;
Expand Down Expand Up @@ -36,20 +36,20 @@ impl<T: Scalar> DSP<1, 1> for DcBlocker<T> {
self.0.process(x)
}

fn set_samplerate(&mut self, samplerate: f32) {
DSP::set_samplerate(&mut self.0, samplerate);
self.0.update_coefficients(&Biquad::highpass(
T::from_f64((Self::CUTOFF_HZ / samplerate) as f64),
T::from_f64(Self::Q as f64),
));
fn reset(&mut self) {
self.0.reset()
}

fn latency(&self) -> usize {
DSP::latency(&self.0)
}

fn reset(&mut self) {
self.0.reset()
fn set_samplerate(&mut self, samplerate: f32) {
DSP::set_samplerate(&mut self.0, samplerate);
self.0.update_coefficients(&Biquad::highpass(
T::from_f64((Self::CUTOFF_HZ / samplerate) as f64),
T::from_f64(Self::Q as f64),
));
}
}

Expand Down
674 changes: 674 additions & 0 deletions examples/saturators/COPYING

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions examples/saturators/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "saturators"
version.workspace = true
rust-version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true

[lib]
crate-type = ["cdylib"]

[dependencies]
enum-map.workspace = true
nih_plug.workspace = true
num-traits.workspace = true
valib = { path = "../..", features = ["nih-plug"] }
11 changes: 11 additions & 0 deletions examples/saturators/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Saturators

A demo plugin of the various saturators implemented in valib, as well as the possible options that can
be applied on them.

Saturators is provided for demonstration purposes, and is not a fully-featured plugin. It has no custom GUI.

## Download

You can download the latest nightly build from a permalink to the latest nightly builds
[here](https://nightly.link/SolarLiner/valib/workflows/build/master).
Loading
Loading