diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e863a77..51fb9e2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -58,4 +58,4 @@ jobs: # not exercise — the bundle step is where bundler.toml and the crate name # have to agree. - name: Bundle - run: cargo xtask bundle nih_plug_template --release --features vst3 + run: cargo xtask bundle plugin_name --release --features vst3 diff --git a/Cargo.lock b/Cargo.lock index 870e934..9cb60af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1102,14 +1102,6 @@ dependencies = [ "serde", ] -[[package]] -name = "nih_plug_template" -version = "0.1.0" -dependencies = [ - "nih_plug", - "nih_plug_egui", -] - [[package]] name = "nih_plug_xtask" version = "0.1.0" @@ -1502,6 +1494,14 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +[[package]] +name = "plugin_name" +version = "0.1.0" +dependencies = [ + "nih_plug", + "nih_plug_egui", +] + [[package]] name = "polling" version = "3.11.0" diff --git a/Cargo.toml b/Cargo.toml index 2426245..f446d78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "nih_plug_template" +name = "plugin_name" version = "0.1.0" edition = "2021" authors = ["Your Name "] -homepage = "https://github.com/YOUR-USERNAME/YOUR-PLUGIN-NAME" +homepage = "https://wiki.novoyuuparosk.org" description = "A minimal NIH-plug audio plugin" license = "GPL-3.0-or-later" @@ -15,7 +15,7 @@ members = ["xtask"] # longer raises a licensing question — the gate now just keeps the default build # light, since `vst3-sys` and its macro machinery are a sizeable dependency a # CLAP-only plugin never needs. Flip `default` to ["vst3"] if you always want it: -# cargo xtask bundle nih_plug_template --release --features vst3 +# cargo xtask bundle plugin_name --release --features vst3 default = [] vst3 = ["nih_plug/vst3"] diff --git a/README.md b/README.md index e9cde5c..cfd62bc 100644 --- a/README.md +++ b/README.md @@ -75,10 +75,10 @@ after if you do. # No VST3 SDK needed — NIH-plug bundles its own bindings. # Build + bundle the CLAP (default) -cargo xtask bundle nih_plug_template --release +cargo xtask bundle plugin_name --release # Add the VST3 as well — see the licensing note below before you do this -cargo xtask bundle nih_plug_template --release --features vst3 +cargo xtask bundle plugin_name --release --features vst3 ``` **Output:** `target/bundled/.clap` (and `.vst3` with `--features vst3`), where diff --git a/bundler.toml b/bundler.toml index 7dfe766..ec1e8e8 100644 --- a/bundler.toml +++ b/bundler.toml @@ -3,5 +3,5 @@ # [package_name] # name = "Human Readable Bundle Name" # defaults to -[nih_plug_template] +[plugin_name] name = "Plugin Name" diff --git a/src/lib.rs b/src/lib.rs index f74f2ff..ed137a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ use std::sync::Arc; // ────────────────────────────────────────────── #[derive(Params)] -struct PluginParams { +struct PluginNameParams { /// Editor window size, persisted with the plugin state. #[persist = "editor-state"] editor_state: Arc, @@ -21,7 +21,7 @@ struct PluginParams { gain: FloatParam, } -impl Default for PluginParams { +impl Default for PluginNameParams { fn default() -> Self { Self { editor_state: EguiState::from_size(320, 160), @@ -47,11 +47,11 @@ impl Default for PluginParams { // ────────────────────────────────────────────── #[derive(Default)] -struct MyPlugin { - params: Arc, +struct PluginName { + params: Arc, } -impl Plugin for MyPlugin { +impl Plugin for PluginName { // TODO: Replace these placeholder values with your plugin's metadata. const NAME: &'static str = "Plugin Name"; const VENDOR: &'static str = "Your Name"; @@ -124,7 +124,7 @@ impl Plugin for MyPlugin { } } -impl ClapPlugin for MyPlugin { +impl ClapPlugin for PluginName { // TODO: Replace with a unique CLAP ID in reverse-DNS form, e.g. "com.acme.fuzzbox" const CLAP_ID: &'static str = "com.your-domain.plugin-name"; const CLAP_DESCRIPTION: Option<&'static str> = Some("Your plugin description"); @@ -134,13 +134,13 @@ impl ClapPlugin for MyPlugin { } #[cfg(feature = "vst3")] -impl Vst3Plugin for MyPlugin { +impl Vst3Plugin for PluginName { // TODO: Replace with a unique 16-byte Class ID. // Must be exactly 16 bytes — padded with '!' if shorter. const VST3_CLASS_ID: [u8; 16] = *b"Unique16CharId!!"; const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[Vst3SubCategory::Fx]; } -nih_export_clap!(MyPlugin); +nih_export_clap!(PluginName); #[cfg(feature = "vst3")] -nih_export_vst3!(MyPlugin); +nih_export_vst3!(PluginName); diff --git a/tools/branding-sites.tsv b/tools/branding-sites.tsv index ae2c2ca..55fa7ab 100644 --- a/tools/branding-sites.tsv +++ b/tools/branding-sites.tsv @@ -14,32 +14,32 @@ # with owner "custom" - no shell to change, and it survives the next rename. # #kind owner file pattern -req pkg.cargo Cargo.toml name = "nih_plug_template" -req pkg.bundler bundler.toml [nih_plug_template] -opt pkg.lock Cargo.lock name = "nih_plug_template" -opt pkg.ci .github/workflows/ci.yaml cargo xtask bundle nih_plug_template -opt pkg.readme README.md cargo xtask bundle nih_plug_template +req pkg.cargo Cargo.toml name = "plugin_name" +req pkg.bundler bundler.toml [plugin_name] +opt pkg.lock Cargo.lock name = "plugin_name" +opt pkg.ci .github/workflows/ci.yaml cargo xtask bundle plugin_name +opt pkg.readme README.md cargo xtask bundle plugin_name req display.bundler bundler.toml name = "Plugin Name" opt display.notice NOTICE Plugin Name req name.plugin src/lib.rs const NAME: &'static str = "Plugin Name" req vendor.plugin src/lib.rs const VENDOR: &'static str = "Your Name" req email.plugin src/lib.rs const EMAIL: &'static str = "your@email.com" req authors.cargo Cargo.toml authors = ["Your Name "] -req homepage.cargo Cargo.toml homepage = "https://github.com/YOUR-USERNAME/YOUR-PLUGIN-NAME" +req homepage.cargo Cargo.toml homepage = "https://wiki.novoyuuparosk.org" req url.plugin src/lib.rs const URL: &'static str = env!("CARGO_PKG_HOMEPAGE") req description.cargo Cargo.toml description = "A minimal NIH-plug audio plugin" req description.clap src/lib.rs Some("Your plugin description") req clapid.plugin src/lib.rs const CLAP_ID: &'static str = "com.your-domain.plugin-name" req vst3id.plugin src/lib.rs const VST3_CLASS_ID: [u8; 16] = *b"Unique16CharId!!" -req struct.def src/lib.rs struct MyPlugin { -req struct.plugin src/lib.rs impl Plugin for MyPlugin { -req struct.clap src/lib.rs impl ClapPlugin for MyPlugin { -req struct.vst3 src/lib.rs impl Vst3Plugin for MyPlugin { -req struct.exportclap src/lib.rs nih_export_clap!(MyPlugin); -req struct.exportvst3 src/lib.rs nih_export_vst3!(MyPlugin); -req params.def src/lib.rs struct PluginParams { -req params.default src/lib.rs impl Default for PluginParams { -req params.field src/lib.rs params: Arc, -opt deploy.pkg deploy.ps1 $Package = "nih_plug_template" +req struct.def src/lib.rs struct PluginName { +req struct.plugin src/lib.rs impl Plugin for PluginName { +req struct.clap src/lib.rs impl ClapPlugin for PluginName { +req struct.vst3 src/lib.rs impl Vst3Plugin for PluginName { +req struct.exportclap src/lib.rs nih_export_clap!(PluginName); +req struct.exportvst3 src/lib.rs nih_export_vst3!(PluginName); +req params.def src/lib.rs struct PluginNameParams { +req params.default src/lib.rs impl Default for PluginNameParams { +req params.field src/lib.rs params: Arc, +opt deploy.pkg deploy.ps1 $Package = "plugin_name" opt deploy.vst3 deploy.ps1 $vst3Name = "Plugin Name.vst3" opt deploy.clap deploy.ps1 $clapName = "Plugin Name.clap" diff --git a/tools/branding.conf b/tools/branding.conf index 72312a2..a2ff7e2 100644 --- a/tools/branding.conf +++ b/tools/branding.conf @@ -23,15 +23,15 @@ _derive_struct() { } # --- the names --------------------------------------------------------------- -PLUGIN_NAME="Plugin Name" # the one name everything else derives from -VENDOR="Your Name" # Plugin::VENDOR - the org, not the person -EMAIL="your@email.com" # Plugin::EMAIL +PLUGIN_NAME="Plugin Name" +VENDOR="Your Name" +EMAIL="your@email.com" # Cargo's authors entry names whoever wrote it, which is not always the vendor: # an org ships the plugin, a person authored it. Defaults to VENDOR when the two # are the same, which is the common case for a one-person project. # AUTHOR="Your Name" -HOMEPAGE="https://github.com/YOUR-USERNAME/YOUR-PLUGIN-NAME" # -> Plugin::URL -DESCRIPTION="A minimal NIH-plug audio plugin" # Cargo description +HOMEPAGE="https://wiki.novoyuuparosk.org" +DESCRIPTION="A minimal NIH-plug audio plugin" # What the plugin does *now*. No codename, no "prototype", no "v2 rewrite" - # hosts show this to users who never knew any of that. check-branding.sh @@ -43,8 +43,8 @@ CLAP_DESCRIPTION="Your plugin description" # existing session silently loses the plugin: the track comes up empty, with no # error. Choose once before the first release, then never again. # brand-plugin.sh refuses to move them without --allow-identity-change. -CLAP_ID="com.your-domain.plugin-name" # reverse-DNS, lowercase, no spaces -VST3_CLASS_ID="Unique16CharId!!" # MUST be exactly 16 bytes +CLAP_ID="com.your-domain.plugin-name" +VST3_CLASS_ID="Unique16CharId!!" # --- fixed at repo creation -------------------------------------------------- # The repository's own name. Deliberately NOT renamed when the plugin is: the @@ -66,9 +66,9 @@ PARAMS_FILE="src/lib.rs" # its package and type names are the template's own rather than derived from a # product name. Delete these three lines after renaming and the derivations # from PLUGIN_NAME take over. -PKG="nih_plug_template" -STRUCT="MyPlugin" -PARAMS_STRUCT="PluginParams" +PKG="plugin_name" +STRUCT="PluginName" +PARAMS_STRUCT="PluginNameParams" # DISPLAY="Plugin Name" # defaults to PLUGIN_NAME : "${AUTHOR:=$VENDOR}" : "${DISPLAY:=$PLUGIN_NAME}" @@ -92,4 +92,8 @@ com.your-domain.plugin-name Unique16CharId!! YOUR-USERNAME YOUR-PLUGIN-NAME -your-domain" +your-domain +https://github.com/YOUR-USERNAME/YOUR-PLUGIN-NAME +nih_plug_template +PluginParams +MyPlugin"