examples added to readme

This commit is contained in:
onyx-and-iris 2022-07-01 01:38:34 +01:00
parent 8103e06d69
commit ef5623f1c6

View File

@ -128,6 +128,7 @@ example:
```go ```go
vmRem.Strip[3].SetGain(3.7) vmRem.Strip[3].SetGain(3.7)
fmt.Println(vmRem.Strip[0].GetLabel()) fmt.Println(vmRem.Strip[0].GetLabel())
vmRem.Strip[4].SetA1(true)
``` ```
### Bus ### Bus
@ -146,6 +147,35 @@ The following functions are available
- `GetGain() float64` - `GetGain() float64`
- `SetGain(val float32)` from -60.0 to 12.0 - `SetGain(val float32)` from -60.0 to 12.0
```go
vmRem.Bus[3].SetEq(true)
fmt.Println(vmRem.Bus[0].GetLabel())
```
##### Modes
- `vmRem.Bus[i].Mode()`
The following functions are available
- `normal`: boolean
- `amix`: boolean
- `bmix`: boolean
- `composite`: boolean
- `tvmix`: boolean
- `upmix21`: boolean
- `upmix41`: boolean
- `upmix61`: boolean
- `centeronly`: boolean
- `lfeonly`: boolean
- `rearonly`: boolean
example:
```go
vmRem.Bus[3].Mode().SetAmix(true)
```
### Button ### Button
The following functions are available The following functions are available
@ -157,15 +187,29 @@ The following functions are available
- `GetTrigger() bool` - `GetTrigger() bool`
- `SetTrigger(val bool)` - `SetTrigger(val bool)`
example:
```go
vmRem.Button[37].SetState(true)
fmt.Println(vmRem.Button[64].GetStateOnly())
```
### Command ### Command
The following functions are available The following functions are available
- `Show()` - `Show()` Show Voicemeeter GUI if it's hidden
- `Hide()` - `Hide()` Hide Voicemeeter GUI if it's shown
- `Shutdown()` - `Shutdown()` Shuts down the GUI
- `Restart()` - `Restart()` Restart the audio engine
- `Lock(val bool)` - `Lock(val bool)` Lock the Voicemeeter GUI
example:
```go
vmRem.Command.Restart()
vmRem.Command.Show()
```
### VBAN ### VBAN
@ -196,6 +240,19 @@ The following functions are available
- `GetRoute() int` - `GetRoute() int`
- `SetRoute(val int)` from 0 to 8 - `SetRoute(val int)` from 0 to 8
example:
```go
# turn VBAN on
vmRem.Vban.Enable()
// turn on vban instream 0
vmRem.Vban.InStream[0].SetOn(true)
// set bit property for outstream 3 to 24
vmRem.Vban.OutStream[3].SetBit(24)
```
### Device ### Device
The following functions are available The following functions are available
@ -205,6 +262,14 @@ The following functions are available
- `Input(val int)` - `Input(val int)`
- `Output(val int)` - `Output(val int)`
example:
```go
for i := 0; i < int(vmRem.Device.Ins()); i++ {
fmt.Println(vmRem.Device.Input(i))
}
```
### Recorder ### Recorder
The following functions are available The following functions are available
@ -217,6 +282,19 @@ The following functions are available
- `Ff()` - `Ff()`
- `Rew()` - `Rew()`
example:
```go
vmRem.Recorder.Play()
vmRem.Recorder.Stop()
# Enable loop play
vmRem.Recorder.Loop(true)
# Disable recorder out channel B2
vmRem.Recorder.SetB2(false)
```
### Run tests ### Run tests
To run all tests: To run all tests: