From b0d06aa6e57b4b064b2b9949e284f28928329b4e Mon Sep 17 00:00:00 2001 From: Anachronaut Date: Sat, 29 Aug 2026 20:59:01 -0400 Subject: [PATCH] Make the vendored synth plain ASCII soundThing's comments use em dashes and an arrow, and this repository is plain ASCII throughout because the tooling around it does not do Unicode. Tests/docs.sh caught it the first time it ran against the new file, which is what that check is for. Comments only; nothing the compiler sees has changed. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW --- Source/Emulator/synth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Emulator/synth.c b/Source/Emulator/synth.c index f5485da..77e87df 100644 --- a/Source/Emulator/synth.c +++ b/Source/Emulator/synth.c @@ -215,9 +215,9 @@ float filterTick(Filter *f, float input, float cutoff, float resonance, float sa if (resonance < 0.0f) resonance = 0.0f; if (resonance > 0.99f) resonance = 0.99f; - // Andy Simper TPT SVF (bilinear integration — unconditionally stable) + // Andy Simper TPT SVF (bilinear integration - unconditionally stable) float g = tanf((float)M_PI * cutoff / sampleRate); - float Q = 0.5f + resonance * 9.5f; // resonance 0..0.99 → Q 0.5..10.0 + float Q = 0.5f + resonance * 9.5f; // resonance 0..0.99 -> Q 0.5..10.0 float k = 1.0f / Q; float a1 = 1.0f / (1.0f + g * (g + k)); float a2 = g * a1; @@ -259,7 +259,7 @@ const char *filterTypeName(FilterType t) // o->phase += freq / sampleRate; // if (o->phase >= 1.0f) o->phase -= 1.0f; // -// // Clocked noise — draw a new random value once per cycle +// // Clocked noise - draw a new random value once per cycle // if (o->waveform == WAVE_NOISE) { // o->noisePhase += freq / sampleRate; // if (o->noisePhase >= 1.0f) { @@ -281,7 +281,7 @@ float oscillatorTick(Oscillator *o, float freqHz, float bendMultiplier, float sa o->phase += freq / sampleRate; if (o->phase >= 1.0f) o->phase -= 1.0f; - // Clocked noise — draw a new random value once per cycle + // Clocked noise - draw a new random value once per cycle if (o->waveform == WAVE_NOISE) { o->noisePhase += freq / sampleRate; if (o->noisePhase >= 1.0f) { @@ -576,7 +576,7 @@ void synthSyncVoices(Synth *s) s->voices[v].filter.resModDepth = s->voices[0].filter.resModDepth; // Sync envelope settings but NOT runtime state - // Each voice needs its own stage, value — just copy the parameters + // Each voice needs its own stage, value - just copy the parameters s->voices[v].ampEnv.attackSec = s->voices[0].ampEnv.attackSec; s->voices[v].ampEnv.decaySec = s->voices[0].ampEnv.decaySec; s->voices[v].ampEnv.sustainLevel = s->voices[0].ampEnv.sustainLevel;