From ea780f6595a868c6fd2d8cd89dba7dec61d6ecad Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:10:14 -0500 Subject: [PATCH] stripknob centralizes threshold, knob - stripcomp - stripgate - stripdenoiser prelim pester tests for potato pass --- lib/strip.ps1 | 57 +++++++++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/lib/strip.ps1 b/lib/strip.ps1 index cbbedef..9893fc5 100644 --- a/lib/strip.ps1 +++ b/lib/strip.ps1 @@ -75,65 +75,50 @@ class PhysicalStrip : Strip { } } -class StripComp : IRemote { +class StripKnob : IRemote { + StripKnob ([int]$index, [Object]$remote) : base ($index, $remote) { + AddFloatMembers -PARAMS @('threshold') + } + + hidden $_knob = $($this | Add-Member ScriptProperty 'knob' ` + { + [math]::Round($this.Getter(''), 2) + } ` + { + param([single]$arg) + return $this.Setter('', $arg) + } + ) +} + +class StripComp : StripKnob { StripComp ([int]$index, [Object]$remote) : base ($index, $remote) { - AddFloatMembers -PARAMS @('gainin', 'ratio', 'threshold', 'attack', 'release', 'knee', 'gainout') + AddFloatMembers -PARAMS @('gainin', 'ratio', 'attack', 'release', 'knee', 'gainout') AddBoolMembers -PARAMS @('makeup') } [string] identifier () { return 'Strip[' + $this.index + '].Comp' } - - hidden $_knob = $($this | Add-Member ScriptProperty 'knob' ` - { - [math]::Round($this.Getter(''), 2) - } ` - { - param([single]$arg) - return $this.Setter('', $arg) - } - ) } -class StripGate : IRemote { +class StripGate : StripKnob { StripGate ([int]$index, [Object]$remote) : base ($index, $remote) { - AddFloatMembers -PARAMS @('threshold', 'damping', 'bpsidechain', 'attack', 'hold', 'release') + AddFloatMembers -PARAMS @('damping', 'bpsidechain', 'attack', 'hold', 'release') } [string] identifier () { return 'Strip[' + $this.index + '].Gate' } - - hidden $_knob = $($this | Add-Member ScriptProperty 'knob' ` - { - [math]::Round($this.Getter(''), 2) - } ` - { - param([single]$arg) - return $this.Setter('', $arg) - } - ) } -class StripDenoiser : IRemote { +class StripDenoiser : StripKnob { StripDenoiser ([int]$index, [Object]$remote) : base ($index, $remote) { - AddFloatMembers -PARAMS @('threshold') } [string] identifier () { return 'Strip[' + $this.index + '].Denoiser' } - - hidden $_knob = $($this | Add-Member ScriptProperty 'knob' ` - { - [math]::Round($this.Getter(''), 2) - } ` - { - param([single]$arg) - return $this.Setter('', $arg) - } - ) } class StripPitch : IRemote {