mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-05 05:07:47 +00:00
stripeq, buseq
- replace iremote with eq for stripeq and buseq - move identifier to eq - avoid passing entire parent objects
This commit is contained in:
parent
6154af7ad7
commit
60d97a89b4
@ -5,6 +5,7 @@
|
|||||||
. $PSScriptRoot\iremote.ps1
|
. $PSScriptRoot\iremote.ps1
|
||||||
. $PSScriptRoot\arraymember.ps1
|
. $PSScriptRoot\arraymember.ps1
|
||||||
. $PSScriptRoot\device.ps1
|
. $PSScriptRoot\device.ps1
|
||||||
|
. $PSScriptRoot\eq.ps1
|
||||||
. $PSScriptRoot\strip.ps1
|
. $PSScriptRoot\strip.ps1
|
||||||
. $PSScriptRoot\bus.ps1
|
. $PSScriptRoot\bus.ps1
|
||||||
. $PSScriptRoot\macrobuttons.ps1
|
. $PSScriptRoot\macrobuttons.ps1
|
||||||
|
|||||||
@ -83,13 +83,8 @@ class BusMode : IRemote {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BusEq : IRemote {
|
class BusEq : Eq {
|
||||||
BusEq ([int]$index, [Object]$remote) : base ($index, $remote) {
|
BusEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Bus', $remote.kind.bus_ch) {
|
||||||
AddBoolMembers -PARAMS @('on', 'ab')
|
|
||||||
}
|
|
||||||
|
|
||||||
[string] identifier () {
|
|
||||||
return 'Bus[' + $this.index + '].EQ'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
20
lib/eq.ps1
20
lib/eq.ps1
@ -2,15 +2,19 @@ class Eq : IRemote {
|
|||||||
[System.Collections.ArrayList]$channel
|
[System.Collections.ArrayList]$channel
|
||||||
[string]$prefix
|
[string]$prefix
|
||||||
|
|
||||||
Eq ([string]$prefix, [int]$chCount, [Object]$parent) : base ($parent.index, $parent.remote) {
|
Eq ([int]$index, [Object]$remote, [string]$prefix, [int]$chCount) : base ($index, $remote) {
|
||||||
|
$this.prefix = $prefix
|
||||||
|
|
||||||
AddBoolMembers -PARAMS @('on', 'ab')
|
AddBoolMembers -PARAMS @('on', 'ab')
|
||||||
|
|
||||||
$this.channel = @()
|
$this.channel = @()
|
||||||
for ($ch = 0; $ch -lt $chCount; $ch++) {
|
for ($ch = 0; $ch -lt $chCount; $ch++) {
|
||||||
$this.channel.Add([EqChannel]::new($ch, $this))
|
$this.channel.Add([EqChannel]::new($ch, $remote, $this.identifier()))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this.prefix = $prefix
|
[string] identifier () {
|
||||||
|
return '{0}[{1}].EQ' -f $this.prefix, $this.index
|
||||||
}
|
}
|
||||||
|
|
||||||
[void] Load ([string]$filename) {
|
[void] Load ([string]$filename) {
|
||||||
@ -28,13 +32,13 @@ class EqChannel : IRemote {
|
|||||||
[System.Collections.ArrayList]$cell
|
[System.Collections.ArrayList]$cell
|
||||||
[string]$eqId
|
[string]$eqId
|
||||||
|
|
||||||
EqChannel ([int]$index, [Object]$eq) : base ($index, $eq.remote) {
|
EqChannel ([int]$index, [Object]$remote, [string]$eqId) : base ($index, $remote) {
|
||||||
$this.eqId = $eq.identifier()
|
$this.eqId = $eqId
|
||||||
|
|
||||||
$this.cell = @()
|
$this.cell = @()
|
||||||
$cellCount = $this.remote.kind.cells
|
$cellCount = $this.remote.kind.cells
|
||||||
for ($c = 0; $c -lt $cellCount; $c++) {
|
for ($c = 0; $c -lt $cellCount; $c++) {
|
||||||
$this.cell.Add([EqCell]::new($c, $this))
|
$this.cell.Add([EqCell]::new($c, $remote, $this.identifier()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,8 +50,8 @@ class EqChannel : IRemote {
|
|||||||
class EqCell : IRemote {
|
class EqCell : IRemote {
|
||||||
[string]$channelId
|
[string]$channelId
|
||||||
|
|
||||||
EqCell ([int]$index, [Object]$channel) : base ($index, $channel.remote) {
|
EqCell ([int]$index, [Object]$remote, [string]$channelId) : base ($index, $remote) {
|
||||||
$this.channelId = $channel.identifier()
|
$this.channelId = $channelId
|
||||||
|
|
||||||
AddBoolMembers -PARAMS @('on')
|
AddBoolMembers -PARAMS @('on')
|
||||||
AddIntMembers -PARAMS @('type')
|
AddIntMembers -PARAMS @('type')
|
||||||
|
|||||||
@ -11,6 +11,9 @@ $KindMap = @{
|
|||||||
'insert' = 0
|
'insert' = 0
|
||||||
'vban_in' = 4
|
'vban_in' = 4
|
||||||
'vban_out' = 4
|
'vban_out' = 4
|
||||||
|
'strip_ch' = 0
|
||||||
|
'bus_ch' = 0
|
||||||
|
'cells' = 0
|
||||||
};
|
};
|
||||||
'banana' = @{
|
'banana' = @{
|
||||||
'name' = 'banana'
|
'name' = 'banana'
|
||||||
@ -24,6 +27,9 @@ $KindMap = @{
|
|||||||
'insert' = 22
|
'insert' = 22
|
||||||
'vban_in' = 8
|
'vban_in' = 8
|
||||||
'vban_out' = 8
|
'vban_out' = 8
|
||||||
|
'strip_ch' = 0
|
||||||
|
'bus_ch' = 8
|
||||||
|
'cells' = 6
|
||||||
};
|
};
|
||||||
'potato' = @{
|
'potato' = @{
|
||||||
'name' = 'potato'
|
'name' = 'potato'
|
||||||
@ -37,6 +43,9 @@ $KindMap = @{
|
|||||||
'insert' = 34
|
'insert' = 34
|
||||||
'vban_in' = 8
|
'vban_in' = 8
|
||||||
'vban_out' = 8
|
'vban_out' = 8
|
||||||
|
'strip_ch' = 2
|
||||||
|
'bus_ch' = 8
|
||||||
|
'cells' = 6
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -152,13 +152,8 @@ class StripDenoiser : IRemote {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
class StripEq : IRemote {
|
class StripEq : Eq {
|
||||||
StripEq ([int]$index, [Object]$remote) : base ($index, $remote) {
|
StripEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Strip', $remote.kind.strip_ch) {
|
||||||
AddBoolMembers -PARAMS @('on', 'ab')
|
|
||||||
}
|
|
||||||
|
|
||||||
[string] identifier () {
|
|
||||||
return 'Strip[' + $this.index + '].EQ'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user