From 8ae1ddc773b6640b0c1f969754def3807b885941 Mon Sep 17 00:00:00 2001 From: Markus Graf Date: Fri, 27 Mar 2026 14:08:03 +0100 Subject: [PATCH] feat(09-02): update autoAssignFreq range to [2500, 4000] Hz - Change baseHz from 1200.0 to 2500.0 - Change numSteps from uint32(24) to uint32(31) - Update function comment to reflect new range - Prevents collision with built-in frequencies (max 2449 Hz) --- config/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index a9734ae..bbccce0 100644 --- a/config/config.go +++ b/config/config.go @@ -205,15 +205,15 @@ func convertRules(raw []RawRule) []classify.Rule { return result } -// autoAssignFreq computes a deterministic frequency in [1200, 2350] Hz for a class name +// autoAssignFreq computes a deterministic frequency in [2500, 4000] Hz for a class name // using FNV-32a hashing. Same input always produces the same output. func autoAssignFreq(className string) float64 { h := fnv.New32a() h.Write([]byte(className)) const ( - baseHz = 1200.0 + baseHz = 2500.0 stepHz = 50.0 - numSteps = uint32(24) + numSteps = uint32(31) // [2500, 4000] Hz in 50 Hz steps ) return baseHz + float64(h.Sum32()%numSteps)*stepHz }