From e1be8eb4047ad8a60aa9106ffa7793fa35c42f76 Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Fri, 22 Aug 2025 22:57:11 +0100 Subject: [PATCH] stops --- plugin/generator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/generator.cpp b/plugin/generator.cpp index cf1fb6d..6823665 100644 --- a/plugin/generator.cpp +++ b/plugin/generator.cpp @@ -70,8 +70,10 @@ void Generator::run(float *output, uint32_t frames) { for (k = 0; k < NUM_VOICES; k++) { v = &voices[k]; + // you'd loop over all the stops in the register here // 8' stop d = (phase[v->semi] >> (24 - v->oct)) & 0xff; + // convert to a sine and scale it by 0.25, which would want to be your drawbar amount output[i] += .25 * (sine[d] * v->gate); // mutation stops are a fifth up