docs+test(amps): Modern High-Gain re-review nits
- Note the sagGainFloor 0.15 rationale (~-16 dB, deepest droop before gating). - Rename the sag test's metric to dotProduct (it's an unnormalized sign check). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -76,9 +76,10 @@ struct ModernHighGainAmpPedalTests {
|
||||
guard stiff.count >= skip + window, saggy.count >= skip + window else {
|
||||
Issue.record("render too short"); return
|
||||
}
|
||||
let corr: Double = zip(stiff[skip..<(skip + window)], saggy[skip..<(skip + window)])
|
||||
// Unnormalized dot product — its sign is what matters: negative ⇒ phase-inverted copy.
|
||||
let dotProduct: Double = zip(stiff[skip..<(skip + window)], saggy[skip..<(skip + window)])
|
||||
.reduce(0.0) { acc, pair in acc + Double(pair.0) * Double(pair.1) }
|
||||
#expect(corr > 0, "sag phase-inverted the signal (correlation \(corr) < 0)")
|
||||
#expect(dotProduct > 0, "sag phase-inverted the signal (dot product \(dotProduct) < 0)")
|
||||
}
|
||||
|
||||
@Test func tightSwitchChangesOutput() throws {
|
||||
|
||||
Reference in New Issue
Block a user