[basic_gain] m

main
annieversary 2021-09-16 15:26:05 +02:00
parent 6941c17f52
commit b53fa00e86
2 changed files with 5 additions and 12 deletions

View File

@ -9,5 +9,4 @@ crate-type = ["cdylib"]
[dependencies]
baseplug = { git = "https://github.com/wrl/baseplug.git", rev = "9cec68f31cca9c0c7a1448379f75d92bbbc782a8" }
serde = "1.0.126"
# utils = { path = "../utils" }
utils = { path = "../utils" }

View File

@ -7,21 +7,15 @@ use serde::{Deserialize, Serialize};
baseplug::model! {
#[derive(Debug, Serialize, Deserialize)]
struct GainModel {
#[model(min = -90.0, max = 3.0)]
#[parameter(name = "gain", unit = "Decibels",
gradient = "Power(0.15)")]
gain: f32
#[model(min = 0.0, max = 1.0)]
#[parameter(name = "gain")]
gain: f32,
}
}
impl Default for GainModel {
fn default() -> Self {
Self {
// "gain" is converted from dB to coefficient in the parameter handling code,
// so in the model here it's a coeff.
// -0dB == 1.0
gain: 1.0,
}
Self { gain: 1.0 }
}
}