diff --git a/include/sst/effects-shared/TreemonsterCore.h b/include/sst/effects-shared/TreemonsterCore.h index e22c532..e133aed 100644 --- a/include/sst/effects-shared/TreemonsterCore.h +++ b/include/sst/effects-shared/TreemonsterCore.h @@ -71,7 +71,8 @@ struct TreemonsterCore : public BaseClass mix.set_blocksize(FXConfig::blockSize); } - void processWithoutMixOrWith(float *dataL, float *dataR, float *wetL, float *wetR); + void processWithoutMixOrWith(const float *const dataL, const float *const dataR, float *wetL, + float *wetR); void processWithMixAndWidth(float *dataL, float *dataR) { @@ -168,9 +169,8 @@ inline void TreemonsterCore::setvars(bool init) } } template -void TreemonsterCore::processWithoutMixOrWith(float *dataL, - float *dataR, - float *L, float *R) +void TreemonsterCore::processWithoutMixOrWith( + const float *const dataL, const float *const dataR, float *L, float *R) { static constexpr double MIDI_0_FREQ = 8.17579891564371; // or 440.0 * pow( 2.0, - (69.0/12.0 ) ) diff --git a/include/sst/voice-effects/delay/Chorus.h b/include/sst/voice-effects/delay/Chorus.h index 00c3bf5..45c626c 100644 --- a/include/sst/voice-effects/delay/Chorus.h +++ b/include/sst/voice-effects/delay/Chorus.h @@ -206,8 +206,8 @@ template struct Chorus : core::VoiceEffectTemplateBase - void stereoImpl(const std::array &lines, float *datainL, float *datainR, - float *dataoutL, float *dataoutR) + void stereoImpl(const std::array &lines, const float *const datainL, + const float *const datainR, float *dataoutL, float *dataoutR) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -286,7 +286,7 @@ template struct Chorus : core::VoiceEffectTemplateBase void monoImpl(T *line, float *datainL, float *dataoutL) + template void monoImpl(T *line, const float *const datainL, float *dataoutL) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -351,8 +351,8 @@ template struct Chorus : core::VoiceEffectTemplateBase struct Chorus : core::VoiceEffectTemplateBase struct MicroGate : core::VoiceEffectTemplateBaseinitToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { namespace mech = sst::basic_blocks::mechanics; diff --git a/include/sst/voice-effects/delay/ShortDelay.h b/include/sst/voice-effects/delay/ShortDelay.h index aec53e2..6df141e 100644 --- a/include/sst/voice-effects/delay/ShortDelay.h +++ b/include/sst/voice-effects/delay/ShortDelay.h @@ -191,8 +191,8 @@ template struct ShortDelay : core::VoiceEffectTemplateBase< void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } template - void stereoImpl(const std::array &lines, float *datainL, float *datainR, - float *dataoutL, float *dataoutR) + void stereoImpl(const std::array &lines, const float *const datainL, + const float *const datainR, float *dataoutL, float *dataoutR) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -264,7 +264,7 @@ template struct ShortDelay : core::VoiceEffectTemplateBase< } } - template void monoImpl(T *line, float *datainL, float *dataoutL) + template void monoImpl(T *line, const float *const datainL, float *dataoutL) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -313,8 +313,8 @@ template struct ShortDelay : core::VoiceEffectTemplateBase< } } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { if (isShort) { @@ -330,7 +330,8 @@ template struct ShortDelay : core::VoiceEffectTemplateBase< } } - void processMonoToStereo(float *datain, float *dataoutL, float *dataoutR, float pitch) + void processMonoToStereo(const float *const datain, float *dataoutL, float *dataoutR, + float pitch) { if (isShort) { @@ -346,7 +347,7 @@ template struct ShortDelay : core::VoiceEffectTemplateBase< } } - void processMonoToMono(float *datain, float *dataout, float pitch) + void processMonoToMono(const float *const datain, float *dataout, float pitch) { if (isShort) { diff --git a/include/sst/voice-effects/delay/StringResonator.h b/include/sst/voice-effects/delay/StringResonator.h index 3a3df49..0669f9f 100644 --- a/include/sst/voice-effects/delay/StringResonator.h +++ b/include/sst/voice-effects/delay/StringResonator.h @@ -245,8 +245,8 @@ template struct StringResonator : core::VoiceEffectTemplate } template - void stereoDualString(const std::array &lines, float *datainL, float *datainR, - float *dataoutL, float *dataoutR, float pitch) + void stereoDualString(const std::array &lines, const float *const datainL, + const float *const datainR, float *dataoutL, float *dataoutR, float pitch) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -360,8 +360,8 @@ template struct StringResonator : core::VoiceEffectTemplate } template - void stereoSingleString(T *line, float *datainL, float *datainR, float *dataoutL, - float *dataoutR, float pitch) + void stereoSingleString(T *line, const float *const datainL, const float *const datainR, + float *dataoutL, float *dataoutR, float pitch) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -446,8 +446,8 @@ template struct StringResonator : core::VoiceEffectTemplate } template - void monoDualString(const std::array &lines, float *datainL, float *dataoutL, - float pitch) + void monoDualString(const std::array &lines, const float *const datainL, + float *dataoutL, float pitch) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -529,7 +529,7 @@ template struct StringResonator : core::VoiceEffectTemplate } template - void monoSingleString(T *line, float *datainL, float *dataoutL, float pitch) + void monoSingleString(T *line, const float *const datainL, float *dataoutL, float pitch) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -660,8 +660,8 @@ template struct StringResonator : core::VoiceEffectTemplate return 0; } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { if (this->getIntParam(ipDualString == true)) { @@ -694,12 +694,13 @@ template struct StringResonator : core::VoiceEffectTemplate } } - void processMonoToStereo(float *datainL, float *dataoutL, float *dataoutR, float pitch) + void processMonoToStereo(const float *const datainL, float *dataoutL, float *dataoutR, + float pitch) { processStereo(datainL, datainL, dataoutL, dataoutR, pitch); } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { if (this->getIntParam(ipDualString == true)) { diff --git a/include/sst/voice-effects/delay/Widener.h b/include/sst/voice-effects/delay/Widener.h index 0502e44..9c978a5 100644 --- a/include/sst/voice-effects/delay/Widener.h +++ b/include/sst/voice-effects/delay/Widener.h @@ -118,8 +118,8 @@ template struct Widener : core::VoiceEffectTemplateBaseinitToParamMetadataDefault(this); } template - void processOntoLine(Line *line, float *datainL, float *datainR, float *dataoutL, - float *dataoutR, float pitch) + void processOntoLine(Line *line, const float *const datainL, const float *const datainR, + float *dataoutL, float *dataoutR, float pitch) { namespace mech = sst::basic_blocks::mechanics; namespace sdsp = sst::basic_blocks::dsp; @@ -154,8 +154,8 @@ template struct Widener : core::VoiceEffectTemplateBase(mid, side, dataoutL, dataoutR); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { if (isShort) { diff --git a/include/sst/voice-effects/distortion/BitCrusher.h b/include/sst/voice-effects/distortion/BitCrusher.h index d8a259f..74b1602 100644 --- a/include/sst/voice-effects/distortion/BitCrusher.h +++ b/include/sst/voice-effects/distortion/BitCrusher.h @@ -117,8 +117,8 @@ template struct BitCrusher : core::VoiceEffectTemplateBase< void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { bool filterSwitch = this->getIntParam(ipFilterSwitch); int filtMode = this->getIntParam(ipFilterMode); diff --git a/include/sst/voice-effects/distortion/Slewer.h b/include/sst/voice-effects/distortion/Slewer.h index ac73231..81965e5 100644 --- a/include/sst/voice-effects/distortion/Slewer.h +++ b/include/sst/voice-effects/distortion/Slewer.h @@ -117,8 +117,8 @@ template struct Slewer : core::VoiceEffectTemplateBase struct Slewer : core::VoiceEffectTemplateBase struct TreeMonster : core::VoiceEffectTemplateBase void initVoiceEffect() { coreProc.initialize(); } void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { coreProc.processWithoutMixOrWith(datainL, datainR, dataoutL, dataoutR); } diff --git a/include/sst/voice-effects/dynamics/AutoWah.h b/include/sst/voice-effects/dynamics/AutoWah.h index 326b208..dc97fdc 100644 --- a/include/sst/voice-effects/dynamics/AutoWah.h +++ b/include/sst/voice-effects/dynamics/AutoWah.h @@ -147,8 +147,8 @@ template struct AutoWah : core::VoiceEffectTemplateBasegetFloatParam(fpSens); sens *= sens; diff --git a/include/sst/voice-effects/dynamics/Compressor.h b/include/sst/voice-effects/dynamics/Compressor.h index 35e28c1..df538f1 100644 --- a/include/sst/voice-effects/dynamics/Compressor.h +++ b/include/sst/voice-effects/dynamics/Compressor.h @@ -215,8 +215,8 @@ template struct Compressor : core::VoiceEffectTemplateBase< return z; } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { auto makeup = decibelsToAmplitude(this->getFloatParam(fpMakeUp)); gainLerp.set_target(makeup); @@ -271,7 +271,7 @@ template struct Compressor : core::VoiceEffectTemplateBase< gainLerp.multiply_2_blocks(dataoutL, dataoutR); } - void processMonoToMono(float *datain, float *dataout, float pitch) + void processMonoToMono(const float *const datain, float *dataout, float pitch) { auto makeup = decibelsToAmplitude(this->getFloatParam(fpMakeUp)); gainLerp.set_target(makeup); diff --git a/include/sst/voice-effects/eq/EqGraphic6Band.h b/include/sst/voice-effects/eq/EqGraphic6Band.h index 28954f3..4f9130c 100644 --- a/include/sst/voice-effects/eq/EqGraphic6Band.h +++ b/include/sst/voice-effects/eq/EqGraphic6Band.h @@ -66,12 +66,12 @@ template struct EqGraphic6Band : core::VoiceEffectTemplateB void initVoiceEffect() {} void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { calc_coeffs(); - float *inL = datainL; - float *inR = datainR; + auto *inL = datainL; + auto *inR = datainR; for (int i = 0; i < nBands; ++i) { mParametric[i].process_block_to(inL, inR, dataoutL, dataoutR); @@ -80,10 +80,10 @@ template struct EqGraphic6Band : core::VoiceEffectTemplateB } } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { calc_coeffs(); - float *inL = datainL; + auto *inL = datainL; for (int i = 0; i < nBands; ++i) { mParametric[i].process_block_to(inL, dataoutL); diff --git a/include/sst/voice-effects/eq/EqNBandParametric.h b/include/sst/voice-effects/eq/EqNBandParametric.h index aa4c709..56710fa 100644 --- a/include/sst/voice-effects/eq/EqNBandParametric.h +++ b/include/sst/voice-effects/eq/EqNBandParametric.h @@ -99,12 +99,12 @@ struct EqNBandParametric : core::VoiceEffectTemplateBase void initVoiceEffect() {} void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { calc_coeffs(); - float *inL = datainL; - float *inR = datainR; + auto *inL = datainL; + auto *inR = datainR; for (int i = 0; i < NBands; ++i) { mParametric[i].process_block_to(inL, inR, dataoutL, dataoutR); @@ -113,10 +113,10 @@ struct EqNBandParametric : core::VoiceEffectTemplateBase } } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { calc_coeffs(); - float *inL = datainL; + auto *inL = datainL; for (int i = 0; i < NBands; ++i) { mParametric[i].process_block_to(inL, dataoutL); diff --git a/include/sst/voice-effects/eq/MorphEQ.h b/include/sst/voice-effects/eq/MorphEQ.h index 7478396..b579382 100644 --- a/include/sst/voice-effects/eq/MorphEQ.h +++ b/include/sst/voice-effects/eq/MorphEQ.h @@ -292,8 +292,8 @@ template struct MorphEQ : core::VoiceEffectTemplateBaseinitToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { calc_coeffs(); gain.multiply_2_blocks_to(datainL, datainR, dataoutL, dataoutR); @@ -311,7 +311,7 @@ template struct MorphEQ : core::VoiceEffectTemplateBase struct TiltEQ : core::VoiceEffectTemplateBase(datainL, datainR, dataoutL, @@ -107,7 +107,7 @@ template struct TiltEQ : core::VoiceEffectTemplateBase(datainL, dataoutL); diff --git a/include/sst/voice-effects/filter/CytomicSVF.h b/include/sst/voice-effects/filter/CytomicSVF.h index 9680bd5..80b92e0 100644 --- a/include/sst/voice-effects/filter/CytomicSVF.h +++ b/include/sst/voice-effects/filter/CytomicSVF.h @@ -240,8 +240,8 @@ template struct CytomicSVF : core::VoiceEffectTemplateBase< } } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { calc_coeffs(pitch); cySvf[0].template processBlock(datainL, datainR, dataoutL, dataoutR); @@ -252,7 +252,7 @@ template struct CytomicSVF : core::VoiceEffectTemplateBase< } } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { calc_coeffs(pitch); cySvf[0].template processBlock(datainL, dataoutL); @@ -262,7 +262,8 @@ template struct CytomicSVF : core::VoiceEffectTemplateBase< } } - void processMonoToStereo(float *datainL, float *dataoutL, float *dataoutR, float pitch) + void processMonoToStereo(const float *const datainL, float *dataoutL, float *dataoutR, + float pitch) { calc_coeffs(pitch); cySvf[0].template processBlock(datainL, datainL, dataoutL, dataoutR); diff --git a/include/sst/voice-effects/filter/SSTFilters.h b/include/sst/voice-effects/filter/SSTFilters.h index ef41335..32e2d64 100644 --- a/include/sst/voice-effects/filter/SSTFilters.h +++ b/include/sst/voice-effects/filter/SSTFilters.h @@ -238,8 +238,8 @@ template struct SSTFilters : core::VoiceEffectTemplateBase< mLastParam = param; } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { updateCoefficients(pitch, true); if (filterUnitPtr) @@ -266,7 +266,7 @@ template struct SSTFilters : core::VoiceEffectTemplateBase< } } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { updateCoefficients(pitch, false); diff --git a/include/sst/voice-effects/filter/StaticPhaser.h b/include/sst/voice-effects/filter/StaticPhaser.h index 72b6249..29e5f70 100644 --- a/include/sst/voice-effects/filter/StaticPhaser.h +++ b/include/sst/voice-effects/filter/StaticPhaser.h @@ -153,8 +153,8 @@ template struct StaticPhaser : core::VoiceEffectTemplateBas } void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { namespace mech = sst::basic_blocks::mechanics; @@ -182,12 +182,13 @@ template struct StaticPhaser : core::VoiceEffectTemplateBas } } - void processMonoToStereo(float *datainL, float *dataoutL, float *dataoutR, float pitch) + void processMonoToStereo(const float *const datainL, float *dataoutL, float *dataoutR, + float pitch) { processStereo(datainL, datainL, dataoutL, dataoutR, pitch); } - void processMonoToMono(float *dataIn, float *dataOut, float pitch) + void processMonoToMono(const float *const dataIn, float *dataOut, float pitch) { namespace mech = sst::basic_blocks::mechanics; diff --git a/include/sst/voice-effects/generator/GenCorrelatedNoise.h b/include/sst/voice-effects/generator/GenCorrelatedNoise.h index ba8afd0..00085cc 100644 --- a/include/sst/voice-effects/generator/GenCorrelatedNoise.h +++ b/include/sst/voice-effects/generator/GenCorrelatedNoise.h @@ -119,8 +119,8 @@ template struct GenCorrelatedNoise : core::VoiceEffectTempl rightOut = midIn - sideIn; } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { auto isStereo = this->getIntParam(ipStereo) != 0; if (!isStereo) @@ -162,7 +162,7 @@ template struct GenCorrelatedNoise : core::VoiceEffectTempl mLevelLerp.multiply_2_blocks(dataoutL, dataoutR); } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { auto levT = std::clamp(this->getFloatParam(fpLevel), 0.f, 1.f); levT = levT * levT * levT; @@ -184,7 +184,8 @@ template struct GenCorrelatedNoise : core::VoiceEffectTempl mLevelLerp.multiply_block(dataoutL); } - void processMonoToStereo(float *datainL, float *dataoutL, float *dataoutR, float pitch) + void processMonoToStereo(const float *const datainL, float *dataoutL, float *dataoutR, + float pitch) { processStereo(datainL, datainL, dataoutL, dataoutR, pitch); } diff --git a/include/sst/voice-effects/generator/GenVA.h b/include/sst/voice-effects/generator/GenVA.h index e13c18f..c730734 100644 --- a/include/sst/voice-effects/generator/GenVA.h +++ b/include/sst/voice-effects/generator/GenVA.h @@ -149,7 +149,7 @@ template struct GenVA : core::VoiceEffectTemplateBaseinitToParamMetadataDefault(this); } - void processSine(float *datainL, float *dataoutL, float pitch) + void processSine(const float *const datainL, float *dataoutL, float pitch) { if (keytrackOn) { @@ -175,7 +175,7 @@ template struct GenVA : core::VoiceEffectTemplateBasegetFloatParam(fpOffset); auto lp = this->getFloatParam(fpLowpass); @@ -206,7 +206,7 @@ template struct GenVA : core::VoiceEffectTemplateBasegetFloatParam(fpOffset)); mWidthLerp.newValue(this->getFloatParam(fpWidth)); @@ -258,7 +258,7 @@ template struct GenVA : core::VoiceEffectTemplateBasegetIntParam(ipWaveform); if (wave == 0) @@ -275,8 +275,8 @@ template struct GenVA : core::VoiceEffectTemplateBase struct TiltNoise : core::VoiceEffectTemplateBasegetIntParam(ipStereo); @@ -193,7 +193,7 @@ template struct TiltNoise : core::VoiceEffectTemplateBasegetFloatParam(fpLevel); level = level * level * level; @@ -223,7 +223,8 @@ template struct TiltNoise : core::VoiceEffectTemplateBase struct LiftedDelay : core::VoiceEffectTemplateBase // return helper.busFX->getRingoutDecay() * VFXConfig::blockSize; } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { setupValues(); mech::copy_from_to(datainL, dataoutL); diff --git a/include/sst/voice-effects/lifted_bus_effects/LiftedFlanger.h b/include/sst/voice-effects/lifted_bus_effects/LiftedFlanger.h index 4b477f0..5ac6570 100644 --- a/include/sst/voice-effects/lifted_bus_effects/LiftedFlanger.h +++ b/include/sst/voice-effects/lifted_bus_effects/LiftedFlanger.h @@ -78,8 +78,8 @@ template struct LiftedFlanger : core::VoiceEffectTemplateBa helper.valuesForFX[flanger_t::fl_width] = helper.busFX->getDefaultWidth(); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { setupValues(); mech::copy_from_to(datainL, dataoutL); diff --git a/include/sst/voice-effects/lifted_bus_effects/LiftedReverb1.h b/include/sst/voice-effects/lifted_bus_effects/LiftedReverb1.h index a47b264..f958bb6 100644 --- a/include/sst/voice-effects/lifted_bus_effects/LiftedReverb1.h +++ b/include/sst/voice-effects/lifted_bus_effects/LiftedReverb1.h @@ -78,8 +78,8 @@ template struct LiftedReverb1 : core::VoiceEffectTemplateBa helper.valuesForFX[reverb1_t::rev1_mix] = 1.0; helper.valuesForFX[reverb1_t::rev1_width] = helper.busFX->getDefaultWidth(); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { setupValues(); mech::copy_from_to(datainL, dataoutL); diff --git a/include/sst/voice-effects/lifted_bus_effects/LiftedReverb2.h b/include/sst/voice-effects/lifted_bus_effects/LiftedReverb2.h index c83a109..826a353 100644 --- a/include/sst/voice-effects/lifted_bus_effects/LiftedReverb2.h +++ b/include/sst/voice-effects/lifted_bus_effects/LiftedReverb2.h @@ -65,8 +65,8 @@ template struct LiftedReverb2 : core::VoiceEffectTemplateBa helper.valuesForFX[reverb2_t::rev2_width] = helper.busFX->getDefaultWidth(); helper.valuesForFX[reverb2_t::rev2_mix] = 1.f; } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { setupValues(); mech::copy_from_to(datainL, dataoutL); diff --git a/include/sst/voice-effects/modulation/FMFilter.h b/include/sst/voice-effects/modulation/FMFilter.h index bf9d3d3..a381d5c 100644 --- a/include/sst/voice-effects/modulation/FMFilter.h +++ b/include/sst/voice-effects/modulation/FMFilter.h @@ -169,8 +169,8 @@ template struct FMFilter : core::VoiceEffectTemplateBase struct FMFilter : core::VoiceEffectTemplateBase struct FMFilter : core::VoiceEffectTemplateBase struct FreqShiftMod : core::VoiceEffectTemplateBas } void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { auto rate = this->getFloatParam((int)FreqShiftModFloatParams::coarse) + this->getFloatParam((int)FreqShiftModFloatParams::fine); diff --git a/include/sst/voice-effects/modulation/NoiseAM.h b/include/sst/voice-effects/modulation/NoiseAM.h index fed785d..1b3583c 100644 --- a/include/sst/voice-effects/modulation/NoiseAM.h +++ b/include/sst/voice-effects/modulation/NoiseAM.h @@ -192,8 +192,8 @@ template struct NoiseAM : core::VoiceEffectTemplateBasegetIntParam(ipStereo); float threshold = this->getFloatParam(fpThreshold); @@ -270,7 +270,7 @@ template struct NoiseAM : core::VoiceEffectTemplateBasegetFloatParam(fpThreshold); auto depth = this->getFloatParam(fpDepth); @@ -317,7 +317,8 @@ template struct NoiseAM : core::VoiceEffectTemplateBase struct PhaseMod : core::VoiceEffectTemplateBase struct PhaseMod : core::VoiceEffectTemplateBase struct Phaser : core::VoiceEffectTemplateBasegetFloatParam(fpRate); auto lfoDepth = this->getFloatParam(fpDepth); @@ -226,12 +226,13 @@ template struct Phaser : core::VoiceEffectTemplateBasegetFloatParam(fpRate); auto lfoDepth = this->getFloatParam(fpDepth); diff --git a/include/sst/voice-effects/modulation/RingMod.h b/include/sst/voice-effects/modulation/RingMod.h index fdedafe..135e4fa 100644 --- a/include/sst/voice-effects/modulation/RingMod.h +++ b/include/sst/voice-effects/modulation/RingMod.h @@ -111,8 +111,8 @@ template struct RingMod : core::VoiceEffectTemplateBase struct RingMod : core::VoiceEffectTemplateBasegetFloatParam(fpCarrierFrequency) + (keytrackOn ? pitch : 0); diff --git a/include/sst/voice-effects/modulation/ShepardPhaser.h b/include/sst/voice-effects/modulation/ShepardPhaser.h index c0bc14b..0bcdaac 100644 --- a/include/sst/voice-effects/modulation/ShepardPhaser.h +++ b/include/sst/voice-effects/modulation/ShepardPhaser.h @@ -124,8 +124,8 @@ template struct ShepardPhaser : core::VoiceEffectTemplateBa return res * .5 + .5; } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { auto stereo = this->getIntParam(ipStereo); auto range = std::clamp(this->getFloatParam(fpEndFreq), -60.f, 70.f) - @@ -256,7 +256,7 @@ template struct ShepardPhaser : core::VoiceEffectTemplateBa } } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { auto range = std::clamp(this->getFloatParam(fpEndFreq), -60.f, 70.f) - std::clamp(this->getFloatParam(fpStartFreq), -60.f, 70.f); @@ -320,7 +320,8 @@ template struct ShepardPhaser : core::VoiceEffectTemplateBa } } - void processMonoToStereo(float *datainL, float *dataoutL, float *dataoutR, float pitch) + void processMonoToStereo(const float *const datainL, float *dataoutL, float *dataoutR, + float pitch) { processStereo(datainL, datainL, dataoutL, dataoutR, pitch); } diff --git a/include/sst/voice-effects/modulation/Tremolo.h b/include/sst/voice-effects/modulation/Tremolo.h index c64fbc1..aa5f1df 100644 --- a/include/sst/voice-effects/modulation/Tremolo.h +++ b/include/sst/voice-effects/modulation/Tremolo.h @@ -185,8 +185,8 @@ template struct Tremolo : core::VoiceEffectTemplateBasegetFloatParam(fpRate); @@ -304,8 +304,8 @@ template struct Tremolo : core::VoiceEffectTemplateBasegetFloatParam(fpRate); auto lfoDepth = this->getFloatParam(fpDepth); @@ -349,7 +349,7 @@ template struct Tremolo : core::VoiceEffectTemplateBasegetFloatParam(fpRate); auto lfoDepth = this->getFloatParam(fpDepth); @@ -414,7 +414,7 @@ template struct Tremolo : core::VoiceEffectTemplateBase(LP, HP, dataout); } - void standardMono(float *datain, float *dataout, float pitch) + void standardMono(const float *const datain, float *dataout, float pitch) { auto lfoRate = this->getFloatParam(fpRate); auto lfoDepth = this->getFloatParam(fpDepth); @@ -451,8 +451,8 @@ template struct Tremolo : core::VoiceEffectTemplateBasegetIntParam(ipHarmonic) == true) { @@ -468,7 +468,7 @@ template struct Tremolo : core::VoiceEffectTemplateBasegetIntParam(ipHarmonic) == true) { @@ -483,7 +483,8 @@ template struct Tremolo : core::VoiceEffectTemplateBase struct GainMatrix : core::VoiceEffectTemplateBase< void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { llLerp.set_target(this->getFloatParam(fpLeftToLeft)); diff --git a/include/sst/voice-effects/utilities/StereoTool.h b/include/sst/voice-effects/utilities/StereoTool.h index 7680feb..00081d2 100644 --- a/include/sst/voice-effects/utilities/StereoTool.h +++ b/include/sst/voice-effects/utilities/StereoTool.h @@ -76,8 +76,8 @@ template struct StereoTool : core::VoiceEffectTemplateBase< void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { rotLerp.set_target(this->getFloatParam(fpRotation)); diff --git a/include/sst/voice-effects/utilities/VolumeAndPan.h b/include/sst/voice-effects/utilities/VolumeAndPan.h index 6199328..19f3d4d 100644 --- a/include/sst/voice-effects/utilities/VolumeAndPan.h +++ b/include/sst/voice-effects/utilities/VolumeAndPan.h @@ -82,8 +82,8 @@ template struct VolumeAndPan : core::VoiceEffectTemplateBas void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { auto pan = (this->getFloatParam(fpPan) + 1) / 2; basic_blocks::dsp::pan_laws::panmatrix_t pmat{1, 1, 0, 0}; diff --git a/include/sst/voice-effects/waveshaper/WaveShaper.h b/include/sst/voice-effects/waveshaper/WaveShaper.h index a0934be..f624bc0 100644 --- a/include/sst/voice-effects/waveshaper/WaveShaper.h +++ b/include/sst/voice-effects/waveshaper/WaveShaper.h @@ -135,7 +135,8 @@ template struct WaveShaper : core::VoiceEffectTemplateBase< void initVoiceEffectParams() { this->initToParamMetadataDefault(this); } template - void processInternal(float *datainL, float *datainR, float *dataoutL, float *dataoutR) + void processInternal(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR) { // Todo: Smooth auto drv = this->dbToLinear(this->getFloatParam((int)WaveShaperFloatParams::drive)); @@ -211,8 +212,8 @@ template struct WaveShaper : core::VoiceEffectTemplateBase< } } - void processStereo(float *datainL, float *datainR, float *dataoutL, float *dataoutR, - float pitch) + void processStereo(const float *const datainL, const float *const datainR, float *dataoutL, + float *dataoutR, float pitch) { bool hpActive = !this->getIsDeactivated((int)WaveShaperFloatParams::highpass); bool lpActive = !this->getIsDeactivated((int)WaveShaperFloatParams::lowpass); @@ -249,7 +250,7 @@ template struct WaveShaper : core::VoiceEffectTemplateBase< } } - void processMonoToMono(float *datainL, float *dataoutL, float pitch) + void processMonoToMono(const float *const datainL, float *dataoutL, float pitch) { bool hpActive = !this->getIsDeactivated((int)WaveShaperFloatParams::highpass); bool lpActive = !this->getIsDeactivated((int)WaveShaperFloatParams::lowpass);