Commit Graph
5 Commits
Author SHA1 Message Date
gurix eb36587ccf feat(09-01): add Group field to FreqConfig and rebalance ClassFreqConfigs
- Add Group string field to FreqConfig struct (GRP-04)
- Add frequency allocation table comment (32 slots, 65-2449 Hz, FREQ-03)
- Rebalance all 14 ClassFreqConfigs entries to major-second ladder (FREQ-01)
- Infrastructure band (Triangle, 65-133 Hz): ICMP/NTP/DHCP/DNS
- Web band (Sawtooth, 150-169 Hz): HTTPS/HTTP
- Mail band (Triangle, 214 Hz): SMTP
- Remote Access band (Square, 343 Hz): SSH
- Unknown band (Custom, 771-1375 Hz): Unknown1-4, OtherTCP, OtherUDP
- Remove stale NumLayers and GainPerLayer constants (Phase 8 cleanup)
- Non-Unknown entries use WaveformPresetHarmonics; Unknown retain hand-tuned {1,1.0},{2,0.8},{3,0.4}
2026-03-27 14:18:12 +01:00
gurix fd17061b0d chore(08-01): remove stale NumLayers and GainPerLayer constants
- Delete NumLayers=14 (dead code; NewBank computes gain dynamically)
- Delete GainPerLayer=1.0/float64(NumLayers) (dead code per D-01)
- Remaining constants: SampleRate, WindowMs, SamplesPerWindow, WhisperFloor
2026-03-27 08:54:02 +01:00
gurix 82d1e37d0f feat(05-01): add WaveformType enum and WaveformPresetHarmonics function
- WaveformType int with five constants: WaveformCustom (0), WaveformSine,
  WaveformSquare, WaveformSawtooth, WaveformTriangle
- WaveformPresetHarmonics generates bandlimited harmonic series for each type
- WaveformCustom returns nil to preserve existing hand-tuned harmonics
- All generated harmonics are below Nyquist (sampleRate/2)
- FreqConfig gains WaveformType field (zero value = WaveformCustom)
- ClassFreqConfigs converted to named fields (required for new struct field)
- All existing synth tests continue to pass (38 tests total)
2026-03-26 17:34:02 +01:00
gurix ff3ec7eb78 feat(03-01): extend TrafficClass to 14 classes with hash-bucketed unknowns
- Replace ClassUnknown with ClassUnknown1-4 (unknown-1 through unknown-4)
- AllClasses() now returns 14 elements
- Add hashBucket() function routing unrecognized traffic deterministically
- Update synth/config.go: NumLayers=14, 4 dissonant unknown tone configs at 862-1047 Hz
- Add TestAllClassesCount and TestHashBucketDistribution tests
- Add TestClassFreqConfigsComplete and TestNumLayersMatchesAllClasses to config_test.go
- Update TestNewBankHas14Layers, TestMixerNoClip for 14 classes
- All classify and synth tests pass
2026-03-26 13:11:24 +01:00
gurix 1aaa15de0b feat(02-01): implement synth config, oscillator, and layer
- synth/config.go: FreqConfig, HarmonicDef types; ClassFreqConfigs for all 11 traffic classes
  with frequencies in 60-800 Hz using musical intervals; pan positions per D-12
- synth/oscillator.go: phase-accumulator oscillator with additive harmonic synthesis
  and phase subtraction wrap (not math.Mod) per D-05
- synth/layer.go: EMA amplitude smoothing with tau-based alpha; whisper floor (0.03)
  prevents silence once class has been seen; UpdateTarget/AdvanceSample interface
- All 12 tests pass (TestAllClassesHaveConfig, TestFrequenciesUnique, TestEMAAmplitudeRise, etc.)
2026-03-26 11:58:44 +01:00