gainlayers

gainlayers are now FloatArrayMember objects - this is a breaking change

prelim pester tests for potato pass
This commit is contained in:
pblivingston
2025-12-08 14:49:15 -05:00
parent a5bade4fbb
commit ac3e36838e
6 changed files with 33 additions and 18 deletions

View File

@@ -12,6 +12,7 @@ $KindMap = @{
'vban' = @{ 'in' = 4; 'out' = 4; 'midi' = 1; 'text' = 1 }
'eq_ch' = @{ 'strip' = 0; 'bus' = 0 }
'cells' = 0
'gainlayer' = 0
};
'banana' = @{
'name' = 'banana'
@@ -26,6 +27,7 @@ $KindMap = @{
'vban' = @{ 'in' = 8; 'out' = 8; 'midi' = 1; 'text' = 1 }
'eq_ch' = @{ 'strip' = 0; 'bus' = 8 }
'cells' = 6
'gainlayer' = 0
};
'potato' = @{
'name' = 'potato'
@@ -40,6 +42,7 @@ $KindMap = @{
'vban' = @{ 'in' = 8; 'out' = 8; 'midi' = 1; 'text' = 1 }
'eq_ch' = @{ 'strip' = 2; 'bus' = 8 }
'cells' = 6
'gainlayer' = 8
};
}

View File

@@ -96,21 +96,6 @@ function AddChannelMembers () {
AddBoolMembers -PARAMS $channels
}
function AddGainlayerMembers () {
[hashtable]$Signatures = @{}
0..7 | ForEach-Object {
# Define getter
$Signatures['Getter'] = "`$this.Getter('gainlayer[{0}]')" -f $_
# Define setter
$Signatures['Setter'] = "param ( [Single]`$arg )`n`$this.Setter('gainlayer[{0}]', `$arg)" `
-f $_
$param = 'gainlayer{0}' -f $_
$null = $param
Addmember
}
}
function Addmember {
$AddMemberParams = @{
Name = $param

View File

@@ -1,4 +1,5 @@
class Strip : IRemote {
[System.Collections.ArrayList]$gainlayer
[Object]$levels
Strip ([int]$index, [Object]$remote) : base ($index, $remote) {
@@ -7,9 +8,13 @@ class Strip : IRemote {
AddStringMembers -PARAMS @('label')
AddChannelMembers
AddGainlayerMembers
$this.levels = [StripLevels]::new($index, $remote)
$this.gainlayer = @()
for ($i = 0; $i -lt $remote.kind.gainlayer; $i++) {
$this.gainlayer.Add([FloatArrayMember]::new($i, 'gainlayer', $this))
}
}
[string] identifier () {