This commit is contained in:
Gordon JC Pearce 2025-08-22 22:57:11 +01:00
parent 5cda4f0132
commit e1be8eb404
1 changed files with 2 additions and 0 deletions

View File

@ -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