From 3c0a7c741a604e84858594e2345f2902db463c0e Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:43:10 +0100 Subject: [PATCH] add python.md, mwscroll_step Added PYTHON.md add mwscroll_step --- PYTHON.md | 8 ++++++++ README.md | 34 +++++++++++++++++----------------- __main__.py | 10 +++++++--- 3 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 PYTHON.md diff --git a/PYTHON.md b/PYTHON.md new file mode 100644 index 0000000..c5adb4f --- /dev/null +++ b/PYTHON.md @@ -0,0 +1,8 @@ +## Python Installation +If you don't have Python already you can fetch it easily from the Windows Store. Simply type `store` into the windows search bar, and select the latest version. At the time of writing that is Python 3.10. + +Remember to click 'Add Python to PATH' when installing, this is important. + +Once you have Python continue with installation instructions. If you don't have a GIT client you can simply download the source files directly with the green `Code` button, enter the downloaded directory and from Powershell, `pip install .` + +Now just run the `__main__.py` file with command `python .` or `pythonw .` diff --git a/README.md b/README.md index f77e6ae..28629e4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ## Prerequisites - Voicemeeter 1 (Basic), 2 (Banana) or 3 (Potato) - Python 3.9+ +![Don't have Python?](PYTHON.md) ## Installation ``` @@ -21,20 +22,20 @@ import voicemeeter import vmcompact -if __name__ == "__main__": - # choose the kind of Voicemeeter (Local connection) - kind_id = "banana" - - # hide can be used to enable/disable the Voicemeeter GUI - # if hidden the audio engine will still start and the app should work as normal - # but the main VM GUI will not display, - # nor will there be an icon in the taskbar. - voicemeeter.launch(kind_id, hide=False) - +def main(): # pass the kind_id and the vmr object to the app with voicemeeter.remote(kind_id) as vmr: app = vmcompact.connect(kind_id, vmr) app.mainloop() + + +if __name__ == "__main__": + # choose the kind of Voicemeeter (Local connection) + kind_id = "banana" + + voicemeeter.launch(kind_id, hide=False) + + main() ``` @@ -42,15 +43,11 @@ It's important to know that only labelled strips and buses will appear in the Ch ![Image of unlabelled app](nolabels.png) -If the GUI looks like the above when you first load it, then no channels are labelled. From the `menu->Profiles->Load Profile` you may load an example config. Save your current Voicemeeter settings first :). - -### kind_id -A *kind_id* specifies a major Voicemeeter version. This may be one of: -- `basic` -- `banana` -- `potato` +If the GUI looks like the above when you first load it, then no channels are labelled. From the menu, `Profiles->Load Profile` you may load an example config. Save your current Voicemeeter settings first :). ## Config Files +The following config files should be placed in the same directory as your `__main__.py`. + ### app.toml Configure certain startup states for the app. - `theme` @@ -62,6 +59,9 @@ Extending the app will show both strips and buses. In reduced mode only one or t - `channel` For each channel labelframe the width and height may be adjusted which effects the spacing between widgets and the length of the scales and progressbars respectively. +- `mwscroll_step` +Sets the amount (in db) the gain slider moves with a single mousewheel step. Default 3. + - `submixes` Select the default submix bus when Submix frame is shown. For example, a dedicated bus for OBS. diff --git a/__main__.py b/__main__.py index 280f7c5..9f62536 100644 --- a/__main__.py +++ b/__main__.py @@ -2,11 +2,15 @@ import voicemeeter import vmcompact +def main(): + with voicemeeter.remote(kind_id) as vmr: + app = vmcompact.connect(kind_id, vmr) + app.mainloop() + + if __name__ == "__main__": kind_id = "banana" voicemeeter.launch(kind_id, hide=False) - with voicemeeter.remote(kind_id) as vmr: - app = vmcompact.connect(kind_id, vmr) - app.mainloop() + main()