feat(05-02): decouple NewBank from global config and fix dynamic GainPerLayer

- NewBank now accepts (tau float64, cfgs map[classify.TrafficClass]FreqConfig)
- gainPerLayer field added to OscillatorBank, computed as 1.0/float64(len(cfgs))
- RenderWindow UpdateTarget loop iterates b.layers (not classify.AllClasses())
- RenderWindow render loop uses b.gainPerLayer (not GainPerLayer constant)
- encode/mp3.go updated to pass synth.ClassFreqConfigs as default config map
This commit is contained in:
2026-03-26 17:37:44 +01:00
parent 41e22788fc
commit 43307c31d5
2 changed files with 19 additions and 17 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ func RunSynthesis(snapshots []classify.WindowSnapshot, outputPath string) error
}
// Render all windows to stereo frames
bank := synth.NewBank(1.0) // tau=1.0s per D-07
bank := synth.NewBank(1.0, synth.ClassFreqConfigs) // tau=1.0s per D-07
var allFrames [][2]float64
for _, snap := range snapshots {
frames := bank.RenderWindow(snap)