diff --git a/lib/grit/eurorack/hades.cpp b/lib/grit/eurorack/hades.cpp index 1d7911f..3047f06 100644 --- a/lib/grit/eurorack/hades.cpp +++ b/lib/grit/eurorack/hades.cpp @@ -91,11 +91,11 @@ auto Hades::Amp::prepare(float sampleRate) -> void auto Hades::Amp::operator()(float sample) -> float { switch (_index) { - // case TanhIndex: return _tanh(sample); - // case HardIndex: return _hard(sample); - // case FullWaveIndex: return _fullWave(sample); - // case HalfWaveIndex: return _halfWave(sample); - // case DiodeIndex: return _diode(sample); + case TanhIndex: return _tanh(sample); + case HardIndex: return _hard(sample); + case FullWaveIndex: return _fullWave(sample); + case HalfWaveIndex: return _halfWave(sample); + case DiodeIndex: return _diode(sample); case FireAmpIndex: return _fireAmp(sample); case GrindAmpIndex: return _grindAmp(sample); default: break; diff --git a/lib/grit/eurorack/hades.hpp b/lib/grit/eurorack/hades.hpp index 54a625f..54af576 100644 --- a/lib/grit/eurorack/hades.hpp +++ b/lib/grit/eurorack/hades.hpp @@ -70,22 +70,22 @@ struct Hades private: enum Index : int { - // TanhIndex = 0, - // HardIndex, - // FullWaveIndex, - // HalfWaveIndex, - // DiodeIndex, + TanhIndex = 0, + HardIndex, + FullWaveIndex, + HalfWaveIndex, + DiodeIndex, FireAmpIndex, GrindAmpIndex, MaxIndex, }; - Index _index{FireAmpIndex}; - // TanhClipper _tanh{}; - // HardClipper _hard{}; - // FullWaveRectifier _fullWave{}; - // HalfWaveRectifier _halfWave{}; - // DiodeRectifier _diode{}; + Index _index{TanhIndex}; + TanhClipper _tanh{}; + HardClipper _hard{}; + FullWaveRectifier _fullWave{}; + HalfWaveRectifier _halfWave{}; + DiodeRectifier _diode{}; AirWindowsFireAmp _fireAmp{}; AirWindowsGrindAmp _grindAmp{}; }; diff --git a/lib/grit/eurorack/hades_test.cpp b/lib/grit/eurorack/hades_test.cpp index b1120f9..2513265 100644 --- a/lib/grit/eurorack/hades_test.cpp +++ b/lib/grit/eurorack/hades_test.cpp @@ -71,4 +71,13 @@ TEST_CASE("grit/audio/eurorack: Hades") REQUIRE(etl::isfinite(block(1, i))); } } + + for (auto i{0}; i < 128; ++i) { + hades.nextDistortionAlgorithm(); + [[maybe_unused]] auto const cv = hades.process(block, {}); + for (auto i{0}; i < blockSize; ++i) { + REQUIRE(etl::isfinite(block(0, i))); + REQUIRE(etl::isfinite(block(1, i))); + } + } }