Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lfo-shapes #89

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion include/sst/voice-effects/modulation/Phaser.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,20 @@ template <typename VFXConfig> struct Phaser : core::VoiceEffectTemplateBase<VFXC
case ipStereo:
return pmd().asBool().withDefault(false).withName("Stereo");
case ipShape:
return pmd().asInt().withRange(0, 6).withName("LFO shape");
return pmd()
.asInt()
.withRange(0, 6)
.withUnorderedMapFormatting({

{0, "Sine"},
{1, "Triangle"},
{2, "Ramp Down"},
{3, "Ramp Up"},
{4, "Square"},
{5, "Noise"},
{6, "S&H"}})
.withDefault(0)
.withName("LFO shape");
}
return pmd().asInt().withName("Error");
}
Expand Down
17 changes: 15 additions & 2 deletions include/sst/voice-effects/modulation/Tremolo.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ template <typename VFXConfig> struct Tremolo : core::VoiceEffectTemplateBase<VFX
.asFloat()
.withRange(
150.f,
1500.f) // TODO: I increase the range without making the param scaling suck.
1500.f) // TODO: Increase the range without making the param scaling suck.
.withDefault(700.f)
.withLinearScaleFormatting("Hz")
.withName("Crossover");
Expand All @@ -104,7 +104,20 @@ template <typename VFXConfig> struct Tremolo : core::VoiceEffectTemplateBase<VFX
case ipStereo:
return pmd().asBool().withDefault(false).withName("Stereo");
case ipShape:
return pmd().asInt().withRange(0, 6).withName("LFO shape");
return pmd()
.asInt()
.withRange(0, 6)
.withUnorderedMapFormatting({

{0, "Sine"},
{1, "Triangle"},
{2, "Ramp Down"},
{3, "Ramp Up"},
{4, "Square"},
{5, "Noise"},
{6, "S&H"}})
.withDefault(0)
.withName("LFO shape");
case ipHarmonic:
return pmd().asBool().withDefault(false).withName("Harmonic");
}
Expand Down
Loading