mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 13:20:47 +00:00
rewording in readme
This commit is contained in:
parent
ca34a6a12b
commit
581939d3f0
51
README.md
51
README.md
@ -1,23 +1,26 @@
|
|||||||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/onyx-and-iris/voicemeeter-api-powershell/blob/dev/LICENSE)
|
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/onyx-and-iris/voicemeeter-api-powershell/blob/dev/LICENSE)
|
||||||
|
|
||||||
# Powershell Wrapper for Voicemeeter API
|
# Powershell Wrapper for Voicemeeter API
|
||||||
A simple wrapper in Powershell to the Voicemeeter API.
|
|
||||||
|
This module offers a Powershell interface for the Voicemeeter Remote C API.
|
||||||
|
|
||||||
For past/future changes to this project refer to: [CHANGELOG](CHANGELOG.md)
|
For past/future changes to this project refer to: [CHANGELOG](CHANGELOG.md)
|
||||||
|
|
||||||
## Tested against
|
## Tested against
|
||||||
|
|
||||||
- Basic 1.0.8.1
|
- Basic 1.0.8.1
|
||||||
- Banana 2.0.6.1
|
- Banana 2.0.6.1
|
||||||
- Potato 3.0.2.1
|
- Potato 3.0.2.1
|
||||||
|
|
||||||
You may have success with many commands in earlier versions but some commands
|
|
||||||
(example Macrobuttons) were only added to the API in later releases.
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
- Voicemeeter: https://voicemeeter.com/
|
|
||||||
|
- [Voicemeeter](https://voicemeeter.com/)
|
||||||
- Powershell 5.1
|
- Powershell 5.1
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
#### PowerShellGet:
|
#### PowerShellGet:
|
||||||
|
|
||||||
In Powershell as admin:
|
In Powershell as admin:
|
||||||
|
|
||||||
`Install-Module Voicemeeter`
|
`Install-Module Voicemeeter`
|
||||||
@ -31,19 +34,23 @@ You may be asked to install NuGet provider required by PowerShellGet if you don'
|
|||||||
When prompted you will need to accept PSGallery as a trusted repository.
|
When prompted you will need to accept PSGallery as a trusted repository.
|
||||||
|
|
||||||
More Info:
|
More Info:
|
||||||
|
|
||||||
- [PowerShellGet](https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.1)
|
- [PowerShellGet](https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.1)
|
||||||
- [NuGet](https://www.powershellgallery.com/packages/NuGet/1.3.3)
|
- [NuGet](https://www.powershellgallery.com/packages/NuGet/1.3.3)
|
||||||
- [PSGallery](https://docs.microsoft.com/en-gb/powershell/scripting/gallery/overview?view=powershell-7.1)
|
- [PSGallery](https://docs.microsoft.com/en-gb/powershell/scripting/gallery/overview?view=powershell-7.1)
|
||||||
|
|
||||||
#### Direct download:
|
#### Direct download:
|
||||||
|
|
||||||
`git clone https://github.com/onyx-and-iris/voicemeeter-api-powershell.git`
|
`git clone https://github.com/onyx-and-iris/voicemeeter-api-powershell.git`
|
||||||
|
|
||||||
All examples in this readme assume you've installed as a module.
|
All examples in this readme assume you've installed as a module.
|
||||||
If you decide to direct download see [alternative instructions](FROM_SOURCE.md).
|
If you decide to direct download see [alternative instructions](FROM_SOURCE.md).
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
|
|
||||||
When you instantiate Remote class you will automatically be logged in. Use a
|
When you instantiate Remote class you will automatically be logged in. Use a
|
||||||
try finally block to ensure you logout at the end of your code.
|
try finally block to ensure you logout at the end of your code.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Import-Module Voicemeeter
|
Import-Module Voicemeeter
|
||||||
|
|
||||||
@ -65,12 +72,15 @@ finally { $vmr.Logout() }
|
|||||||
```
|
```
|
||||||
|
|
||||||
Voicemeeter factory function can be:
|
Voicemeeter factory function can be:
|
||||||
|
|
||||||
- Get-RemoteBasic
|
- Get-RemoteBasic
|
||||||
- Get-RemoteBanana
|
- Get-RemoteBanana
|
||||||
- Get-RemotePotato
|
- Get-RemotePotato
|
||||||
|
|
||||||
### Strip
|
### Strip
|
||||||
|
|
||||||
The following strip commands are available:
|
The following strip commands are available:
|
||||||
|
|
||||||
- mute: bool
|
- mute: bool
|
||||||
- mono: bool
|
- mono: bool
|
||||||
- mc: bool
|
- mc: bool
|
||||||
@ -97,13 +107,15 @@ gainlayers defined for Potato version only.
|
|||||||
mc, k for virtual strips only.
|
mc, k for virtual strips only.
|
||||||
|
|
||||||
### Bus
|
### Bus
|
||||||
|
|
||||||
The following bus commands are available:
|
The following bus commands are available:
|
||||||
|
|
||||||
- mute: bool
|
- mute: bool
|
||||||
- mono: bool
|
- mono: bool
|
||||||
- eq: bool
|
- eq: bool
|
||||||
- limit: int, from -40 to 12
|
- limit: int, from -40 to 12
|
||||||
- gain: float, from -60 to 12
|
- gain: float, from -60 to 12
|
||||||
- mode_: bool, any of the following:
|
- mode\_: bool, any of the following:
|
||||||
@('normal', 'amix', 'bmix', 'repeat', 'composite', 'tvmix', 'upmix21',
|
@('normal', 'amix', 'bmix', 'repeat', 'composite', 'tvmix', 'upmix21',
|
||||||
'upmix41', 'upmix61', 'centeronly', 'lfeonly', 'rearonly')
|
'upmix41', 'upmix61', 'centeronly', 'lfeonly', 'rearonly')
|
||||||
|
|
||||||
@ -114,7 +126,9 @@ $vmr.bus[3].mode_repeat = $true
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Macrobuttons
|
### Macrobuttons
|
||||||
|
|
||||||
Three modes defined: state, stateonly and trigger.
|
Three modes defined: state, stateonly and trigger.
|
||||||
|
|
||||||
- State runs associated scripts
|
- State runs associated scripts
|
||||||
- Stateonly does not run associated scripts
|
- Stateonly does not run associated scripts
|
||||||
- Index range (0, 69)
|
- Index range (0, 69)
|
||||||
@ -128,9 +142,11 @@ $vmr.button[5].trigger = $true
|
|||||||
```
|
```
|
||||||
|
|
||||||
### VBAN
|
### VBAN
|
||||||
|
|
||||||
- vmr.vban.enable: Toggle VBAN on or off. Accepts a boolean value.
|
- vmr.vban.enable: Toggle VBAN on or off. Accepts a boolean value.
|
||||||
|
|
||||||
For each vban in/out stream the following parameters are defined:
|
For each vban in/out stream the following parameters are defined:
|
||||||
|
|
||||||
- on: boolean
|
- on: boolean
|
||||||
- name: string
|
- name: string
|
||||||
- ip: string
|
- ip: string
|
||||||
@ -145,6 +161,7 @@ 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.
|
to those parameters will throw an error. They are read and write for outstreams.
|
||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$vmr.vban.enable = $true
|
$vmr.vban.enable = $true
|
||||||
|
|
||||||
@ -154,19 +171,23 @@ $vmr.vban.outstream[3].bit = 16
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Command
|
### Command
|
||||||
|
|
||||||
Certain 'special' commands are defined by the API as performing actions rather than setting values.
|
Certain 'special' commands are defined by the API as performing actions rather than setting values.
|
||||||
|
|
||||||
The following methods are available:
|
The following methods are available:
|
||||||
|
|
||||||
- show
|
- show
|
||||||
- hide
|
- hide
|
||||||
- restart
|
- restart
|
||||||
- shutdown
|
- shutdown
|
||||||
|
|
||||||
The following properties are write only and accept boolean values:
|
The following properties are write only and accept boolean values:
|
||||||
|
|
||||||
- showvbanchat
|
- showvbanchat
|
||||||
- lock
|
- lock
|
||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$vmr.command.show
|
$vmr.command.show
|
||||||
|
|
||||||
@ -174,7 +195,9 @@ $vmr.command.lock = $true
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Recorder
|
### Recorder
|
||||||
|
|
||||||
The following methods are available:
|
The following methods are available:
|
||||||
|
|
||||||
- play
|
- play
|
||||||
- stop
|
- stop
|
||||||
- pause
|
- pause
|
||||||
@ -183,11 +206,13 @@ The following methods are available:
|
|||||||
- rw
|
- rw
|
||||||
|
|
||||||
The following properties accept boolean values.
|
The following properties accept boolean values.
|
||||||
|
|
||||||
- loop
|
- loop
|
||||||
- A1 - A5
|
- A1 - A5
|
||||||
- B1 - B3
|
- B1 - B3
|
||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$vmr.recorder.play
|
$vmr.recorder.play
|
||||||
|
|
||||||
@ -195,7 +220,9 @@ $vmr.recorder.loop = $true
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Multiple parameters
|
### Multiple parameters
|
||||||
|
|
||||||
Set many strip/bus/macrobutton/vban parameters at once, for Example
|
Set many strip/bus/macrobutton/vban parameters at once, for Example
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Import-Module Voicemeeter
|
Import-Module Voicemeeter
|
||||||
|
|
||||||
@ -220,16 +247,20 @@ finally { $vmr.Logout() }
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Remote class
|
### Remote class
|
||||||
|
|
||||||
Access to lower level Getters and Setters are provided with these functions:
|
Access to lower level Getters and Setters are provided with these functions:
|
||||||
|
|
||||||
- `$vmr.Getter(param)`: For getting the value of a parameter expected to return a value other than string.
|
- `$vmr.Getter(param)`: For getting the value of a parameter expected to return a value other than string.
|
||||||
- `$vmr.Getter_String(param)`: For getting the value of any parameter expected to return a string.
|
- `$vmr.Getter_String(param)`: For getting the value of any parameter expected to return a string.
|
||||||
- `$vmr.Setter(param, value)`: For setting the value of any parameter.
|
- `$vmr.Setter(param, value)`: For setting the value of any parameter.
|
||||||
|
|
||||||
Access to lower level polling functions are provided with these functions:
|
Access to lower level polling functions are provided with these functions:
|
||||||
|
|
||||||
- `$vmr.PDirty`: Returns true if a parameter has been updated.
|
- `$vmr.PDirty`: Returns true if a parameter has been updated.
|
||||||
- `$vmr.MDirty`: Returns true if a macrobutton has been updated.
|
- `$vmr.MDirty`: Returns true if a macrobutton has been updated.
|
||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$vmr.Getter('Strip[2].Mute')
|
$vmr.Getter('Strip[2].Mute')
|
||||||
$vmr.Getter_String('Bus[1].Label')
|
$vmr.Getter_String('Bus[1].Label')
|
||||||
@ -238,9 +269,11 @@ $vmr.Setter('Strip[0].Gain', -3.6)
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Config Files
|
### Config Files
|
||||||
|
|
||||||
`$vmr.Set_Profile('config')`
|
`$vmr.Set_Profile('config')`
|
||||||
|
|
||||||
You may load config files in psd1 format. An example profile has been included with the package. Remember to save current settings before loading a profile. To test simply rename _profiles directory to profiles. It will be loaded into memory but not set. To set one you may do:
|
You may load config files in psd1 format. An example profile has been included with the package. Remember to save current settings before loading a profile. To test simply rename \_profiles directory to profiles. It will be loaded into memory but not set. To set one you may do:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Import-Module Voicemeeter
|
Import-Module Voicemeeter
|
||||||
try {
|
try {
|
||||||
@ -249,10 +282,13 @@ try {
|
|||||||
}
|
}
|
||||||
finally { $vmr.Logout() }
|
finally { $vmr.Logout() }
|
||||||
```
|
```
|
||||||
|
|
||||||
will load a config file at profiles/banana/config.psd1 for Voicemeeter Banana.
|
will load a config file at profiles/banana/config.psd1 for Voicemeeter Banana.
|
||||||
|
|
||||||
### Run tests
|
### Run tests
|
||||||
|
|
||||||
Run tests using .\runall.ps1 which accepts two parameters:
|
Run tests using .\runall.ps1 which accepts two parameters:
|
||||||
|
|
||||||
- tag Run tests of this type
|
- tag Run tests of this type
|
||||||
- num Run this number of tests
|
- num Run this number of tests
|
||||||
|
|
||||||
@ -264,4 +300,5 @@ Example:
|
|||||||
Results will be logged and summary file written.
|
Results will be logged and summary file written.
|
||||||
|
|
||||||
### Official Documentation
|
### Official Documentation
|
||||||
|
|
||||||
- [Voicemeeter Remote C API](https://forum.vb-audio.com/viewtopic.php?f=8&t=346)
|
- [Voicemeeter Remote C API](https://forum.vb-audio.com/viewtopic.php?f=8&t=346)
|
||||||
|
Loading…
Reference in New Issue
Block a user