2022-11-05 19:27:16 +00:00
|
|
|
![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)
|
|
|
|
![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)
|
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
# VBAN Sendtext
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
Send Voicemeeter/Matrix vban requests.
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-06-28 06:56:45 +01:00
|
|
|
For an outline of past/future changes refer to: [CHANGELOG](CHANGELOG.md)
|
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
## Tested against
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
- Basic 1.0.8.4
|
|
|
|
- Banana 2.0.6.4
|
|
|
|
- Potato 3.0.2.4
|
|
|
|
- Matrix 1.0.0.3
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
## Requirements
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
- [Voicemeeter](https://voicemeeter.com/) or [Matrix](https://vb-audio.com/Matrix/)
|
|
|
|
- Go 1.18 or greater (if you want to compile yourself, otherwise check `Releases`)
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2022-11-06 07:37:30 +00:00
|
|
|
---
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
## `Use`
|
|
|
|
|
|
|
|
`go get github.com/onyx-and-iris/vbantxt`
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
"github.com/onyx-and-iris/vbantxt"
|
|
|
|
)
|
2024-06-28 19:53:02 +01:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
func main() {
|
|
|
|
var (
|
|
|
|
host string = "vm.local"
|
|
|
|
port int = 6980
|
|
|
|
streamname string = "onyx"
|
|
|
|
)
|
|
|
|
|
|
|
|
vbantxtClient, err := vbantxt.New(host, port, streamname)
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
defer vbantxtClient.Close()
|
|
|
|
|
|
|
|
err = vbantxtClient.Send("strip[0].mute=0")
|
|
|
|
if err != nil {
|
|
|
|
_, _ = fmt.Fprintf(os.Stderr, "Error: %s", err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## `Command Line`
|
2024-06-28 19:53:02 +01:00
|
|
|
|
2022-11-05 18:58:36 +00:00
|
|
|
Pass `host`, `port` and `streamname` as flags, for example:
|
|
|
|
|
2022-11-06 07:37:30 +00:00
|
|
|
```
|
|
|
|
vbantxt-cli -h="gamepc.local" -p=6980 -s=Command1 "strip[0].mute=1 strip[1].mono=1"
|
|
|
|
```
|
2022-11-05 18:58:36 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
You may also store them in a `config.toml` located in `home directory / .config / vbantxt_cli /`
|
2022-11-05 18:58:36 +00:00
|
|
|
|
|
|
|
A valid `config.toml` might look like this:
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[connection]
|
|
|
|
Host="gamepc.local"
|
2022-11-05 19:33:26 +00:00
|
|
|
Port=6980
|
2022-11-05 18:58:36 +00:00
|
|
|
Streamname="Command1"
|
|
|
|
```
|
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
- `host` defaults to "localhost"
|
|
|
|
- `port` defaults to 6980
|
|
|
|
- `streamname` defaults to "Command1"
|
2022-11-06 07:37:30 +00:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
Command line flags will override values in a config.toml.
|
2024-06-28 20:18:56 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-11-06 07:37:30 +00:00
|
|
|
## `Script files`
|
2022-11-05 18:58:36 +00:00
|
|
|
|
|
|
|
The vbantxt-cli utility accepts a single string request or an array of string requests. This means you can pass scripts stored in files.
|
|
|
|
|
|
|
|
For example, in Windows with Powershell you could:
|
|
|
|
|
|
|
|
`vbantxt-cli $(Get-Content .\script.txt)`
|
|
|
|
|
2022-11-05 19:27:16 +00:00
|
|
|
Or with Bash:
|
|
|
|
|
|
|
|
`cat script.txt | xargs vbantxt-cli`
|
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
to load commands from a file:
|
2022-11-05 18:58:36 +00:00
|
|
|
|
|
|
|
```
|
2022-11-06 07:47:25 +00:00
|
|
|
strip[0].mute=1;strip[0].mono=0
|
|
|
|
strip[1].mute=0;strip[1].mono=1
|
|
|
|
bus[3].eq.On=0
|
2022-11-05 18:58:36 +00:00
|
|
|
```
|
2024-06-28 06:51:10 +01:00
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
## `Matrix`
|
|
|
|
|
|
|
|
Sending commands to VB-Audio Matrix is also possible, for example:
|
2024-06-28 06:51:10 +01:00
|
|
|
|
|
|
|
```
|
2024-11-03 15:47:54 +00:00
|
|
|
vbantxt-cli -s=streamname "Point(ASIO128.IN[2],ASIO128.OUT[1]).dBGain = -8"
|
2024-06-28 06:51:10 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## `Logging`
|
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
Log level may be set by passing the `-l` flag with a number from 0 up to 6 where
|
2024-06-28 06:51:10 +01:00
|
|
|
|
|
|
|
0 = Panic, 1 = Fatal, 2 = Error, 3 = Warning, 4 = Info, 5 = Debug, 6 = Trace
|
|
|
|
|
2024-11-03 15:47:54 +00:00
|
|
|
Log level defaults to Warning level.
|