feat(forge): add Forge tracked channel strip
One note tracker reads the input and Lathe, Temper and Knurl follow it as modules, in any of six orders, each on or off. Every module gets the tracker's events delayed by the latency of the modules in front of it. - One module alone matches its standalone plugin sample for sample in every order. - With Knurl's sub-octave pattern in front, Lathe in Forge follows the played note; a standalone Lathe after Knurl reads it an octave low. - About 72 ms latency against about 206 ms for the three in a row. The module pages reuse the standalone editors. Register Forge in the catalog, CI, README, docs and website, and drop the built Ballast from the site's idea list.
This commit is contained in:
1 parent
340376eee2
commit
7b989f7685
28 files changed
+4678
-23
No files matched your search
@@ -12,13 +12,13 @@ fn main() {
|
||||
.unwrap_or("rivet");
|
||||
if ![
|
||||
"rivet", "patina", "anvil", "crucible", "lathe", "temper", "weld", "knurl", "planish",
|
||||
"braze", "quench", "ballast",
|
||||
"braze", "quench", "ballast", "forge",
|
||||
]
|
||||
.contains(&plugin)
|
||||
{
|
||||
eprintln!(
|
||||
"Use --plugin rivet, patina, anvil, crucible, lathe, temper, weld, knurl, planish, \
|
||||
braze, quench or ballast"
|
||||
braze, quench, ballast or forge"
|
||||
);
|
||||
std::process::exit(2);
|
||||
}
|
||||
@@ -34,7 +34,10 @@ fn main() {
|
||||
let braze = plugin == "braze";
|
||||
let quench = plugin == "quench";
|
||||
let ballast = plugin == "ballast";
|
||||
let (width, height) = if ballast {
|
||||
let forge = plugin == "forge";
|
||||
let (width, height) = if forge {
|
||||
(forge_ui::WIDTH, forge_ui::HEIGHT)
|
||||
} else if ballast {
|
||||
(ballast_ui::WIDTH, ballast_ui::HEIGHT)
|
||||
} else if quench {
|
||||
(quench_ui::WIDTH, quench_ui::HEIGHT)
|
||||
@@ -195,6 +198,39 @@ fn main() {
|
||||
}
|
||||
knurl_state.accept_frame(engine.take_analyzer());
|
||||
}
|
||||
let mut forge_settings = forge_core::Settings::default();
|
||||
forge_settings.lathe.gains[1] = -9.;
|
||||
forge_settings.lathe.gains[3] = 4.;
|
||||
forge_settings.temper.drive = 9.;
|
||||
forge_settings.order = [
|
||||
forge_core::Stage::Knurl,
|
||||
forge_core::Stage::Lathe,
|
||||
forge_core::Stage::Temper,
|
||||
];
|
||||
let mut forge_state = forge_ui::State::default();
|
||||
forge_state.page = match args
|
||||
.iter()
|
||||
.position(|a| a == "--page")
|
||||
.map(|i| args[i + 1].as_str())
|
||||
{
|
||||
Some("temper") => forge_core::Stage::Temper,
|
||||
Some("knurl") => forge_core::Stage::Knurl,
|
||||
_ => forge_core::Stage::Lathe,
|
||||
};
|
||||
if forge {
|
||||
// An F1 saw bass through Knurl's Fry pattern first: Lathe after it still follows F1.
|
||||
let mut engine = forge_core::Engine::new(48000., 2).unwrap();
|
||||
engine.set_settings(forge_settings).unwrap();
|
||||
let mut saw = common_dsp::Saw::new(48000., 43.65);
|
||||
for i in 0..36000 {
|
||||
let x = (saw.sample() * 2.2).tanh() * 0.5;
|
||||
engine.process_sample([x, x]);
|
||||
if i % 1600 == 0 {
|
||||
forge_state.accept_frame(engine.take_analyzer());
|
||||
}
|
||||
}
|
||||
forge_state.accept_frame(engine.take_analyzer());
|
||||
}
|
||||
let mut planish_settings = planish_core::Settings {
|
||||
depth: 80.,
|
||||
gains: [0., 2., 3., -2.],
|
||||
@@ -416,7 +452,9 @@ fn main() {
|
||||
let session_motif = session.motifs[0].id;
|
||||
shared.replace(session).unwrap();
|
||||
let ctx = egui::Context::default();
|
||||
if ballast {
|
||||
if forge {
|
||||
forge_ui::style(&ctx);
|
||||
} else if ballast {
|
||||
ballast_ui::style(&ctx);
|
||||
} else if quench {
|
||||
quench_ui::style(&ctx);
|
||||
@@ -461,7 +499,9 @@ fn main() {
|
||||
},
|
||||
|ui| {
|
||||
egui::CentralPanel::default().show(ui, |ui| {
|
||||
if ballast {
|
||||
if forge {
|
||||
forge_ui::show(ui, &mut forge_settings, &mut forge_state);
|
||||
} else if ballast {
|
||||
ballast_ui::show(ui, &mut ballast_settings, &mut ballast_state);
|
||||
} else if quench {
|
||||
quench_ui::show(ui, &mut quench_settings, &mut quench_state);
|
||||
|
||||
Reference in new issue
Block a user