general updates, added fadeto/fadeby

fadeto, fadeby added to strip|bus

kind maps reworked.

bindings/profiles/kinds moved into their own files.

changelog/readme updated

version bump
This commit is contained in:
onyx-and-iris
2022-06-25 23:12:02 +01:00
parent 8429fed8b4
commit 095a9362cb
12 changed files with 274 additions and 239 deletions

View File

@@ -2,10 +2,12 @@
class Bus {
[Int]$id
[Object]$remote
# Constructor
Bus ([Int]$id) {
Bus ([Int]$id, [Object]$remote) {
$this.id = $id
$this.remote = $remote
AddBoolMembers -PARAMS @('mono', 'mute')
AddStringMembers -PARAMS @('label')
@@ -50,10 +52,18 @@ class Bus {
$this._eq = $this.Setter($this.cmd('eq.ab'), $arg)
}
)
[void] FadeTo([Single]$target, [int]$time) {
$this.Setter($this.cmd('FadeTo'), "($target, $time)")
}
[void] FadeBy([Single]$target, [int]$time) {
$this.Setter($this.cmd('FadeBy'), "($target, $time)")
}
}
class PhysicalBus : Bus {
PhysicalBus ([Int]$id) : base ($id) {
PhysicalBus ([Int]$id, [Object]$remote) : base ($id, $remote) {
}
hidden $_device = $($this | Add-Member ScriptProperty 'device' `
{
@@ -75,15 +85,15 @@ class PhysicalBus : Bus {
}
class VirtualBus : Bus {
VirtualBus ([Int]$id) : base ($id) {
VirtualBus ([Int]$id, [Object]$remote) : base ($id, $remote) {
}
}
Function Make_Buses {
Function Make_Buses([Object]$remote) {
[System.Collections.ArrayList]$bus = @()
0..$($layout.p_out + $layout.v_out - 1) | ForEach-Object {
if ($_ -lt $layout.p_out) { [void]$bus.Add([PhysicalBus]::new($_)) }
else { [void]$bus.Add([VirtualBus]::new($_)) }
0..$($remote.kind.p_out + $remote.kind.v_out - 1) | ForEach-Object {
if ($_ -lt $remote.kind.p_out) { [void]$bus.Add([PhysicalBus]::new($_, $remote)) }
else { [void]$bus.Add([VirtualBus]::new($_, $remote)) }
}
$bus
}