From e6ca9c7ed8b9af193333be793983df5e48cb961a Mon Sep 17 00:00:00 2001 From: sigil-03 Date: Tue, 28 Oct 2025 18:58:08 -0600 Subject: [PATCH] cursed fix to element count (hardcode my behated) --- src/synthesizer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/synthesizer.rs b/src/synthesizer.rs index 265c903..dc1594b 100644 --- a/src/synthesizer.rs +++ b/src/synthesizer.rs @@ -39,7 +39,8 @@ impl SimpleWavetableSynthesizer { pub fn set_freq(&mut self, freq_hz: usize) { self.output_freq_hz = freq_hz; // probably a better way to do this with modulos or something... - self.clock_per_sample = self.clock_freq_hz / self.output_freq_hz / self.wavetable.size(); + // FIXME: use the length of the square table.. or whatever wavetable tbh + self.clock_per_sample = self.clock_freq_hz / self.output_freq_hz / 2; } pub fn tick(&mut self) {