From f7bfbb8d9553fc2ae72fdfa1e0f23583a36d52ff Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 4 Jun 2022 13:36:17 +0200 Subject: [PATCH] Add stable IDs to the plugin's enum parameters Existing instances will automatically be upgraded to these IDs when the instance gets saved. This makes it possible to rearrange things later when needed. --- plugins/crisp/src/lib.rs | 5 +++++ plugins/diopser/src/lib.rs | 2 ++ plugins/puberty_simulator/src/lib.rs | 2 ++ 3 files changed, 9 insertions(+) diff --git a/plugins/crisp/src/lib.rs b/plugins/crisp/src/lib.rs index b8e38494..73409403 100644 --- a/plugins/crisp/src/lib.rs +++ b/plugins/crisp/src/lib.rs @@ -102,10 +102,13 @@ struct CrispParams { #[derive(Enum, Debug, PartialEq)] enum Mode { /// RM the entire waveform. + #[id = "soggy"] Soggy, /// RM only the positive part of the waveform. + #[id = "crispy"] Crispy, /// RM only the negative part of the waveform. + #[id = "crispy-negated"] #[name = "Crispy (alt)"] CrispyNegated, } @@ -114,8 +117,10 @@ enum Mode { #[derive(Enum, Debug, PartialEq)] enum StereoMode { /// Use the same noise for both channels. + #[id = "mono"] Mono, /// Use a different noise source per channel. + #[id = "stereo"] Stereo, } diff --git a/plugins/diopser/src/lib.rs b/plugins/diopser/src/lib.rs index 99e7c42d..ededad75 100644 --- a/plugins/diopser/src/lib.rs +++ b/plugins/diopser/src/lib.rs @@ -218,7 +218,9 @@ impl DiopserParams { #[derive(Enum, Debug, PartialEq)] enum SpreadStyle { + #[id = "octaves"] Octaves, + #[id = "linear"] Linear, } diff --git a/plugins/puberty_simulator/src/lib.rs b/plugins/puberty_simulator/src/lib.rs index 1df0f77f..8bf169be 100644 --- a/plugins/puberty_simulator/src/lib.rs +++ b/plugins/puberty_simulator/src/lib.rs @@ -86,10 +86,12 @@ struct PubertySimulatorParams { enum PitchShiftingMode { /// Directly linearly interpolate sine and cosine waves from different bins. This obviously /// sounds very bad, but it also sounds kind of hilarious. + #[id = "interpolated-rectangular"] #[name = "Very broken"] InterpolateRectangular, /// The same as `InterpolateRectangular`, but interpolating the polar forms instead. This sounds /// slightly better, which actually ends up making it sound a lot worse. + #[id = "interpolated-polar"] #[name = "Also very broken"] InterpolatePolar, }