From cef0957d6e247a53ba37c5c940e6ef95a2f57897 Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Tue, 23 Dec 2025 23:36:58 +0000 Subject: [PATCH] lfo fix, chorus fix --- plugin/chorus.cpp | 1 + plugin/module.cpp | 2 +- plugin/module.hpp | 26 +++++++++++++------------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/plugin/chorus.cpp b/plugin/chorus.cpp index a20ac21..d6a8431 100644 --- a/plugin/chorus.cpp +++ b/plugin/chorus.cpp @@ -147,6 +147,7 @@ void Chorus::setChorus(uint8_t mode) { // switch chorus mode switch (mode) { case 0x60: + case 0x20: gain = 0; break; case 0x40: diff --git a/plugin/module.cpp b/plugin/module.cpp index 98aecd9..4e1c1d0 100644 --- a/plugin/module.cpp +++ b/plugin/module.cpp @@ -89,7 +89,7 @@ void Module::run(Voice* voices, uint32_t blockSize) { int16_t vcf = (patchRam.vcfEnv << 7) * ((patchRam.switch2 & 0x02) ? -1 : 1); int16_t pitchBase = 0x1818; - pitchBase += (lfo * lfoDepthTable[patchRam.vcoLfo]) >> 9; + pitchBase += (lfo * lfoDepthTable[patchRam.vcoLfo]) >> 11; for (uint32_t i = 0; i < NUM_VOICES; i++) { // maybe move all this into voice.cpp FIXME diff --git a/plugin/module.hpp b/plugin/module.hpp index 5fc696b..70cbc8a 100644 --- a/plugin/module.hpp +++ b/plugin/module.hpp @@ -48,23 +48,23 @@ class Module { struct { - uint8_t lfoRate = 0x18; + uint8_t lfoRate = 0x58; uint8_t lfoDelay = 0x00; uint8_t vcoLfo = 0x00; - uint8_t pwmLfo = 0x60; + uint8_t pwmLfo = 0x3b; uint8_t noise = 0x00; - uint8_t vcfFreq = 0x30; // 1c; // 0x3f80 - uint8_t vcfReso = 0x00; - uint8_t vcfEnv = 0x40; // 4e; - uint8_t vcfLfo = 0; - uint8_t vcfKey = 0x7f; // 47; - uint8_t vca = 0x28; + uint8_t vcfFreq = 0x25; // 1c; // 0x3f80 + uint8_t vcfReso = 0x6a; + uint8_t vcfEnv = 0x25; // 4e; + uint8_t vcfLfo = 0x00; + uint8_t vcfKey = 0x00; // 47; + uint8_t vca = 0x35; uint8_t env_a = 0x00; - uint8_t env_d = 0x39; - uint8_t env_s = 0x30; // 0x3f80 - uint8_t env_r = 0x30; - uint8_t sub = 0x40; - uint8_t switch1 = 0x59; + uint8_t env_d = 0x3c; + uint8_t env_s = 0x00; // 0x3f80 + uint8_t env_r = 0x3c; + uint8_t sub = 0x7f; + uint8_t switch1 = 0x4a; uint8_t switch2 = 0x18; /*