Replace VST3 category string with enum slice

I've been putting this off for a while, but now is finally the day. We
already did this for CLAP a while back. This is both simpler and less
error prone.
This commit is contained in:
Robbert van der Helm
2023-02-01 16:09:03 +01:00
parent 7fe339987a
commit d6184ea06e
23 changed files with 91 additions and 38 deletions

View File

@@ -431,6 +431,7 @@ impl ClapPlugin for BuffrGlitch {
const CLAP_SUPPORT_URL: Option<&'static str> = None;
const CLAP_FEATURES: &'static [ClapFeature] = &[
ClapFeature::AudioEffect,
ClapFeature::Synthesizer,
ClapFeature::Stereo,
ClapFeature::Glitch,
];
@@ -438,7 +439,11 @@ impl ClapPlugin for BuffrGlitch {
impl Vst3Plugin for BuffrGlitch {
const VST3_CLASS_ID: [u8; 16] = *b"BuffrGlitch.RvdH";
const VST3_CATEGORIES: &'static str = "Fx";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[
Vst3SubCategory::Fx,
Vst3SubCategory::Synth,
Vst3SubCategory::Custom("Glitch"),
];
}
nih_export_clap!(BuffrGlitch);

View File

@@ -507,7 +507,11 @@ impl ClapPlugin for Crisp {
impl Vst3Plugin for Crisp {
const VST3_CLASS_ID: [u8; 16] = *b"CrispPluginRvdH.";
const VST3_CATEGORIES: &'static str = "Fx|Filter|Distortion";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[
Vst3SubCategory::Fx,
Vst3SubCategory::Filter,
Vst3SubCategory::Distortion,
];
}
nih_export_clap!(Crisp);

View File

@@ -401,7 +401,8 @@ impl ClapPlugin for Crossover {
impl Vst3Plugin for Crossover {
const VST3_CLASS_ID: [u8; 16] = *b"CrossoverRvdH...";
const VST3_CATEGORIES: &'static str = "Fx|Tools";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Tools];
}
nih_export_clap!(Crossover);

View File

@@ -355,7 +355,8 @@ impl ClapPlugin for Diopser {
impl Vst3Plugin for Diopser {
const VST3_CLASS_ID: [u8; 16] = *b"DiopserPlugRvdH.";
const VST3_CATEGORIES: &'static str = "Fx|Filter";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Filter];
}
nih_export_clap!(Diopser);

View File

@@ -195,7 +195,8 @@ impl ClapPlugin for Gain {
impl Vst3Plugin for Gain {
const VST3_CLASS_ID: [u8; 16] = *b"GainMoistestPlug";
const VST3_CATEGORIES: &'static str = "Fx|Dynamics";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Tools];
}
nih_export_clap!(Gain);

View File

@@ -225,7 +225,8 @@ impl ClapPlugin for Gain {
impl Vst3Plugin for Gain {
const VST3_CLASS_ID: [u8; 16] = *b"GainGuiYeahBoyyy";
const VST3_CATEGORIES: &'static str = "Fx|Dynamics";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Tools];
}
nih_export_clap!(Gain);

View File

@@ -167,7 +167,8 @@ impl ClapPlugin for Gain {
impl Vst3Plugin for Gain {
const VST3_CLASS_ID: [u8; 16] = *b"GainGuiIcedAaAAa";
const VST3_CATEGORIES: &'static str = "Fx|Dynamics";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Tools];
}
nih_export_clap!(Gain);

View File

@@ -166,7 +166,8 @@ impl ClapPlugin for Gain {
impl Vst3Plugin for Gain {
const VST3_CLASS_ID: [u8; 16] = *b"GainGuiVIIIZIAAA";
const VST3_CATEGORIES: &'static str = "Fx|Dynamics";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Tools];
}
nih_export_clap!(Gain);

View File

@@ -227,7 +227,8 @@ impl ClapPlugin for MidiInverter {
impl Vst3Plugin for MidiInverter {
const VST3_CLASS_ID: [u8; 16] = *b"M1d1Inv3r70rzAaA";
const VST3_CATEGORIES: &'static str = "Instrument|Tools";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Instrument, Vst3SubCategory::Tools];
}
nih_export_clap!(MidiInverter);

View File

@@ -612,7 +612,8 @@ impl ClapPlugin for PolyModSynth {
// modulation
impl Vst3Plugin for PolyModSynth {
const VST3_CLASS_ID: [u8; 16] = *b"PolyM0dSynth1337";
const VST3_CATEGORIES: &'static str = "Instrument|Synth";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Instrument, Vst3SubCategory::Synth];
}
nih_export_clap!(PolyModSynth);

View File

@@ -213,7 +213,11 @@ impl ClapPlugin for Sine {
impl Vst3Plugin for Sine {
const VST3_CLASS_ID: [u8; 16] = *b"SineMoistestPlug";
const VST3_CATEGORIES: &'static str = "Instrument|Synth|Tools";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[
Vst3SubCategory::Instrument,
Vst3SubCategory::Synth,
Vst3SubCategory::Tools,
];
}
nih_export_clap!(Sine);

View File

@@ -179,7 +179,8 @@ impl ClapPlugin for Stft {
impl Vst3Plugin for Stft {
const VST3_CLASS_ID: [u8; 16] = *b"StftMoistestPlug";
const VST3_CATEGORIES: &'static str = "Fx|Tools";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Tools];
}
nih_export_clap!(Stft);

View File

@@ -102,7 +102,11 @@ impl ClapPlugin for SysEx {
impl Vst3Plugin for SysEx {
const VST3_CLASS_ID: [u8; 16] = *b"SysExCoolPluginn";
const VST3_CATEGORIES: &'static str = "Fx|Instrument|Tools";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[
Vst3SubCategory::Fx,
Vst3SubCategory::Instrument,
Vst3SubCategory::Tools,
];
}
nih_export_clap!(SysEx);

View File

@@ -261,7 +261,12 @@ impl ClapPlugin for LoudnessWarWinner {
impl Vst3Plugin for LoudnessWarWinner {
const VST3_CLASS_ID: [u8; 16] = *b"LoudnessWar.RvdH";
const VST3_CATEGORIES: &'static str = "Fx|Dynamics|Distortion";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[
Vst3SubCategory::Fx,
Vst3SubCategory::Dynamics,
Vst3SubCategory::Distortion,
Vst3SubCategory::Custom("Pain"),
];
}
nih_export_clap!(LoudnessWarWinner);

View File

@@ -431,7 +431,8 @@ impl ClapPlugin for PubertySimulator {
impl Vst3Plugin for PubertySimulator {
const VST3_CLASS_ID: [u8; 16] = *b"PubertySim..RvdH";
const VST3_CATEGORIES: &'static str = "Fx|Pitch Shift";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::PitchShift];
}
nih_export_clap!(PubertySimulator);

View File

@@ -340,7 +340,8 @@ impl ClapPlugin for SafetyLimiter {
impl Vst3Plugin for SafetyLimiter {
const VST3_CLASS_ID: [u8; 16] = *b"SafetyLimtrRvdH.";
const VST3_CATEGORIES: &'static str = "Fx|Tools";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
&[Vst3SubCategory::Fx, Vst3SubCategory::Tools];
}
nih_export_clap!(SafetyLimiter);

View File

@@ -581,7 +581,11 @@ impl ClapPlugin for SpectralCompressor {
impl Vst3Plugin for SpectralCompressor {
const VST3_CLASS_ID: [u8; 16] = *b"SpectrlComprRvdH";
const VST3_CATEGORIES: &'static str = "Fx|Dynamics|Spectral";
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[
Vst3SubCategory::Fx,
Vst3SubCategory::Dynamics,
Vst3SubCategory::Custom("Spectral"),
];
}
nih_export_clap!(SpectralCompressor);