diff --git a/lib/bus.ps1 b/lib/bus.ps1 index 03fe3b1..0ba086d 100644 --- a/lib/bus.ps1 +++ b/lib/bus.ps1 @@ -84,7 +84,11 @@ class BusMode : IRemote { } class BusEq : Eq { - BusEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Bus', $remote.kind.bus_ch) { + BusEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Bus') { + } + + [string] identifier () { + return 'Bus[' + $this.index + '].EQ' } } diff --git a/lib/eq.ps1 b/lib/eq.ps1 index 13b11e5..048ebe3 100644 --- a/lib/eq.ps1 +++ b/lib/eq.ps1 @@ -1,29 +1,25 @@ class Eq : IRemote { [System.Collections.ArrayList]$channel - [string]$prefix + [string]$kindOfEq - Eq ([int]$index, [Object]$remote, [string]$prefix, [int]$chCount) : base ($index, $remote) { - $this.prefix = $prefix + Eq ([int]$index, [Object]$remote, [string]$kindOfEq) : base ($index, $remote) { + $this.kindOfEq = $kindOfEq AddBoolMembers -PARAMS @('on', 'ab') $this.channel = @() - for ($ch = 0; $ch -lt $chCount; $ch++) { + for ($ch = 0; $ch -lt $remote.kind.eq_ch[$this.kindOfEq]; $ch++) { $this.channel.Add([EqChannel]::new($ch, $remote, $this.identifier())) } } - [string] identifier () { - return '{0}[{1}].EQ' -f $this.prefix, $this.index - } - [void] Load ([string]$filename) { - $param = 'Command.Load{0}Eq[{1}]' -f $this.prefix, $this.index + $param = 'Command.Load{0}Eq[{1}]' -f $this.kindOfEq, $this.index $this.remote.Setter($param, $filename) } [void] Save ([string]$filename) { - $param = 'Command.Save{0}Eq[{1}]' -f $this.prefix, $this.index + $param = 'Command.Save{0}Eq[{1}]' -f $this.kindOfEq, $this.index $this.remote.Setter($param, $filename) } } diff --git a/lib/strip.ps1 b/lib/strip.ps1 index b73aecb..87062cc 100644 --- a/lib/strip.ps1 +++ b/lib/strip.ps1 @@ -153,7 +153,11 @@ class StripDenoiser : IRemote { } class StripEq : Eq { - StripEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Strip', $remote.kind.strip_ch) { + StripEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Strip') { + } + + [string] identifier () { + return 'Strip[' + $this.index + '].EQ' } }