mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-13 16:27:48 +00:00
gainlayers
gainlayers are now FloatArrayMember objects - this is a breaking change prelim pester tests for potato pass
This commit is contained in:
parent
a5bade4fbb
commit
ac3e36838e
@ -18,6 +18,8 @@ AddActionMembers now adds ScriptMethods instead of ScriptProperties:
|
||||
Deprecated Recorder.Loop removed: use Recorder.Mode.Loop
|
||||
Recorder.FileType changed from method to write-only property
|
||||
|
||||
Strip Gainlayers are now FloatArrayMember objects, see README for details
|
||||
|
||||
### Added
|
||||
|
||||
- IRemote base class
|
||||
|
||||
15
README.md
15
README.md
@ -140,7 +140,6 @@ The following strip commands are available:
|
||||
- postdelay: bool
|
||||
- postfx1: bool
|
||||
- postfx2: bool
|
||||
- gainlayer0-gainlayer7: float
|
||||
- eqgain1/bass/low: float, from -12.00 to 12.00
|
||||
- eqgain2/mid/med: float, from -12.00 to 12.00
|
||||
- eqgain3/treble/high: float, from -12.00 to 12.00
|
||||
@ -148,7 +147,6 @@ The following strip commands are available:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[5].gainlayer1 = -8.3
|
||||
```
|
||||
|
||||
A,B commands depend on Voicemeeter type.
|
||||
@ -235,6 +233,19 @@ for example:
|
||||
$vmr.strip[1].audibility.knob = 2.66
|
||||
```
|
||||
|
||||
#### Gainlayer[i]
|
||||
|
||||
The following strip.gainlayer[i] methods are available:
|
||||
|
||||
- Set($val) : float, from -60.00 to 12.00
|
||||
- Get()
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[4].gainlayer[7].set(-26.81)
|
||||
```
|
||||
|
||||
#### AppGain | AppMute
|
||||
|
||||
- AppGain($appname or $appindex, $gain) : string or int, float, from 0.00 to 1.00
|
||||
|
||||
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
15
lib/meta.ps1
15
lib/meta.ps1
@ -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
|
||||
|
||||
@ -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 () {
|
||||
|
||||
@ -286,6 +286,15 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
$vmr.strip[$index].limit = $gain
|
||||
$vmr.strip[$index].limit | Should -Be $gain
|
||||
}
|
||||
|
||||
Context 'Gainlayers' -Skip:$ifNotPotato -ForEach @(
|
||||
@{ Layer = $phys_out }, @{ Layer = $virt_out }
|
||||
) {
|
||||
It "Should set Strip[$index].Gainlayer[$layer]" {
|
||||
$vmr.strip[$index].gainlayer[$layer].set($gain)
|
||||
$vmr.strip[$index].gainlayer[$layer].get() | Should -Be $gain
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Strip, physical only' -ForEach @(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user