From 9a239bc0618b90ba9d58b4c1b60ccf20c2bba725 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Thu, 16 Jun 2022 16:56:45 +0100 Subject: [PATCH] add example configs. move config files section in readme add example configs. move config files section in readme --- README.md | 33 +++++++++++++++--------------- configs/banana/config.toml | 35 +++++++++++++++++++++++++++++++ configs/basic/config.toml | 17 +++++++++++++++ configs/potato/config.toml | 42 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+), 17 deletions(-) create mode 100644 configs/banana/config.toml create mode 100644 configs/basic/config.toml create mode 100644 configs/potato/config.toml diff --git a/README.md b/README.md index c5cc2c5..465597a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ Install voicemeeter-api package from your console `pip install voicemeeter-api` - ## `Use` Simplest use case, use a context manager to request a Remote class of a kind. @@ -248,6 +247,22 @@ vm.strip[0].apply(mute: true, gain: 3.2, A1: true) vm.vban.outstream[0].apply(on: true, name: 'streamname', bit: 24) ``` +## Config Files + +`vm.apply_config('config')` + +You may load config files in TOML format. +Three example profiles have been included with the package. Remember to save +current settings before loading a profile. To set one you may do: + +```python +import voicemeeterlib +with voicemeeterlib.api('banana') as vm: + vm.apply_config('config') +``` + +will load a config file at configs/banana/config.toml for Voicemeeter Banana. + ## `Base Module` ### Remote class @@ -271,22 +286,6 @@ vm.set('Strip[4].Label', 'stripname') vm.set('Strip[0].Gain', -3.6) ``` -## Config Files - -`vm.apply_config('config')` - -You may load config files in TOML format. -Three example profiles have been included with the package. Remember to save -current settings before loading a profile. To set one you may do: - -```python -import voicemeeterlib -with voicemeeterlib.api('banana') as vm: - vm.apply_profile('config') -``` - -will load a config file at configs/banana/config.toml for Voicemeeter Banana. - ### Run tests To run all tests: diff --git a/configs/banana/config.toml b/configs/banana/config.toml new file mode 100644 index 0000000..02cde87 --- /dev/null +++ b/configs/banana/config.toml @@ -0,0 +1,35 @@ +[strip-0] +limit = 12 +label = "" + +[strip-1] +A1 = true +A2 = true +A3 = true +B1 = true +B2 = true +mono = true +solo = true +mute = true +limit = 12 +label = "" + +[strip-2] +limit = 12 +label = "" + +[strip-3] +limit = 12 +label = "" + +[strip-4] +A1 = false +A2 = false +A3 = false +B1 = false +B2 = false +k = false +solo = false +mute = false +limit = 12 +label = "" diff --git a/configs/basic/config.toml b/configs/basic/config.toml new file mode 100644 index 0000000..06160a6 --- /dev/null +++ b/configs/basic/config.toml @@ -0,0 +1,17 @@ +[strip-0] +A1 = true +B1 = true +mono = true +solo = true +mute = true +limit = 12 +label = "" + +[strip-1] +A1 = false +B1 = false +mono = false +solo = false +mute = false +limit = 12 +label = "" diff --git a/configs/potato/config.toml b/configs/potato/config.toml new file mode 100644 index 0000000..5253d74 --- /dev/null +++ b/configs/potato/config.toml @@ -0,0 +1,42 @@ +[strip-0] +limit = 12 +label = "" + +[strip-1] +limit = 12 +label = "" + +[strip-2] +A1 = true +A2 = true +A3 = true +A4 = true +A5 = true +B1 = true +B2 = true +B3 = true +mono = true +solo = true +mute = true +limit = 12 +label = "" + +[strip-3] +limit = 12 +label = "" + +[strip-4] +limit = 12 +label = "" + +[strip-5] +limit = 12 +label = "" + +[strip-6] +limit = 12 +label = "" + +[strip-7] +limit = 12 +label = ""