diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 154b7e3..84265c1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,4 +52,4 @@ jobs: # not exercise — the bundle step is where bundler.toml and the crate name # have to agree. - name: Bundle - run: cargo xtask bundle codename_206 --release + run: cargo xtask bundle bari_206 --release diff --git a/Cargo.lock b/Cargo.lock index b0319dc..06ede6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -147,6 +147,14 @@ dependencies = [ "windows-link", ] +[[package]] +name = "bari_206" +version = "0.1.0" +dependencies = [ + "nih_plug", + "nih_plug_egui", +] + [[package]] name = "baseview" version = "0.1.0" @@ -337,14 +345,6 @@ dependencies = [ "objc", ] -[[package]] -name = "codename_206" -version = "0.1.0" -dependencies = [ - "nih_plug", - "nih_plug_egui", -] - [[package]] name = "combine" version = "4.6.7" diff --git a/Cargo.toml b/Cargo.toml index 9d55e19..10f2fed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "codename_206" +name = "bari_206" version = "0.1.0" edition = "2021" -authors = ["Mikkeli Matlock "] +authors = ["Mikkeli Matlock "] homepage = "https://github.com/mikkeli/codename-206" description = "A VST3/CLAP multiband compressor/limiter with a custom gain-curve display" # VST3 is on by default in nih_plug, and its bindings (vst3-sys) are GPLv3. Any diff --git a/NOTICE b/NOTICE index 459b20b..5386949 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ -Codename 206 +Bari 206 Copyright 2026 Mikkeli Matlock Licensed under the GNU General Public License v3.0 or later. diff --git a/README.md b/README.md index 2d1fb05..f692c66 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Codename 206 +# Bari 206 *Called 206 because the Peugeot 206 has a 'maxi' variant. You'll know this is a Maximizer knockoff if you can follow that trail of thoughts.* Multiband Compressor / Limiter VST3 — Project Plan @@ -163,8 +163,8 @@ The project is already scaffolded (NIH-plug + nih_plug_egui, pinned to a fixed g ```powershell # Build + bundle the VST3 and CLAP -cargo xtask bundle codename_206 --release -# Output: target\bundled\Codename 206.vst3 and Codename 206.clap +cargo xtask bundle bari_206 --release +# Output: target\bundled\Bari 206.vst3 and Bari 206.clap ``` ### Deployment @@ -184,7 +184,7 @@ Use the provided script (no need to remember the details): `deploy.bat` is a double-click wrapper around the same script. After deploying, in FL Studio: **Options → Manage plugins → tick "Rescan previously failed -plugins" → Find installed plugins**, then search for **Codename 206**. (The rescan-failed step +plugins" → Find installed plugins**, then search for **Bari 206**. (The rescan-failed step is essential — without it FL silently skips a plugin it has seen before.) > **Known issue (deferred):** the **CLAP** build shows its name/vendor/type correctly in FL, but diff --git a/bundler.toml b/bundler.toml index 0fc844d..4a1d842 100644 --- a/bundler.toml +++ b/bundler.toml @@ -3,5 +3,5 @@ # [package_name] # name = "Human Readable Plugin Name" # defaults to -[codename_206] -name = "Codename 206" +[bari_206] +name = "Bari 206" diff --git a/check-branding.sh b/check-branding.sh index 78ce4c8..b08b0b2 100644 --- a/check-branding.sh +++ b/check-branding.sh @@ -19,34 +19,44 @@ # run this script; every failure it prints is a place still holding the old name. # --------------------------------------------------------------------------- -PKG="codename_206" # Cargo package name == bundler.toml table key -DISPLAY="Codename 206" # bundle name -> ".vst3" / ".clap" -PLUGIN_NAME="206 prototype" # Plugin::NAME - what the DAW displays -VENDOR="Novoyuuparosk" # Plugin::VENDOR +PKG="bari_206" # Cargo package name == bundler.toml table key +DISPLAY="Bari 206" # bundle name -> ".vst3" / ".clap" +PLUGIN_NAME="Bari 206" # Plugin::NAME - what the DAW displays +VENDOR="Novoyuuparosk" # Plugin::VENDOR - the org, not the person EMAIL="mikkeli@novoyuuparosk.org" # Plugin::EMAIL HOMEPAGE="https://github.com/mikkeli/codename-206" # Cargo homepage -> Plugin::URL -CLAP_ID="com.mikkeli.codename-206" # CLAP_ID - stable plugin identity -VST3_CLASS_ID="Codename206Maxi!" # VST3_CLASS_ID - stable identity, MUST be 16 bytes +CLAP_ID="org.novoyuuparosk.bari-206" # CLAP_ID - stable plugin identity +VST3_CLASS_ID="Bari206Multiband" # VST3_CLASS_ID - stable identity, MUST be 16 bytes DESCRIPTION="A VST3/CLAP multiband compressor/limiter with a custom gain-curve display" CLAP_DESCRIPTION="Multiband compressor/limiter (stage 3: 3-band + 'All' channel)" # Rust type names. Cosmetic - they never reach a host - but a rename that leaves # half of them behind is the residue that says nobody read the file. -STRUCT="Codename206" # the Plugin impl target (src/lib.rs) -PARAMS_STRUCT="Codename206Params" # the Params impl target (src/params.rs) +STRUCT="Bari206" # the Plugin impl target (src/lib.rs) +PARAMS_STRUCT="Bari206Params" # the Params impl target (src/params.rs) -# Seeded with this repo's CURRENT names, which is the point: each entry is -# skipped while it is still canonical above, and arms itself the moment you -# change that value. So the planned "codename 206" -> "206" rename is -# self-checking - every spelling you miss turns into a FAIL here on the next run. +# Old spellings retired by the "Codename 206" -> "Bari 206" rename, plus the new +# ones so the NEXT rename is self-checking too. Each entry is skipped while it is +# still one of the canonical values above and arms the moment it stops being one. +# +# Deliberately NOT listed: the bare "codename-206". The repo, its remote and the +# homepage URL all keep that name on purpose, so it is current branding, not +# residue. The retired CLAP ID is listed in full instead, which cannot collide +# with the homepage. STALE="codename_206 -codename-206 Codename 206 Codename206 Codename206Params Codename206Maxi! 206 prototype -com.mikkeli.codename-206" +com.mikkeli.codename-206 +bari_206 +Bari 206 +Bari206 +Bari206Params +Bari206Multiband +org.novoyuuparosk.bari-206" + set -u cd "$(dirname "$0")" || exit 1 @@ -126,6 +136,12 @@ check "params field type" src/lib.rs "params: Arc<$PARAMS_STRUCT>," printf '\ndocs\n' opt_check "README bundle command" README.md "cargo xtask bundle $PKG" +printf '\nci\n' +# CI bundles by package name, so a rename that misses this file breaks the build +# rather than drifting quietly - but it breaks after a full compile, which is a slow +# way to learn about a typo. Checking it here costs nothing and fails in seconds. +opt_check "CI bundle command" .github/workflows/ci.yaml "cargo xtask bundle $PKG" + printf '\ndeploy script\n' opt_check "deploy.ps1 default package" deploy.ps1 "\$Package = \"$PKG\"" opt_check "deploy.ps1 VST3 bundle" deploy.ps1 "\$vst3Name = \"$DISPLAY.vst3\"" diff --git a/deploy.ps1 b/deploy.ps1 index c292f38..1d024b4 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Build Codename 206 and install the VST3 (and CLAP) into the system plugin folders. + Build Bari 206 and install the VST3 (and CLAP) into the system plugin folders. .DESCRIPTION FL Studio scans `C:\Program Files\Common Files\VST3` by default and ignores @@ -25,7 +25,7 @@ param( [switch]$SkipBuild, [switch]$User, - [string]$Package = "codename_206" + [string]$Package = "bari_206" ) $ErrorActionPreference = "Stop" @@ -42,8 +42,8 @@ if (-not $SkipBuild) { if ($LASTEXITCODE -ne 0) { throw "cargo xtask bundle failed (exit $LASTEXITCODE)" } } -$vst3Name = "Codename 206.vst3" -$clapName = "Codename 206.clap" +$vst3Name = "Bari 206.vst3" +$clapName = "Bari 206.clap" $bundled = Join-Path $root "target\bundled" $vst3Src = Join-Path $bundled $vst3Name $clapSrc = Join-Path $bundled $clapName diff --git a/src/dsp/mod.rs b/src/dsp/mod.rs index a08344b..44c0f43 100644 --- a/src/dsp/mod.rs +++ b/src/dsp/mod.rs @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -//! DSP building blocks for Codename 206. +//! DSP building blocks for Bari 206. //! //! The signal chain: a `crossover` filterbank splits into bands, each band (plus the summed //! 'All' channel) runs a `compressor`, and a `limiter` (with a true-peak `oversampler` detector) diff --git a/src/editor/crossover.rs b/src/editor/crossover.rs index 47e50a2..6e6736a 100644 --- a/src/editor/crossover.rs +++ b/src/editor/crossover.rs @@ -10,7 +10,7 @@ use nih_plug_egui::egui::{ self, pos2, vec2, Align2, Color32, CornerRadius, DragValue, FontId, Painter, Rect, Sense, Stroke, }; -use crate::params::Codename206Params; +use crate::params::Bari206Params; /// Height of the handle strip. const GRAPH_H: f32 = 54.0; @@ -30,7 +30,7 @@ fn fmt_hz(hz: f32) -> String { } } -pub(super) fn draw(ui: &mut egui::Ui, params: &Codename206Params, setter: &ParamSetter) { +pub(super) fn draw(ui: &mut egui::Ui, params: &Bari206Params, setter: &ParamSetter) { let lo = params.crossover_low_hz.value(); let hi = params.crossover_high_hz.value(); // Each param's own min/max (normalized 0/1 map to the range ends). diff --git a/src/editor/gain_curve.rs b/src/editor/gain_curve.rs index 96466e1..f81c69c 100644 --- a/src/editor/gain_curve.rs +++ b/src/editor/gain_curve.rs @@ -10,14 +10,14 @@ use std::sync::atomic::Ordering; use crate::dsp::compressor::Compressor; use crate::meters::Meters; -use crate::params::Codename206Params; +use crate::params::Bari206Params; /// Side length of the square plot. const CURVE_SIZE: f32 = 150.0; /// dB extent of both axes (bottom/left = FLOOR_DB, top/right = 0 dBFS). const FLOOR_DB: f32 = -60.0; -pub(super) fn draw(ui: &mut egui::Ui, params: &Codename206Params, selected: usize, meters: &Meters) { +pub(super) fn draw(ui: &mut egui::Ui, params: &Bari206Params, selected: usize, meters: &Meters) { let labels = ["LOW", "MID", "HIGH", "ALL"]; let ch = selected.min(3); let cp = match ch { diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 2410451..69c4444 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -17,8 +17,8 @@ use nih_plug_egui::{ use std::sync::Arc; use crate::meters::Meters; -use crate::params::{Codename206Params, CompressorParams}; -use crate::Codename206; +use crate::params::{Bari206Params, CompressorParams}; +use crate::Bari206; mod crossover; mod gain_curve; @@ -36,7 +36,7 @@ struct EditorState { } /// Build the plugin editor over shared handles to the params and meter state. -pub(crate) fn create(params: Arc, meters: Arc) -> Option> { +pub(crate) fn create(params: Arc, meters: Arc) -> Option> { let egui_state = params.editor_state.clone(); create_egui_editor( params.editor_state.clone(), @@ -79,7 +79,7 @@ pub(crate) fn create(params: Arc, meters: Arc) -> Opt .min_size(Vec2::new(480.0, 320.0)) .show(egui_ctx, egui_state.as_ref(), |ui| { egui::ScrollArea::vertical().show(ui, |ui| { - ui.heading(Codename206::NAME); + ui.heading(Bari206::NAME); meter::draw(ui, &meters, &mut state.meter); ui.separator(); // Gain curve (left, square) beside the scrolling plot (right, fills the rest). diff --git a/src/lib.rs b/src/lib.rs index 7c22552..d2e2e28 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ use dsp::compressor::{Compressor, MAX_LOOKAHEAD_MS}; use dsp::crossover::Crossover; use dsp::limiter::Limiter; use meters::Meters; -use params::{build_settings, Codename206Params}; +use params::{build_settings, Bari206Params}; /// Peak-meter fall: after this long of silence the bars decay by 12 dB. (Matches nih-plug's /// gain-gui example feel.) @@ -38,13 +38,13 @@ const ALL: usize = 3; /// * ALL - 35 ms: full-band, so it must cover the low content too. const RMS_WINDOW_MS: [f32; 4] = [50.0, 20.0, 10.0, 35.0]; -/// Codename 206 — Stage 3: 3-band crossover + per-band compressors summed into an 'All' channel. +/// Bari 206 — Stage 3: 3-band crossover + per-band compressors summed into an 'All' channel. /// /// Signal: input → LR4 crossover → {low, mid, high} each through their own compressor → sum → /// 'All' compressor → output. Bypassing low+mid+high collapses it to a plain full-band comp /// driven by the 'All' channel (the crossover sums flat). -struct Codename206 { - params: Arc, +struct Bari206 { + params: Arc, sample_rate: f32, crossover: Crossover, /// Compressors indexed by [`LOW`], [`MID`], [`HIGH`], [`ALL`]. @@ -72,10 +72,10 @@ struct Codename206 { /// Limiter gain reduction (dB) above which a plot bucket is flagged as hitting the ceiling. const CEILING_HIT_GR_DB: f32 = 0.1; -impl Default for Codename206 { +impl Default for Bari206 { fn default() -> Self { Self { - params: Arc::new(Codename206Params::default()), + params: Arc::new(Bari206Params::default()), sample_rate: 48_000.0, crossover: Crossover::new(), comps: [Compressor::new(), Compressor::new(), Compressor::new(), Compressor::new()], @@ -92,14 +92,14 @@ impl Default for Codename206 { } } -impl Codename206 { +impl Bari206 { fn lookahead_samples(&self) -> usize { (self.params.look_ahead_ms.value() * 0.001 * self.sample_rate).round() as usize } } -impl Plugin for Codename206 { - const NAME: &'static str = "206 prototype"; +impl Plugin for Bari206 { + const NAME: &'static str = "Bari 206"; const VENDOR: &'static str = "Novoyuuparosk"; const URL: &'static str = env!("CARGO_PKG_HOMEPAGE"); const EMAIL: &'static str = "mikkeli@novoyuuparosk.org"; @@ -403,8 +403,8 @@ impl Plugin for Codename206 { } } -impl ClapPlugin for Codename206 { - const CLAP_ID: &'static str = "com.mikkeli.codename-206"; +impl ClapPlugin for Bari206 { + const CLAP_ID: &'static str = "org.novoyuuparosk.bari-206"; const CLAP_DESCRIPTION: Option<&'static str> = Some("Multiband compressor/limiter (stage 3: 3-band + 'All' channel)"); const CLAP_MANUAL_URL: Option<&'static str> = Some(Self::URL); @@ -418,11 +418,11 @@ impl ClapPlugin for Codename206 { ]; } -impl Vst3Plugin for Codename206 { - const VST3_CLASS_ID: [u8; 16] = *b"Codename206Maxi!"; +impl Vst3Plugin for Bari206 { + const VST3_CLASS_ID: [u8; 16] = *b"Bari206Multiband"; const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[Vst3SubCategory::Fx, Vst3SubCategory::Dynamics]; } -nih_export_clap!(Codename206); -nih_export_vst3!(Codename206); +nih_export_clap!(Bari206); +nih_export_vst3!(Bari206); diff --git a/src/params.rs b/src/params.rs index ff5898a..751d26c 100644 --- a/src/params.rs +++ b/src/params.rs @@ -23,7 +23,7 @@ pub enum DetectionMode { } #[derive(Params)] -pub struct Codename206Params { +pub struct Bari206Params { #[persist = "editor-state"] pub editor_state: Arc, @@ -87,7 +87,7 @@ pub struct CompressorParams { pub mix: FloatParam, } -impl Default for Codename206Params { +impl Default for Bari206Params { fn default() -> Self { Self { editor_state: EguiState::from_size(760, 520),