mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-01-02 00:47:47 +00:00
Compare commits
18 Commits
46584236d4
...
837211424f
| Author | SHA1 | Date | |
|---|---|---|---|
| 837211424f | |||
| 88901aa6ee | |||
|
|
64ebc86f21 | ||
|
|
8855092438 | ||
|
|
865d094450 | ||
|
|
1cdbf9e272 | ||
|
|
23b86fecb9 | ||
|
|
61b3ecd3d3 | ||
|
|
a2b75fa21b | ||
|
|
618f4a8462 | ||
|
|
a22dccf18f | ||
|
|
64e6874a75 | ||
|
|
ac3e36838e | ||
|
|
a5bade4fbb | ||
|
|
2cf265b3b6 | ||
|
|
0bdfb1c38f | ||
|
|
4189ac7721 | ||
|
|
6d511d8aa6 |
52
CHANGELOG.md
52
CHANGELOG.md
@ -18,46 +18,75 @@ 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
|
||||
- ArrayMember classes for array-like properties
|
||||
- Patch class
|
||||
- Option class
|
||||
- Device classes
|
||||
- Device class
|
||||
- EQ class
|
||||
- FX class
|
||||
|
||||
- AddAliasMembers meta function takes a hashtable `-MAP` of `alias = property`
|
||||
|
||||
- Vban.port sets Vban.Instream[0].port
|
||||
- Vban Midi and Command streams
|
||||
- on, write-only
|
||||
- name, write-only
|
||||
- ip, write-only
|
||||
- Bus.Sel, Bus.Monitor, Bus.Vaio
|
||||
- Bus.Mode.Set($mode)
|
||||
|
||||
- Recorder.Armedbus
|
||||
- Recorder.PreRecTime
|
||||
- Recorder.Prefix
|
||||
- Recorder.Eject() references 'Command.Eject'
|
||||
- Recorder.State
|
||||
|
||||
- Command.Reset()
|
||||
- Command.Save($filepath)
|
||||
- Command.StorePreset()
|
||||
- Command.RecallPreset()
|
||||
|
||||
- Bus.Sel, Bus.Monitor, Bus.Vaio
|
||||
- Bus.Mode.Set($mode)
|
||||
|
||||
- Strip.Karaoke alias for Strip.K
|
||||
- Strip.EQGain1|EQGain2|EQGain3 with bass/low, mid/med, treble/high aliases, respectively
|
||||
- StripAudibility class with Strip.Audibility.Knob
|
||||
- Strip.Denoiser.Threshold
|
||||
- Strip.VAIO
|
||||
- Strip.Pitch, StripPitch class
|
||||
- on
|
||||
- drywet
|
||||
- pitchvalue
|
||||
- loformant
|
||||
- medformant
|
||||
- hiformant
|
||||
- recallpreset($presetIndex)
|
||||
|
||||
### Changed
|
||||
|
||||
- Device: explicit $arg types for consistency
|
||||
- Meta: AddBoolMembers, AddIntMembers $arg types for consistency
|
||||
- Float getters/setters now default to two decimal places.
|
||||
|
||||
- some vban.instream | vban.outstream commands now added with meta functions
|
||||
- on
|
||||
- name
|
||||
- ip
|
||||
- cast vban getters to types for consistency
|
||||
- Bus.Mono -> [int] for stereo reverse
|
||||
- Bus.Levels.Convert return type [float] -> [single] for naming consistency, no functional change
|
||||
- Meta: AddBoolMembers, AddIntMembers $arg types for consistency
|
||||
- Device: explicit $arg types for consistency
|
||||
|
||||
- Recorder.Armstrip|Armbus -> BoolArrayMember: now have .Get()
|
||||
- Cast Recorder getters to types for consistency
|
||||
- Floats getters/setters now default to two decimal places.
|
||||
|
||||
- Bus.Levels.Convert hidden and return type [float] -> [single] for naming consistency
|
||||
|
||||
- Strip.Mono is now an alias for Strip.MC on virtual strips
|
||||
- Strip.AppMute|AppGain can now take an app index; see README for details
|
||||
- Strip Knob setters: explicit $arg types for consistency
|
||||
- Strip.Levels.Convert hidden and return type [float] -> [single] for naming consistency
|
||||
|
||||
### Fixed
|
||||
|
||||
@ -68,8 +97,15 @@ Recorder.FileType changed from method to write-only property
|
||||
- vban.stream.port: [string]$arg -> [int]$arg
|
||||
- vban route range (API documentation is incorrect)
|
||||
- vban.stream.sr: $this._port -> $this._sr
|
||||
|
||||
- Recorder.channel values: 1..8 -> (2, 4, 6, 8)
|
||||
|
||||
- Bus.Mono -> [int] for stereo reverse
|
||||
|
||||
- Strip.Limit type [int] -> [float]
|
||||
- Missing closing parenthesis in AppMute value string
|
||||
- Strip Knob getters: `this.Getter_String('') -> [math]::Round($this.Getter(''), 2)`
|
||||
|
||||
## [3.3.0] - 2024-06-29
|
||||
|
||||
### Added
|
||||
|
||||
269
README.md
269
README.md
@ -113,16 +113,17 @@ $vmr.Logout()
|
||||
|
||||
### Strip
|
||||
|
||||
The following strip commands are available:
|
||||
The following Strip properties are available:
|
||||
|
||||
- mute: bool
|
||||
- mono: bool
|
||||
- mc: bool
|
||||
- k: int, from 0 to 4
|
||||
- k/karaoke: int, from 0 to 4
|
||||
- solo: bool
|
||||
- A1-A5: bool
|
||||
- B1-B3: bool
|
||||
- limit: int, from -40 to 12
|
||||
- vaio: bool
|
||||
- limit: float, from -40.00 to 12.00
|
||||
- gain: float, from -60.00 to 12.00
|
||||
- label: string
|
||||
- reverb: float, from 0.00 to 10.00
|
||||
@ -130,7 +131,7 @@ The following strip commands are available:
|
||||
- fx1: float, from 0.00 to 10.00
|
||||
- fx2: float, from 0.00 to 10.00
|
||||
- pan_x: float, from -0.50 to 0.50
|
||||
- pan_y: float, from 0.00 to 1.00
|
||||
- pan_y: float, physical: from 0.00 to 1.00, virtual: from -0.50 to 0.50
|
||||
- color_x: float, from -0.50 to 0.50
|
||||
- color_y: float, from 0.00 to 1.00
|
||||
- fx_x: float, from -0.50 to 0.50
|
||||
@ -139,23 +140,40 @@ 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
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[5].gainlayer1 = -8.3
|
||||
$vmr.strip[6].karaoke = 3
|
||||
$vmr.strip[0].limit = 4.5
|
||||
$vmr.strip[2].label = 'example'
|
||||
$vmr.strip[7].pan_y = -0.38
|
||||
$vmr.strip[5].treble = -2.43
|
||||
```
|
||||
|
||||
A,B commands depend on Voicemeeter type.
|
||||
The following Strip methods are available:
|
||||
|
||||
gainlayers defined for Potato version only.
|
||||
- AppGain($appname or $appindex, $gain) : string or int, float, from 0.00 to 1.00
|
||||
- AppMute($appname or $appindex, $mutestate) : string or int, bool
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[5].AppGain("Spotify", 0.5)
|
||||
$vmr.strip[5].AppMute("Spotify", $true)
|
||||
$vmr.strip[7].AppGain(0, 0.28)
|
||||
$vmr.strip[6].AppMute(2, $false)
|
||||
```
|
||||
|
||||
A,B properties depend on Voicemeeter type.
|
||||
mc, k for virtual strips only.
|
||||
|
||||
#### comp
|
||||
|
||||
The following strip.comp commands are available:
|
||||
The following Strip.comp properties are available:
|
||||
|
||||
- knob: float, from 0.00 to 10.00
|
||||
- gainin: float, from -24.00 to 24.00
|
||||
@ -175,12 +193,12 @@ $vmr.strip[3].comp.attack = 8.5
|
||||
|
||||
#### gate
|
||||
|
||||
The following strip.gate commands are available:
|
||||
The following Strip.gate properties are available:
|
||||
|
||||
- knob: float, from 0.00 to 10.00
|
||||
- threshold: float, from -60.00 to -10.00
|
||||
- damping: float, from -60.00 to -10.00
|
||||
- bpsidechain: int, from 100 to 4000
|
||||
- bpsidechain: float, from 100.00 to 4000.00
|
||||
- attack: float, from 0.00 to 1000.00
|
||||
- hold: float, from 0.00 to 5000.00
|
||||
- release: float, from 0.00 to 5000.00
|
||||
@ -193,9 +211,10 @@ $vmr.strip[3].gate.threshold = -40.5
|
||||
|
||||
#### denoiser
|
||||
|
||||
The following strip.denoiser commands are available:
|
||||
The following Strip.denoiser properties are available:
|
||||
|
||||
- knob: float, from 0.00 to 10.00
|
||||
- threshold: float, from 0.00 to 10.00
|
||||
|
||||
for example:
|
||||
|
||||
@ -203,21 +222,57 @@ for example:
|
||||
$vmr.strip[3].denoiser.knob = 5
|
||||
```
|
||||
|
||||
#### AppGain | AppMute
|
||||
#### pitch
|
||||
|
||||
- `AppGain(amount, gain)` : string, float
|
||||
- `AppMute(amount, mutestate)` : string, bool
|
||||
The following Strip.pitch properties are available:
|
||||
|
||||
- on: bool
|
||||
- drywet: float, from -100.00 to 100.00
|
||||
- pitchvalue: float, from -12.00 to 12.00
|
||||
- loformant: float, from -12.00 to 12.00
|
||||
- medformant: float, from -12.00 to 12.00
|
||||
- hiformant: float, from -12.00 to 12.00
|
||||
|
||||
The following Strip.pitch methods are available:
|
||||
|
||||
- RecallPreset($presetIndex) : int, from 0 to 7
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[5].AppGain("Spotify", 0.5)
|
||||
$vmr.strip[5].AppMute("Spotify", $true)
|
||||
$vmr.strip[2].pitch.recallpreset(4)
|
||||
$vmr.strip[4].pitch.drywet = -22.86
|
||||
$vmr.strip[1].pitch.medformant = 2.1
|
||||
```
|
||||
|
||||
#### audibility
|
||||
|
||||
The following Strip.audibility properties are available:
|
||||
|
||||
- knob: float, from 0.00 to 10.00
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$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)
|
||||
```
|
||||
|
||||
#### levels
|
||||
|
||||
The following strip.level commands are available:
|
||||
The following Strip.levels methods are available:
|
||||
|
||||
- PreFader()
|
||||
- PostFader()
|
||||
@ -231,7 +286,7 @@ $vmr.strip[2].levels.PreFader() -Join ', ' | Write-Host
|
||||
|
||||
### Bus
|
||||
|
||||
The following bus commands are available:
|
||||
The following Bus properties are available:
|
||||
|
||||
- mute: bool
|
||||
- sel: bool
|
||||
@ -253,7 +308,7 @@ $vmr.bus[3].returnreverb = 5.7
|
||||
|
||||
#### modes
|
||||
|
||||
The following bus.mode members are available:
|
||||
The following Bus.mode members are available:
|
||||
|
||||
- normal: bool
|
||||
- amix: bool
|
||||
@ -268,22 +323,21 @@ The following bus.mode members are available:
|
||||
- lfeonly: bool
|
||||
- rearonly: bool
|
||||
|
||||
The following bus.mode commands are available:
|
||||
The following Bus.mode methods are available:
|
||||
|
||||
- Set($mode): string, sets the current bus mode
|
||||
- Get(): returns the current bus mode.
|
||||
- Set($mode) : string, sets the current bus mode
|
||||
- Get() : returns the current bus mode
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.bus[0].mode.centeronly = $true
|
||||
|
||||
$vmr.bus[0].mode.Get()
|
||||
$vmr.bus[0].mode.Set('tvmix')
|
||||
```
|
||||
|
||||
#### levels
|
||||
|
||||
The following strip.level commands are available:
|
||||
The following Bus.levels methods are available:
|
||||
|
||||
- All()
|
||||
|
||||
@ -295,9 +349,23 @@ $vmr.bus[2].levels.All() -Join ', ' | Write-Host
|
||||
|
||||
### Strip|Bus
|
||||
|
||||
The following Strip | Bus methods are available:
|
||||
|
||||
- FadeTo(amount, time) : float, int
|
||||
- FadeBy(amount, time) : float, int
|
||||
|
||||
Modify gain to or by the selected amount in db over a time interval in ms.
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[3].FadeTo(-18.75, 1000)
|
||||
$vmr.bus[0].FadeBy(-10, 500)
|
||||
```
|
||||
|
||||
#### device
|
||||
|
||||
The following strip.device | bus.device commands are available:
|
||||
The following Strip.device | Bus.device properties are available:
|
||||
|
||||
- name: string
|
||||
- sr: int
|
||||
@ -310,7 +378,7 @@ for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[0].device.wdm = "Mic|Line|Instrument 1 (Audient EVO4)"
|
||||
$vmr.bus[0].device.name
|
||||
$vmr.bus[0].device.name | Write-Host
|
||||
```
|
||||
|
||||
name, sr are defined as read only.
|
||||
@ -319,12 +387,12 @@ asio only defined for Bus[0].Device
|
||||
|
||||
#### eq
|
||||
|
||||
The following strip.eq | bus.eq commands are available:
|
||||
The following Strip.eq | Bus.eq properties are available:
|
||||
|
||||
- on: bool
|
||||
- ab: bool
|
||||
|
||||
The following strip.eq | bus.eq methods are available:
|
||||
The following Strip.eq | Bus.eq methods are available:
|
||||
|
||||
- Load($filepath) : string
|
||||
- Save($filepath) : string
|
||||
@ -338,7 +406,7 @@ $vmr.bus[0].eq.ab = $false
|
||||
|
||||
##### channel.cell
|
||||
|
||||
The following eq.channel.cell commands are available:
|
||||
The following eq.channel.cell properties are available:
|
||||
|
||||
- on: bool
|
||||
- type: int, from 0 to 6
|
||||
@ -353,44 +421,39 @@ $vmr.strip[2].eq.channel[1].cell[4].type = 1
|
||||
$vmr.bus[5].eq.channel[6].cell[3].on = $false
|
||||
```
|
||||
|
||||
#### FadeTo | FadeBy
|
||||
|
||||
- `FadeTo(amount, time)` : float, int
|
||||
- `FadeBy(amount, time)` : float, int
|
||||
|
||||
Modify gain to or by the selected amount in db over a time interval in ms.
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.strip[3].FadeTo(-18.7, 1000)
|
||||
$vmr.bus[0].FadeBy(-10, 500)
|
||||
```
|
||||
|
||||
### Macrobuttons
|
||||
|
||||
Three modes defined: state, stateonly and trigger.
|
||||
The following Button properties are available:
|
||||
|
||||
- State runs associated scripts
|
||||
- Stateonly does not run associated scripts
|
||||
- Index range (0, 69)
|
||||
- state: bool, runs associated scripts
|
||||
- stateonly: bool, does not run associated scripts
|
||||
- trigger: bool
|
||||
|
||||
```powershell
|
||||
$vmr.button[3].state = $true
|
||||
|
||||
$vmr.button[4].stateonly = $false
|
||||
|
||||
$vmr.button[5].trigger = $true
|
||||
```
|
||||
|
||||
Index range (0, 79)
|
||||
|
||||
### VBAN
|
||||
|
||||
The following vban commands are available:
|
||||
The following Vban properties are available:
|
||||
|
||||
- enable: bool
|
||||
- port: int, from 1024 - 65535
|
||||
|
||||
For each vban in/out stream the following parameters are defined:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.vban.enable = $true
|
||||
$vmr.vban.port = 6990
|
||||
```
|
||||
|
||||
#### instream[i]|outstream[i]
|
||||
|
||||
The following Vban.instream | Vban.outstream properties are available:
|
||||
|
||||
- on: bool
|
||||
- name: string
|
||||
@ -401,24 +464,21 @@ For each vban in/out stream the following parameters are defined:
|
||||
- quality: int, from 0 to 4
|
||||
- route: int, from 0 to 8
|
||||
|
||||
SR, channel and bit are defined as readonly for instreams. Attempting to write
|
||||
to those parameters will throw an error. They are read and write for outstreams.
|
||||
|
||||
example:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.vban.enable = $true
|
||||
$vmr.vban.port = 6990
|
||||
|
||||
$vmr.vban.instream[0].on = $true
|
||||
$vmr.vban.outstream[3].bit = 16
|
||||
```
|
||||
|
||||
SR, channel and bit are defined as readonly for instreams. Attempting to write
|
||||
to those parameters will throw an error. They are read and write for outstreams.
|
||||
|
||||
### Command
|
||||
|
||||
Certain 'special' commands are defined by the API as performing actions rather than setting values.
|
||||
|
||||
The following methods are available:
|
||||
The following Command methods are available:
|
||||
|
||||
- Show()
|
||||
- Hide()
|
||||
@ -428,15 +488,15 @@ The following methods are available:
|
||||
- HideVBANChat()
|
||||
- Restart()
|
||||
- Shutdown()
|
||||
- Reset(): Reset all config
|
||||
- Save($filepath): string
|
||||
- Load($filepath): string
|
||||
- StorePreset($index, $name): (int, string)
|
||||
- RecallPreset($index or $name): (int or string)
|
||||
- RunMacrobuttons(): Launches the macrobuttons app
|
||||
- CloseMacrobuttons(): Closes the macrobuttons app
|
||||
- Reset() : Reset all config
|
||||
- Save($filepath) : string
|
||||
- Load($filepath) : string
|
||||
- StorePreset($index, $name) : (int, string)
|
||||
- RecallPreset($index or $name) : (int or string)
|
||||
- RunMacrobuttons() : Launches the macrobuttons app
|
||||
- CloseMacrobuttons() : Closes the macrobuttons app
|
||||
|
||||
example:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.command.Show()
|
||||
@ -458,7 +518,7 @@ StorePreset('') and RecallPreset('') interact with the 'selected' preset. This i
|
||||
|
||||
### Fx
|
||||
|
||||
The following Fx commands are available:
|
||||
The following Fx properties are available:
|
||||
|
||||
- Reverb.on: bool
|
||||
- Reverb.ab: bool
|
||||
@ -473,12 +533,12 @@ $vmr.fx.reverb.ab = $false
|
||||
|
||||
### Patch
|
||||
|
||||
The following Patch commands are available:
|
||||
The following Patch properties are available:
|
||||
|
||||
- postFaderComposite: bool
|
||||
- postFxInsert: bool
|
||||
|
||||
The following Patch members have .Set($val) and .Get() available:
|
||||
The following Patch members have methods Set($val) | Get() available:
|
||||
|
||||
- asio[i]: int, from 0 to ASIO input channels
|
||||
- OutA2[i]-OutA5[i]: int, from 0 to ASIO output channels
|
||||
@ -496,7 +556,7 @@ $vmr.patch.insert[4].get()
|
||||
|
||||
### Option
|
||||
|
||||
The following Option commands are available:
|
||||
The following Option properties are available:
|
||||
|
||||
- sr: int, (32000, 44100, 48000, 88200, 96000, 176400, 192000)
|
||||
- asiosr: bool
|
||||
@ -504,21 +564,15 @@ The following Option commands are available:
|
||||
- sliderMode: bool
|
||||
- monitoringBus: int, from 0 to bus index
|
||||
|
||||
The following Option.delay[i] methods are available:
|
||||
|
||||
- Set($val): float, from 0.00 to 500.00
|
||||
- Get()
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.Option.delay[2].set(30.26) # sets the delay for the third (2) bus
|
||||
$vmr.Option.sliderMode = $false # sets slider mode to absolute
|
||||
```
|
||||
|
||||
#### buffers
|
||||
|
||||
The following Option.buffer commands are available:
|
||||
The following Option.buffer properties are available:
|
||||
|
||||
- mme: int, (441, 480, 512, 576, 640, 704, 768, 896, 1024, 1536, 2048)
|
||||
- wdm: int, (128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 441, 448, 480, 512, 576, 640, 704, 768, 1024, 1536, 2048)
|
||||
@ -532,9 +586,22 @@ $vmr.Option.buffer.wdm = 512
|
||||
$vmr.Option.buffer.asio = 0 # to use default buffer size
|
||||
```
|
||||
|
||||
#### delay[i]
|
||||
|
||||
The following Option.delay[i] methods are available:
|
||||
|
||||
- Set($val) : float, from 0.00 to 500.00
|
||||
- Get()
|
||||
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.Option.delay[2].set(30.26) # sets the delay for the third (2) bus
|
||||
```
|
||||
|
||||
### Recorder
|
||||
|
||||
The following commands are available:
|
||||
The following Recorder properties are available:
|
||||
|
||||
- A1 - A5: bool
|
||||
- B1 - B3: bool
|
||||
@ -549,7 +616,15 @@ The following commands are available:
|
||||
- channel: int, (2, 4, 6, 8)
|
||||
- kbps: int, (32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320)
|
||||
|
||||
The following methods are available:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.recorder.A1 = $true
|
||||
$vmr.recorder.filetype = 'mp3'
|
||||
$vmr.recorder.kbps = 256
|
||||
```
|
||||
|
||||
The following Recorder methods are available:
|
||||
|
||||
- Play()
|
||||
- Stop()
|
||||
@ -559,41 +634,39 @@ The following methods are available:
|
||||
- Record()
|
||||
- Pause()
|
||||
- Eject()
|
||||
- Load($filepath): string
|
||||
- GoTo($timestring): string, must match the format 'hh:mm:ss'
|
||||
- Load($filepath) : string
|
||||
- GoTo($timestring) : string, must match the format 'hh:mm:ss'
|
||||
|
||||
example:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.recorder.play()
|
||||
$vmr.recorder.A1 = $true
|
||||
|
||||
$vmr.recorder.GoTo("00:01:15") # go to 1min 15sec into track
|
||||
```
|
||||
|
||||
#### Mode
|
||||
#### mode
|
||||
|
||||
The following commands are available:
|
||||
The following Recorder.mode properties are available:
|
||||
|
||||
- recbus
|
||||
- playonload
|
||||
- loop
|
||||
- multitrack
|
||||
- recbus: bool
|
||||
- playonload: bool
|
||||
- loop: bool
|
||||
- multitrack: bool
|
||||
|
||||
example:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.recorder.mode.loop = $true
|
||||
```
|
||||
|
||||
#### ArmStrip[i]|ArmBus[i]
|
||||
#### armstrip[i]|armbus[i]
|
||||
|
||||
The following methods are available:
|
||||
The following Recorder.armstrip | Recorder.armbus methods are available:
|
||||
|
||||
- Set($val): bool
|
||||
- Set($val) : bool
|
||||
- Get()
|
||||
|
||||
example:
|
||||
for example:
|
||||
|
||||
```powershell
|
||||
$vmr.recorder.armstrip[0].Set($true)
|
||||
|
||||
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
25
lib/meta.ps1
25
lib/meta.ps1
@ -74,6 +74,16 @@ function AddActionMembers () {
|
||||
}
|
||||
}
|
||||
|
||||
function AddAliasMembers () {
|
||||
param(
|
||||
[hashtable]$MAP
|
||||
)
|
||||
foreach ($alias in $MAP.Keys) {
|
||||
$this | Add-Member -MemberType AliasProperty -Name $alias `
|
||||
-Value $MAP[$alias] -Force
|
||||
}
|
||||
}
|
||||
|
||||
function AddChannelMembers () {
|
||||
$num_A = $this.remote.kind.p_out
|
||||
$num_B = $this.remote.kind.v_out
|
||||
@ -86,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,16 +1,20 @@
|
||||
class Strip : IRemote {
|
||||
[System.Collections.ArrayList]$gainlayer
|
||||
[Object]$levels
|
||||
|
||||
Strip ([int]$index, [Object]$remote) : base ($index, $remote) {
|
||||
AddBoolMembers -PARAMS @('mono', 'solo', 'mute')
|
||||
AddIntMembers -PARAMS @('limit')
|
||||
AddFloatMembers -PARAMS @('gain', 'pan_x', 'pan_y')
|
||||
AddBoolMembers -PARAMS @('solo', 'mute')
|
||||
AddFloatMembers -PARAMS @('gain', 'limit', 'pan_x', 'pan_y')
|
||||
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 () {
|
||||
@ -42,7 +46,7 @@ class StripLevels : IRemote {
|
||||
}
|
||||
}
|
||||
|
||||
[float] Convert([float]$val) {
|
||||
hidden [single] Convert([single]$val) {
|
||||
if ($val -gt 0) {
|
||||
return [math]::Round(20 * [math]::Log10($val), 1)
|
||||
}
|
||||
@ -78,15 +82,20 @@ class PhysicalStrip : Strip {
|
||||
[Object]$denoiser
|
||||
[Object]$eq
|
||||
[Object]$device
|
||||
[Object]$audibility
|
||||
[Object]$pitch
|
||||
|
||||
PhysicalStrip ([int]$index, [Object]$remote) : base ($index, $remote) {
|
||||
AddFloatMembers -PARAMS @('color_x', 'color_y', 'fx_x', 'fx_y')
|
||||
AddFloatMembers -PARAMS @('reverb', 'delay', 'fx1', 'fx2')
|
||||
AddBoolMembers -PARAMS @('postreverb', 'postdelay', 'postfx1', 'postfx2')
|
||||
AddBoolMembers -PARAMS @('mono', 'vaio')
|
||||
|
||||
$this.comp = [StripComp]::new($index, $remote)
|
||||
$this.gate = [StripGate]::new($index, $remote)
|
||||
$this.denoiser = [StripDenoiser]::new($index, $remote)
|
||||
$this.pitch = [StripPitch]::new($index, $remote)
|
||||
$this.audibility = [StripAudibility]::new($index, $remote)
|
||||
$this.eq = [StripEq]::new($index, $remote)
|
||||
$this.device = [StripDevice]::new($index, $remote)
|
||||
}
|
||||
@ -104,10 +113,10 @@ class StripComp : IRemote {
|
||||
|
||||
hidden $_knob = $($this | Add-Member ScriptProperty 'knob' `
|
||||
{
|
||||
$this.Getter_String('')
|
||||
[math]::Round($this.Getter(''), 2)
|
||||
} `
|
||||
{
|
||||
param($arg)
|
||||
param([single]$arg)
|
||||
return $this.Setter('', $arg)
|
||||
}
|
||||
)
|
||||
@ -124,10 +133,10 @@ class StripGate : IRemote {
|
||||
|
||||
hidden $_knob = $($this | Add-Member ScriptProperty 'knob' `
|
||||
{
|
||||
$this.Getter_String('')
|
||||
[math]::Round($this.Getter(''), 2)
|
||||
} `
|
||||
{
|
||||
param($arg)
|
||||
param([single]$arg)
|
||||
return $this.Setter('', $arg)
|
||||
}
|
||||
)
|
||||
@ -135,6 +144,7 @@ class StripGate : IRemote {
|
||||
|
||||
class StripDenoiser : IRemote {
|
||||
StripDenoiser ([int]$index, [Object]$remote) : base ($index, $remote) {
|
||||
AddFloatMembers -PARAMS @('threshold')
|
||||
}
|
||||
|
||||
[string] identifier () {
|
||||
@ -143,10 +153,44 @@ class StripDenoiser : IRemote {
|
||||
|
||||
hidden $_knob = $($this | Add-Member ScriptProperty 'knob' `
|
||||
{
|
||||
$this.Getter_String('')
|
||||
[math]::Round($this.Getter(''), 2)
|
||||
} `
|
||||
{
|
||||
param($arg)
|
||||
param([single]$arg)
|
||||
return $this.Setter('', $arg)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
class StripPitch : IRemote {
|
||||
StripPitch ([int]$index, [Object]$remote) : base ($index, $remote) {
|
||||
AddBoolMembers -PARAMS @('on')
|
||||
AddFloatMembers -PARAMS @('drywet', 'pitchvalue', 'loformant', 'medformant', 'hiformant')
|
||||
}
|
||||
|
||||
[string] identifier () {
|
||||
return 'Strip[' + $this.index + '].Pitch'
|
||||
}
|
||||
|
||||
[void] RecallPreset ([int]$presetIndex) {
|
||||
$this.Setter('RecallPreset', $presetIndex)
|
||||
}
|
||||
}
|
||||
|
||||
class StripAudibility : IRemote {
|
||||
StripAudibility ([int]$index, [Object]$remote) : base ($index, $remote) {
|
||||
}
|
||||
|
||||
[string] identifier () {
|
||||
return 'Strip[' + $this.index + '].Audibility'
|
||||
}
|
||||
|
||||
hidden $_knob = $($this | Add-Member ScriptProperty 'knob' `
|
||||
{
|
||||
[math]::Round($this.Getter(''), 2)
|
||||
} `
|
||||
{
|
||||
param([single]$arg)
|
||||
return $this.Setter('', $arg)
|
||||
}
|
||||
)
|
||||
@ -174,14 +218,34 @@ class VirtualStrip : Strip {
|
||||
VirtualStrip ([int]$index, [Object]$remote) : base ($index, $remote) {
|
||||
AddBoolMembers -PARAMS @('mc')
|
||||
AddIntMembers -PARAMS @('k')
|
||||
AddFloatMembers -PARAMS @('eqgain1', 'eqgain2', 'eqgain3')
|
||||
|
||||
AddAliasMembers -MAP @{
|
||||
mono = 'mc'
|
||||
karaoke = 'k'
|
||||
bass = 'eqgain1'
|
||||
low = 'eqgain1'
|
||||
mid = 'eqgain2'
|
||||
med = 'eqgain2'
|
||||
treble = 'eqgain3'
|
||||
high = 'eqgain3'
|
||||
}
|
||||
}
|
||||
|
||||
[void] AppGain ([string]$appname, [single]$gain) {
|
||||
$this.Setter('AppGain', "(`"$appname`", $gain)")
|
||||
}
|
||||
|
||||
[void] AppGain ([int]$appindex, [single]$gain) {
|
||||
$this.Setter("App[$appindex].Gain", $gain)
|
||||
}
|
||||
|
||||
[void] AppMute ([string]$appname, [bool]$mutestate) {
|
||||
$this.Setter('AppMute', "(`"$appname`", $(if ($mutestate) { 1 } else { 0 })")
|
||||
$this.Setter('AppMute', "(`"$appname`", $(if ($mutestate) { 1 } else { 0 }))")
|
||||
}
|
||||
|
||||
[void] AppMute ([int]$appindex, [bool]$mutestate) {
|
||||
$this.Setter("App[$appindex].Mute", $mutestate)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,23 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
Context 'Strip, physical only' -ForEach @(
|
||||
@{ Index = $phys_in }
|
||||
) {
|
||||
It "Should set Strip[$index].Mono" {
|
||||
$vmr.strip[$index].mono = $value
|
||||
$vmr.strip[$index].mono | Should -Be $expected
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].VAIO" {
|
||||
$vmr.strip[$index].vaio = $value
|
||||
$vmr.strip[$index].vaio | Should -Be $expected
|
||||
}
|
||||
|
||||
Context 'Pitch' -Skip:$ifNotPotato {
|
||||
It "Should set Strip[$index].Pitch.On" {
|
||||
$vmr.strip[$index].pitch.on = $value
|
||||
$vmr.strip[$index].pitch.on | Should -Be $expected
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Eq' -Skip:$ifNotPotato -ForEach @(
|
||||
@{ Eq = $vmr.strip[$index].eq }
|
||||
) {
|
||||
@ -50,6 +67,15 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Strip, first virtual' -ForEach @(
|
||||
@{ Index = $phys_in + 1 }
|
||||
) {
|
||||
It "Should set Strip[$index].MC via alias 'Mono'" {
|
||||
$vmr.strip[$index].mono = $value
|
||||
$vmr.strip[$index].mc | Should -Be $expected
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Bus, one physical one virtual' -ForEach @(
|
||||
@{ Index = $phys_out }, @{ Index = $virt_out }
|
||||
) {
|
||||
@ -246,7 +272,7 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
|
||||
Describe 'Float Tests' -Tag 'float' -ForEach @(
|
||||
@{ Gain = -24.63; Knob = 5.27; Slide = -7.51; Xy10 = 0.83; Xy05 = -0.42; MsHz = 196.57 }
|
||||
@{ Gain = -12.48; Knob = 8.91; Slide = 3.14; Xy10 = 0.27; Xy05 = 0.69; MsHz = 142.13 }
|
||||
@{ Gain = -12.48; Knob = 8.91; Slide = 3.14; Xy10 = 0.27; Xy05 = 0.29; MsHz = 142.13 }
|
||||
) {
|
||||
Context 'Strip, one physical one virtual' -ForEach @(
|
||||
@{ Index = $phys_in }, @{ Index = $virt_in }
|
||||
@ -255,11 +281,30 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
$vmr.strip[$index].gain = $gain
|
||||
$vmr.strip[$index].gain | Should -Be $gain
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].Limit" -Skip:$ifBasic {
|
||||
$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 @(
|
||||
@{ Index = $phys_in }
|
||||
) {
|
||||
It "Should set Strip[$index].Pan_Y" {
|
||||
$vmr.strip[$index].pan_y = $xy10
|
||||
$vmr.strip[$index].pan_y | Should -Be $xy10
|
||||
}
|
||||
|
||||
Context 'Comp, Gate' -Skip:$ifBasic {
|
||||
It "Should set Strip[$index].Comp" {
|
||||
$vmr.strip[$index].comp.knob = $knob
|
||||
@ -301,6 +346,45 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
$vmr.strip[$index].denoiser.knob = $knob
|
||||
$vmr.strip[$index].denoiser.knob | Should -Be $knob
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].Denoiser.Threshold" {
|
||||
$vmr.strip[$index].denoiser.threshold = $knob
|
||||
$vmr.strip[$index].denoiser.threshold | Should -Be $knob
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Pitch' -Skip:$ifNotPotato {
|
||||
It "Should set Strip[$index].Pitch.drywet" {
|
||||
$vmr.strip[$index].pitch.drywet = $slide
|
||||
$vmr.strip[$index].pitch.drywet | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].Pitch.pitchvalue" {
|
||||
$vmr.strip[$index].pitch.pitchvalue = $slide
|
||||
$vmr.strip[$index].pitch.pitchvalue | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].Pitch.loformant" {
|
||||
$vmr.strip[$index].pitch.loformant = $slide
|
||||
$vmr.strip[$index].pitch.loformant | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].Pitch.medformant" {
|
||||
$vmr.strip[$index].pitch.medformant = $slide
|
||||
$vmr.strip[$index].pitch.medformant | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].Pitch.hiformant" {
|
||||
$vmr.strip[$index].pitch.hiformant = $slide
|
||||
$vmr.strip[$index].pitch.hiformant | Should -Be $slide
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Audibility' -Skip:$ifNotBasic {
|
||||
It "Should set Strip[$index].Audibility" {
|
||||
$vmr.strip[$index].audibility.knob = $knob
|
||||
$vmr.strip[$index].audibility.knob | Should -Be $knob
|
||||
}
|
||||
}
|
||||
|
||||
Context 'EQ' -Skip:$ifNotPotato -ForEach @(
|
||||
@ -323,6 +407,53 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Strip, virtual only' -ForEach @(
|
||||
@{ Index = $virt_in }
|
||||
) {
|
||||
It "Should set Strip[$index].Pan_Y" {
|
||||
$vmr.strip[$index].pan_y = $xy05
|
||||
$vmr.strip[$index].pan_y | Should -Be $xy05
|
||||
}
|
||||
|
||||
Context 'EQ' {
|
||||
BeforeEach {
|
||||
$vmr.strip[$index].eqgain1 = 0
|
||||
$vmr.strip[$index].eqgain2 = 0
|
||||
$vmr.strip[$index].eqgain3 = 0
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].EQGain1 via alias 'bass'" {
|
||||
$vmr.strip[$index].bass = $slide
|
||||
$vmr.strip[$index].eqgain1 | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].EQGain1 via alias 'low'" {
|
||||
$vmr.strip[$index].low = $slide
|
||||
$vmr.strip[$index].eqgain1 | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].EQGain2 via alias 'mid'" {
|
||||
$vmr.strip[$index].mid = $slide
|
||||
$vmr.strip[$index].eqgain2 | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].EQGain2 via alias 'med'" {
|
||||
$vmr.strip[$index].med = $slide
|
||||
$vmr.strip[$index].eqgain2 | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].EQGain3 via alias 'treble'" {
|
||||
$vmr.strip[$index].treble = $slide
|
||||
$vmr.strip[$index].eqgain3 | Should -Be $slide
|
||||
}
|
||||
|
||||
It "Should set Strip[$index].EQGain3 via alias 'high'" {
|
||||
$vmr.strip[$index].high = $slide
|
||||
$vmr.strip[$index].eqgain3 | Should -Be $slide
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Bus, one physical one virtual' -ForEach @(
|
||||
@{ Index = $phys_out }, @{ Index = $virt_out }
|
||||
) {
|
||||
@ -362,18 +493,6 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
}
|
||||
|
||||
Describe 'Int Tests' -Tag 'int' {
|
||||
Context 'Strip, one physical, one virtual' -ForEach @(
|
||||
@{ Index = $phys_in }, @{ Index = $virt_in }
|
||||
) {
|
||||
It "Should set and get Strip[$index].Limit" -Skip:$ifBasic -ForEach @(
|
||||
@{ Value = 3; Expected = 3 }
|
||||
@{ Value = -6; Expected = -6 }
|
||||
) {
|
||||
$vmr.strip[$index].limit = $value
|
||||
$vmr.strip[$index].limit | Should -Be $expected
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Strip, physical only' -ForEach @(
|
||||
@{ Index = $phys_in }
|
||||
) {
|
||||
@ -395,6 +514,19 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Strip, second virtual' -Skip:$ifBasic -ForEach @(
|
||||
@{ Index = $phys_in + 2 }
|
||||
) {
|
||||
It "Should set Strip[$index].K via alias 'Karaoke'" -ForEach @(
|
||||
@{ Value = 0; Expected = 0 }
|
||||
@{ Value = 2; Expected = 2 }
|
||||
@{ Value = 4; Expected = 4 }
|
||||
) {
|
||||
$vmr.strip[$index].karaoke = $value
|
||||
$vmr.strip[$index].k | Should -Be $expected
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Bus, one physical one virtual' -ForEach @(
|
||||
@{ Index = $phys_out }, @{ Index = $virt_out }
|
||||
) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user