Skip to content

Commit

Permalink
Merge pull request #11 from SolarLiner/feat/ADAA
Browse files Browse the repository at this point in the history
ADAA
  • Loading branch information
SolarLiner authored Mar 23, 2024
2 parents 8c3c20a + ed46586 commit fffa1bf
Show file tree
Hide file tree
Showing 19 changed files with 2,186 additions and 23 deletions.
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

0 comments on commit fffa1bf

Please sign in to comment.