mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-05 05:07:47 +00:00
Patch
Patch class with: - Patch.asio[i] - Patch.OutA2[i]-OutA5[i] - Patch.composite[i] - Patch.insert[i] - Patch.postFaderComposite - Patch.postFxInsert
This commit is contained in:
parent
c086f58ade
commit
3a5c7286f6
@ -10,6 +10,7 @@
|
|||||||
. $PSScriptRoot\vban.ps1
|
. $PSScriptRoot\vban.ps1
|
||||||
. $PSScriptRoot\command.ps1
|
. $PSScriptRoot\command.ps1
|
||||||
. $PSScriptRoot\recorder.ps1
|
. $PSScriptRoot\recorder.ps1
|
||||||
|
. $PSScriptRoot\patch.ps1
|
||||||
. $PSScriptRoot\profiles.ps1
|
. $PSScriptRoot\profiles.ps1
|
||||||
|
|
||||||
class Remote {
|
class Remote {
|
||||||
@ -79,6 +80,7 @@ class RemoteBasic : Remote {
|
|||||||
[System.Collections.ArrayList]$button
|
[System.Collections.ArrayList]$button
|
||||||
[PSCustomObject]$vban
|
[PSCustomObject]$vban
|
||||||
[Object]$command
|
[Object]$command
|
||||||
|
[Object]$patch
|
||||||
|
|
||||||
RemoteBasic () : base ('basic') {
|
RemoteBasic () : base ('basic') {
|
||||||
$this.strip = Make_Strips($this)
|
$this.strip = Make_Strips($this)
|
||||||
@ -86,6 +88,7 @@ class RemoteBasic : Remote {
|
|||||||
$this.button = Make_Buttons
|
$this.button = Make_Buttons
|
||||||
$this.vban = Make_Vban($this)
|
$this.vban = Make_Vban($this)
|
||||||
$this.command = Make_Command($this)
|
$this.command = Make_Command($this)
|
||||||
|
$this.patch = Make_Patch($this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,6 +98,7 @@ class RemoteBanana : Remote {
|
|||||||
[System.Collections.ArrayList]$button
|
[System.Collections.ArrayList]$button
|
||||||
[PSCustomObject]$vban
|
[PSCustomObject]$vban
|
||||||
[Object]$command
|
[Object]$command
|
||||||
|
[Object]$patch
|
||||||
[Object]$recorder
|
[Object]$recorder
|
||||||
|
|
||||||
RemoteBanana () : base ('banana') {
|
RemoteBanana () : base ('banana') {
|
||||||
@ -103,6 +107,7 @@ class RemoteBanana : Remote {
|
|||||||
$this.button = Make_Buttons
|
$this.button = Make_Buttons
|
||||||
$this.vban = Make_Vban($this)
|
$this.vban = Make_Vban($this)
|
||||||
$this.command = Make_Command($this)
|
$this.command = Make_Command($this)
|
||||||
|
$this.patch = Make_Patch($this)
|
||||||
$this.recorder = Make_Recorder($this)
|
$this.recorder = Make_Recorder($this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,6 +118,7 @@ class RemotePotato : Remote {
|
|||||||
[System.Collections.ArrayList]$button
|
[System.Collections.ArrayList]$button
|
||||||
[PSCustomObject]$vban
|
[PSCustomObject]$vban
|
||||||
[Object]$command
|
[Object]$command
|
||||||
|
[Object]$patch
|
||||||
[Object]$recorder
|
[Object]$recorder
|
||||||
|
|
||||||
RemotePotato () : base ('potato') {
|
RemotePotato () : base ('potato') {
|
||||||
@ -121,6 +127,7 @@ class RemotePotato : Remote {
|
|||||||
$this.button = Make_Buttons
|
$this.button = Make_Buttons
|
||||||
$this.vban = Make_Vban($this)
|
$this.vban = Make_Vban($this)
|
||||||
$this.command = Make_Command($this)
|
$this.command = Make_Command($this)
|
||||||
|
$this.patch = Make_Patch($this)
|
||||||
$this.recorder = Make_Recorder($this)
|
$this.recorder = Make_Recorder($this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
49
lib/patch.ps1
Normal file
49
lib/patch.ps1
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
class Patch : IRemote {
|
||||||
|
[System.Collections.ArrayList]$asio
|
||||||
|
[System.Collections.ArrayList]$composite
|
||||||
|
[System.Collections.ArrayList]$insert
|
||||||
|
|
||||||
|
Patch ([Object]$remote) : base ($remote) {
|
||||||
|
AddBoolMembers -PARAMS @('postFaderComposite', 'postFxInsert')
|
||||||
|
|
||||||
|
$this.AddASIOOutMembers()
|
||||||
|
|
||||||
|
$this.asio = @()
|
||||||
|
for ($i = 0; $i -lt $remote.kind.asio_in; $i++) {
|
||||||
|
$this.asio.Add([IntArrayMember]::new($i, 'asio', $this))
|
||||||
|
}
|
||||||
|
|
||||||
|
$this.composite = @()
|
||||||
|
for ($i = 0; $i -lt $remote.kind.composite; $i++) {
|
||||||
|
$this.composite.Add([IntArrayMember]::new($i, 'composite', $this))
|
||||||
|
}
|
||||||
|
|
||||||
|
$this.insert = @()
|
||||||
|
for ($i = 0; $i -lt $remote.kind.insert; $i++) {
|
||||||
|
$this.insert.Add([BoolArrayMember]::new($i, 'insert', $this))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[string] identifier () {
|
||||||
|
return 'Patch'
|
||||||
|
}
|
||||||
|
|
||||||
|
hidden [void] AddASIOOutMembers () {
|
||||||
|
$num_A = $this.remote.kind.p_out
|
||||||
|
$asio_out = $this.remote.kind.asio_out
|
||||||
|
|
||||||
|
if ($asio_out -le 0) { return }
|
||||||
|
|
||||||
|
for ($a = 2; $a -le $num_A; $a++) {
|
||||||
|
[System.Collections.ArrayList]$members = @()
|
||||||
|
for ($i = 0; $i -lt $asio_out; $i++) {
|
||||||
|
$members.Add([IntArrayMember]::new($i, "OutA$a", $this))
|
||||||
|
}
|
||||||
|
Add-Member -InputObject $this -MemberType NoteProperty -Name "OutA$a" -Value $members -Force
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Make_Patch ([Object]$remote) {
|
||||||
|
return [Patch]::new($remote)
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user