From 202ddac184febe971aa8445da2fabc389df1d64c Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Sat, 19 Oct 2024 00:19:35 +0100 Subject: [PATCH] noise gen --- plugin/ic29.cpp | 8 +++++++- plugin/ic29.hpp | 6 +++++- plugin/oscillator.cpp | 5 +++-- plugin/peacock.cpp | 3 ++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/plugin/ic29.cpp b/plugin/ic29.cpp index 5ab2cfe..978aecb 100644 --- a/plugin/ic29.cpp +++ b/plugin/ic29.cpp @@ -25,6 +25,7 @@ Synth ic29; Synth::Synth() { d_debug("initialising synth\n"); portaCoeff = 0x0; + noise = new float [4096]; } void Synth::buildTables(double sampleRate) { @@ -57,9 +58,14 @@ void Synth::run() { // 0 sets EA to 0x3fff, 1 adds uint16_t pwmVal = 0x2000 - ic29.lfo.lfoOut; if (ic29.patchRam.switch2 & 0x01) pwmVal = 0x3fff; - ic29.pwm = 0.5 - pwmVal / 32768.0f * (ic29.patchRam.pwmLfoMod / 106.0f); + // generate the voices, then + for (uint32_t i=0; i