Skip to content

Commit

Permalink
Add other effects to voice effect example
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-L committed Oct 8, 2024
1 parent f2cec3a commit dc8f3d4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/voice-effect-example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "../tests/simd-test-include.h"
#include "sst/voice-effects/distortion/BitCrusher.h"
#include "sst/voice-effects/utilities/VolumeAndPan.h"
#include "sst/voice-effects/dynamics/Compressor.h"

struct DbToLinearProvider
{
Expand Down Expand Up @@ -53,6 +54,10 @@ struct SSTFX {

std::unique_ptr<sst::voice_effects::utilities::VolumeAndPan<FxConfig>> fx;

// std::unique_ptr<sst::voice_effects::distortion::BitCrusher<FxConfig>> fx;

// std::unique_ptr<sst::voice_effects::dynamics::Compressor<FxConfig>> fx;

SSTFX()
{
dbtlp.init();
Expand All @@ -62,6 +67,18 @@ struct SSTFX {
sampleRate = sampleRate;
dbtlp.init();

// fx = std::make_unique<sst::voice_effects::dynamics::Compressor<FxConfig>>();
// fx->initVoiceEffect();
// fx->initVoiceEffectParams();
// fx->setFloatParam(sst::voice_effects::dynamics::Compressor<FxConfig>::fpThreshold, -10);
// fx->setFloatParam(sst::voice_effects::dynamics::Compressor<FxConfig>::fpRatio, 7);
// fx->setFloatParam(sst::voice_effects::dynamics::Compressor<FxConfig>::fpMakeUp, 3);

// fx = std::make_unique<sst::voice_effects::distortion::BitCrusher<FxConfig>>();
// fx->initVoiceEffectParams();
// fx->setFloatParam(sst::voice_effects::distortion::BitCrusher<FxConfig>::fpBitdepth, 0.3);
// fx->setFloatParam(sst::voice_effects::distortion::BitCrusher<FxConfig>::fpSamplerate, 0.0);

fx = std::make_unique<sst::voice_effects::utilities::VolumeAndPan<FxConfig>>();
fx->initVoiceEffectParams();
fx->setFloatParam(sst::voice_effects::utilities::VolumeAndPan<FxConfig>::fpVolume, 8);
Expand Down

0 comments on commit dc8f3d4

Please sign in to comment.