From a13263051a413b22d43f4ba74860e6f3b267c7be Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 26 Jan 2022 19:49:22 +0100 Subject: [PATCH] Add a VST3 categories constant for plugins --- plugins/gain/src/lib.rs | 2 ++ src/plugin.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/plugins/gain/src/lib.rs b/plugins/gain/src/lib.rs index f483693a..7a648bf5 100644 --- a/plugins/gain/src/lib.rs +++ b/plugins/gain/src/lib.rs @@ -66,6 +66,8 @@ impl Plugin for Gain { const URL: &'static str = "https://youtu.be/dQw4w9WgXcQ"; const EMAIL: &'static str = "info@example.com"; + const VST3_CATEGORIES: &'static str = "Fx|Dynamics"; + const DEFAULT_NUM_INPUTS: u32 = 2; const DEFAULT_NUM_OUTPUTS: u32 = 2; diff --git a/src/plugin.rs b/src/plugin.rs index c1f55442..038d8e5e 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -42,6 +42,11 @@ pub trait Plugin: Default + Sync { const URL: &'static str; const EMAIL: &'static str; + /// One or more categories, separated by pipe characters (`|`), up to 31 characters. Anything + /// logner than that will be truncated. See the VST3 SDK for examples of common categories: + /// https://github.com/steinbergmedia/vst3_pluginterfaces/blob/2ad397ade5b51007860bedb3b01b8afd2c5f6fba/vst/ivstaudioprocessor.h#L49-L90 + const VST3_CATEGORIES: &'static str; + /// The default number of inputs. Some hosts like, like Bitwig and Ardour, use the defaults /// instead of setting up the busses properly. const DEFAULT_NUM_INPUTS: u32;