From f0400b13dbb21b5b2e6f51b97c3519e262e64af5 Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Mon, 9 Sep 2024 14:13:18 +0100 Subject: [PATCH] better tuning, corrected range switching --- plugin/chassis.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/chassis.cpp b/plugin/chassis.cpp index 92a5735..1425df8 100644 --- a/plugin/chassis.cpp +++ b/plugin/chassis.cpp @@ -40,7 +40,7 @@ void Chassis::activate() { printf("called activate()\n"); for (uint8_t i = 0; i < 104; i++) { - s.pitchCV[i] = (261.63 * powf(2, (i - 24) / 12.0f)) / sampleRate; + s.pitchCV[i] = (440.0f * powf(2, (i - 49) / 12.0f)) / sampleRate; } } @@ -132,12 +132,12 @@ void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEv for (uint32_t i = 0; i < NUM_VOICES; i++) { s.voice[i].calcPitch(s); - switch (s.patchRam.switch1 & 0x03) { + switch (s.patchRam.switch1 & 0x07) { case 1: - s.voice[i].omega /= 4; - break; - case 2: s.voice[i].omega /= 2; + break; + case 4: + s.voice[i].omega *= 2; default: break; }