section 0.2.0 added to CHANGELOG

README updated, use section added.

default config.toml dir updated
This commit is contained in:
onyx-and-iris 2024-11-03 15:47:54 +00:00
parent 0852b61eea
commit 41be07666c
2 changed files with 77 additions and 48 deletions

View File

@ -11,6 +11,18 @@ Before any major/minor/patch bump all unit tests will be run to verify they pass
- [x]
# [0.2.0] - 2024-10-27
### Added
- `config` flag (shorthand `C`), you may now specify a custom config directory. It defaults to `home directory / .config / vbantxt_cli /`.
- please note, the default directory has changed from v0.1.0
### Changed
- Behaviour change: if any one of `"host", "h", "port", "p", "streamname", "s"` flags are passed then the config file will be ignored.
- `delay` flag changed to `ratelimit` (shorthand `r`). It defaults to 20ms.
# [0.1.0] - 2024-06-28
### Added

View File

@ -1,41 +1,69 @@
![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)
# VBAN Sendtext CLI Utility
# VBAN Sendtext
Send Voicemeeter string requests over a network or to Matrix
Send Voicemeeter/Matrix vban requests.
For an outline of past/future changes refer to: [CHANGELOG](CHANGELOG.md)
## `Tested against`
## Tested against
- Basic 1.1.1.1
- Banana 2.1.1.1
- Potato 3.1.1.1
- Basic 1.0.8.4
- Banana 2.0.6.4
- Potato 3.0.2.4
- Matrix 1.0.0.3
## `Requirements`
## Requirements
- [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`)
---
## `Use`
`go get github.com/onyx-and-iris/vbantxt`
```go
package main
import (
"log"
"github.com/onyx-and-iris/vbantxt"
)
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`
#### Flags
- `host` defaults to "localhost"
- `port` defaults to 6980
- `streamname` defaults to "Command1"
Pass `host`, `port` and `streamname` as flags, for example:
```
vbantxt-cli -h="gamepc.local" -p=6980 -s=Command1 "strip[0].mute=1 strip[1].mono=1"
```
You may also store them in a `config.toml` located in `home directory / .vbantxt_cli /`
You may also store them in a `config.toml` located in `home directory / .config / vbantxt_cli /`
A valid `config.toml` might look like this:
@ -46,22 +74,14 @@ Port=6980
Streamname="Command1"
```
- `host` defaults to "localhost"
- `port` defaults to 6980
- `streamname` defaults to "Command1"
Command line flags will override values in a config.toml.
---
## `Matrix`
Sending commands to VB-Audio Matrix is also possible, for example:
```
vbantxt-cli -s=streamname "Point(ASIO128.IN[2],ASIO128.OUT[1]).dBGain = -8"
```
A documentation of all available Matrix instructions can be found on the [Voicemeeter forum][matrix-commands].
---
## `Script files`
The vbantxt-cli utility accepts a single string request or an array of string requests. This means you can pass scripts stored in files.
@ -74,7 +94,7 @@ Or with Bash:
`cat script.txt | xargs vbantxt-cli`
to load Voicemeeter commands from a file:
to load commands from a file:
```
strip[0].mute=1;strip[0].mono=0
@ -82,25 +102,22 @@ strip[1].mute=0;strip[1].mono=1
bus[3].eq.On=0
```
or for Matrix:
---
## `Matrix`
Sending commands to VB-Audio Matrix is also possible, for example:
```
Point(ASIO128.IN[1..4],ASIO128.OUT[1]).dBGain = -3
Point(ASIO128.IN[1..4],ASIO128.OUT[2]).dBGain = -3
Point(ASIO128.IN[1..4],ASIO128.OUT[1]).Mute = 1
Point(ASIO128.IN[1..4],ASIO128.OUT[2]).Mute = 1
vbantxt-cli -s=streamname "Point(ASIO128.IN[2],ASIO128.OUT[1]).dBGain = -8"
```
---
## `Logging`
Pass the `-l` flag with an argument from 0 up to 6.
Log level may be set by passing the `-l` flag with a number from 0 up to 6 where
0 = Panic, 1 = Fatal, 2 = Error, 3 = Warning, 4 = Info, 5 = Debug, 6 = Trace
For example, to set the log level to Debug:
`vbantxt-cli.exe -l=5 "strip[0].mute=0"`
[matrix-commands]: https://forum.vb-audio.com/viewtopic.php?t=1883&sid=9802ac9ddd9beff9475611d52a2164ba
Log level defaults to Warning level.