mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 13:20:47 +00:00
update strip, bus
set channel properties according to layout
This commit is contained in:
parent
acbc2c52cc
commit
c31f169b0b
@ -1,7 +1,7 @@
|
||||
. $PSScriptRoot\meta.ps1
|
||||
|
||||
class Bus {
|
||||
[int32]$id
|
||||
[Int]$id
|
||||
[Array]$bool_params
|
||||
[Array]$float_params
|
||||
|
||||
|
@ -1,22 +1,26 @@
|
||||
. $PSScriptRoot\meta.ps1
|
||||
|
||||
class Strip {
|
||||
[int32]$id
|
||||
[Int]$id
|
||||
[Array]$string_params
|
||||
[Array]$float_params
|
||||
[Array]$bool_params
|
||||
[Array]$int_params
|
||||
[Int]$num_strip
|
||||
[Int]$num_bus
|
||||
|
||||
# Constructor
|
||||
Strip ([Int]$id)
|
||||
Strip ([Int]$id, [Int]$num_strip, [Int]$num_bus)
|
||||
{
|
||||
$this.id = $id
|
||||
$this.num_strip = $num_strip
|
||||
$this.num_bus = $num_bus
|
||||
$this.string_params = @('label')
|
||||
$this.bool_params = @('mono', 'solo', 'mute',
|
||||
'A1', 'A2', 'A3', 'A4', 'A5',
|
||||
'B1', 'B2', 'B3')
|
||||
$this.bool_params = @('mono', 'solo', 'mute')
|
||||
$this.float_params = @('gain', 'comp', 'gate')
|
||||
$this.int_params = @('limit')
|
||||
|
||||
$this.SetChannelLayout()
|
||||
AddPublicMembers($this)
|
||||
}
|
||||
|
||||
@ -38,12 +42,23 @@ class Strip {
|
||||
[String] cmd ($arg) {
|
||||
return "Strip[" + $this.id + "].$arg"
|
||||
}
|
||||
|
||||
SetChannelLayout() {
|
||||
$this.bool_params
|
||||
0..($this.num_strip -1) | ForEach-Object {
|
||||
$this.bool_params += "A{0}" -f $_
|
||||
}
|
||||
0..($this.num_bus -1) | ForEach-Object {
|
||||
$this.bool_params += "B{0}" -f $_
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Function Strips {
|
||||
[System.Collections.ArrayList]$strip = @()
|
||||
0..$($layout.Strip-1) | ForEach-Object {
|
||||
[void]$strip.Add([Strip]::new($_))
|
||||
[void]$strip.Add([Strip]::new($_, $layout.Strip, $layout.Bus))
|
||||
}
|
||||
$strip
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user