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:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user