Compare commits

...

5 Commits

24 changed files with 1453 additions and 1505 deletions

12
.gitignore vendored
View File

@ -85,7 +85,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@ -161,14 +161,8 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# nvda files
controllerClient/*
!.gitkeep
# build files
basic.py
banana.py
potato.py
# spec files
spec/
# persistent storage
settings.json

View File

@ -1,6 +1,4 @@
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
# NVDA Voicemeeter
@ -29,19 +27,17 @@ cd nvda-voicemeeter
pip install .
```
Then download the [Controller Client][controller_client] and place the dll files into the directory `controllerClient`.
Your directory structure should look like this:
The [Controller Client][controller_client] files are included with the source files. If you decide to download them yourself make sure you keep the directory structure as follows:
├── `controllerClient/`
        ├── `x64/`
                ├── nvdaControllerClient64.dll
                ├── nvdaControllerClient.dll
        ├── `x86/`
                ├── nvdaControllerClient32.dll
                ├── nvdaControllerClient.dll
#### `From Releases`
@ -56,7 +52,7 @@ import voicemeeterlib
import nvda_voicemeeter
KIND_ID = "potato"
KIND_ID = 'potato'
with voicemeeterlib.api(KIND_ID) as vm:
with nvda_voicemeeter.draw(KIND_ID, vm) as window:

View File

@ -2,18 +2,21 @@ function Compress-Builds {
$target = Join-Path -Path $PSScriptRoot -ChildPath "dist"
@("basic", "banana", "potato") | ForEach-Object {
Compress-Archive -Path $(Join-Path -Path $target -ChildPath $_) -DestinationPath $(Join-Path -Path $target -ChildPath "${_}.zip") -Force
}
}
}
function Get-Builds {
@("basic", "banana", "potato") | ForEach-Object {
pdm run pyinstaller "${_}.spec" --noconfirm
}
$specName = $_
Write-Host "building $specName"
pdm run pyinstaller --noconfirm --distpath (Join-Path -Path "dist" -ChildPath $specName) (Join-Path -Path "spec" -ChildPath "${specName}.spec")
}
}
function main {
Get-Builds
Compress-Builds
}

Binary file not shown.

Binary file not shown.

301
pdm.lock generated
View File

@ -2,10 +2,13 @@
# It is not intended for manual editing.
[metadata]
groups = ["default", "build", "lint"]
strategy = ["cross_platform", "inherit_metadata"]
lock_version = "4.4.2"
content_hash = "sha256:24da3456e709ca07cb83968d98b9e0b1ce533bf153076cc16bc34c66e047a70c"
groups = ["default", "build", "format"]
strategy = ["inherit_metadata"]
lock_version = "4.5.0"
content_hash = "sha256:177dea67a7eadb6b161d3ac62fb09415d2d4f295c59914a9c5d0cbef7f0a5b65"
[[metadata.targets]]
requires_python = ">=3.10,<3.13"
[[package]]
name = "altgraph"
@ -17,68 +20,14 @@ files = [
{file = "altgraph-0.17.4.tar.gz", hash = "sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406"},
]
[[package]]
name = "black"
version = "24.4.2"
requires_python = ">=3.8"
summary = "The uncompromising code formatter."
groups = ["lint"]
dependencies = [
"click>=8.0.0",
"mypy-extensions>=0.4.3",
"packaging>=22.0",
"pathspec>=0.9.0",
"platformdirs>=2",
"tomli>=1.1.0; python_version < \"3.11\"",
"typing-extensions>=4.0.1; python_version < \"3.11\"",
]
files = [
{file = "black-24.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce"},
{file = "black-24.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021"},
{file = "black-24.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063"},
{file = "black-24.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96"},
{file = "black-24.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474"},
{file = "black-24.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c"},
{file = "black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb"},
{file = "black-24.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1"},
{file = "black-24.4.2-py3-none-any.whl", hash = "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c"},
{file = "black-24.4.2.tar.gz", hash = "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d"},
]
[[package]]
name = "click"
version = "8.1.7"
requires_python = ">=3.7"
summary = "Composable command line interface toolkit"
groups = ["lint"]
dependencies = [
"colorama; platform_system == \"Windows\"",
]
files = [
{file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"},
{file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"},
]
[[package]]
name = "colorama"
version = "0.4.6"
requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
summary = "Cross-platform colored terminal text."
groups = ["lint"]
marker = "platform_system == \"Windows\""
files = [
{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
]
[[package]]
name = "freesimplegui"
version = "5.1.0"
version = "5.1.1"
summary = "The free-forever Python GUI framework."
groups = ["default"]
files = [
{file = "FreeSimpleGUI-5.1.0-py3-none-any.whl", hash = "sha256:9dee6408bc0df2d30327f775e5e61160085f63d0d1c2f41f83d00cb250e507c2"},
{file = "freesimplegui-5.1.0.tar.gz", hash = "sha256:2be084404bac9675a3082df8eb8cea4872121f166fc37298081203961618268f"},
{file = "FreeSimpleGUI-5.1.1-py3-none-any.whl", hash = "sha256:d7629d5c94b55264d119bd2a89f52667d863ea7914d808e619aea29922ff842e"},
{file = "freesimplegui-5.1.1.tar.gz", hash = "sha256:2f0946c7ac221c997929181cbe7526e342fff5fc291a26d1d726287a5dd964fb"},
]
[[package]]
@ -95,63 +44,15 @@ files = [
{file = "macholib-1.16.3.tar.gz", hash = "sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30"},
]
[[package]]
name = "mypy"
version = "1.10.1"
requires_python = ">=3.8"
summary = "Optional static typing for Python"
groups = ["lint"]
dependencies = [
"mypy-extensions>=1.0.0",
"tomli>=1.1.0; python_version < \"3.11\"",
"typing-extensions>=4.1.0",
]
files = [
{file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"},
{file = "mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7"},
{file = "mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a"},
{file = "mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9"},
{file = "mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d"},
{file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"},
{file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"},
{file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"},
{file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"},
{file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"},
{file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"},
{file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"},
]
[[package]]
name = "mypy-extensions"
version = "1.0.0"
requires_python = ">=3.5"
summary = "Type system extensions for programs checked with the mypy type checker."
groups = ["lint"]
files = [
{file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
{file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
]
[[package]]
name = "packaging"
version = "24.1"
version = "24.2"
requires_python = ">=3.8"
summary = "Core utilities for Python packages"
groups = ["build", "lint"]
groups = ["build"]
files = [
{file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"},
{file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"},
]
[[package]]
name = "pathspec"
version = "0.12.1"
requires_python = ">=3.8"
summary = "Utility library for gitignore style pattern matching of file paths."
groups = ["lint"]
files = [
{file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"},
{file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"},
{file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"},
{file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"},
]
[[package]]
@ -166,156 +67,166 @@ files = [
{file = "pefile-2023.2.7.tar.gz", hash = "sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc"},
]
[[package]]
name = "platformdirs"
version = "4.2.2"
requires_python = ">=3.8"
summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`."
groups = ["lint"]
files = [
{file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"},
{file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"},
]
[[package]]
name = "pyinstaller"
version = "6.8.0"
requires_python = "<3.13,>=3.8"
version = "6.11.1"
requires_python = "<3.14,>=3.8"
summary = "PyInstaller bundles a Python application and all its dependencies into a single package."
groups = ["build"]
dependencies = [
"altgraph",
"importlib-metadata>=4.6; python_version < \"3.10\"",
"macholib>=1.8; sys_platform == \"darwin\"",
"packaging>=22.0",
"pefile>=2022.5.30; sys_platform == \"win32\"",
"pyinstaller-hooks-contrib>=2024.6",
"pefile!=2024.8.26,>=2022.5.30; sys_platform == \"win32\"",
"pyinstaller-hooks-contrib>=2024.9",
"pywin32-ctypes>=0.2.1; sys_platform == \"win32\"",
"setuptools>=42.0.0",
]
files = [
{file = "pyinstaller-6.8.0-py3-none-macosx_10_13_universal2.whl", hash = "sha256:5ff6bc2784c1026f8e2f04aa3760cbed41408e108a9d4cf1dd52ee8351a3f6e1"},
{file = "pyinstaller-6.8.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:39ac424d2ee2457d2ab11a5091436e75a0cccae207d460d180aa1fcbbafdd528"},
{file = "pyinstaller-6.8.0-py3-none-manylinux2014_i686.whl", hash = "sha256:355832a3acc7de90a255ecacd4b9f9e166a547a79c8905d49f14e3a75c1acdb9"},
{file = "pyinstaller-6.8.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:6303c7a009f47e6a96ef65aed49f41e36ece8d079b9193ca92fe807403e5fe80"},
{file = "pyinstaller-6.8.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2b71509468c811968c0b5decb5bbe85b6292ea52d7b1f26313d2aabb673fa9a5"},
{file = "pyinstaller-6.8.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ff31c5b99e05a4384bbe2071df67ec8b2b347640a375eae9b40218be2f1754c6"},
{file = "pyinstaller-6.8.0-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:000c36b13fe4cd8d0d8c2bc855b1ddcf39867b5adf389e6b5ca45b25fa3e619d"},
{file = "pyinstaller-6.8.0-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:fe0af018d7d5077180e3144ada89a4da5df8d07716eb7e9482834a56dc57a4e8"},
{file = "pyinstaller-6.8.0-py3-none-win32.whl", hash = "sha256:d257f6645c7334cbd66f38a4fac62c3ad614cc46302b2b5d9f8cc48c563bce0e"},
{file = "pyinstaller-6.8.0-py3-none-win_amd64.whl", hash = "sha256:81cccfa9b16699b457f4788c5cc119b50f3cd4d0db924955f15c33f2ad27a50d"},
{file = "pyinstaller-6.8.0-py3-none-win_arm64.whl", hash = "sha256:1c3060a263758cf7f0144ab4c016097b20451b2469d468763414665db1bb743d"},
{file = "pyinstaller-6.8.0.tar.gz", hash = "sha256:3f4b6520f4423fe19bcc2fd63ab7238851ae2bdcbc98f25bc5d2f97cc62012e9"},
{file = "pyinstaller-6.11.1-py3-none-macosx_10_13_universal2.whl", hash = "sha256:44e36172de326af6d4e7663b12f71dbd34e2e3e02233e181e457394423daaf03"},
{file = "pyinstaller-6.11.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:6d12c45a29add78039066a53fb05967afaa09a672426072b13816fe7676abfc4"},
{file = "pyinstaller-6.11.1-py3-none-manylinux2014_i686.whl", hash = "sha256:ddc0fddd75f07f7e423da1f0822e389a42af011f9589e0269b87e0d89aa48c1f"},
{file = "pyinstaller-6.11.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:0d6475559c4939f0735122989611d7f739ed3bf02f666ce31022928f7a7e4fda"},
{file = "pyinstaller-6.11.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:e21c7806e34f40181e7606926a14579f848bfb1dc52cbca7eea66eccccbfe977"},
{file = "pyinstaller-6.11.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:32c742a24fe65d0702958fadf4040f76de85859c26bec0008766e5dbabc5b68f"},
{file = "pyinstaller-6.11.1-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:208c0ef6dab0837a0a273ea32d1a3619a208e3d1fe3fec3785eea71a77fd00ce"},
{file = "pyinstaller-6.11.1-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:ad84abf465bcda363c1d54eafa76745d77b6a8a713778348377dc98d12a452f7"},
{file = "pyinstaller-6.11.1-py3-none-win32.whl", hash = "sha256:2e8365276c5131c9bef98e358fbc305e4022db8bedc9df479629d6414021956a"},
{file = "pyinstaller-6.11.1-py3-none-win_amd64.whl", hash = "sha256:7ac83c0dc0e04357dab98c487e74ad2adb30e7eb186b58157a8faf46f1fa796f"},
{file = "pyinstaller-6.11.1-py3-none-win_arm64.whl", hash = "sha256:35e6b8077d240600bb309ed68bb0b1453fd2b7ab740b66d000db7abae6244423"},
{file = "pyinstaller-6.11.1.tar.gz", hash = "sha256:491dfb4d9d5d1d9650d9507daec1ff6829527a254d8e396badd60a0affcb72ef"},
]
[[package]]
name = "pyinstaller-hooks-contrib"
version = "2024.7"
requires_python = ">=3.7"
version = "2025.0"
requires_python = ">=3.8"
summary = "Community maintained hooks for PyInstaller"
groups = ["build"]
dependencies = [
"importlib-metadata>=4.6; python_version < \"3.10\"",
"packaging>=22.0",
"setuptools>=42.0.0",
]
files = [
{file = "pyinstaller_hooks_contrib-2024.7-py2.py3-none-any.whl", hash = "sha256:8bf0775771fbaf96bcd2f4dfd6f7ae6c1dd1b1efe254c7e50477b3c08e7841d8"},
{file = "pyinstaller_hooks_contrib-2024.7.tar.gz", hash = "sha256:fd5f37dcf99bece184e40642af88be16a9b89613ecb958a8bd1136634fc9fac5"},
{file = "pyinstaller_hooks_contrib-2025.0-py3-none-any.whl", hash = "sha256:3c0623799c3f81a37293127f485d65894c20fd718f722cb588785a3e52581ad1"},
{file = "pyinstaller_hooks_contrib-2025.0.tar.gz", hash = "sha256:6dc0b55a1acaab2ffee36ed4a05b073aa0a22e46f25fb5c66a31e217454135ed"},
]
[[package]]
name = "pyparsing"
version = "3.1.2"
requires_python = ">=3.6.8"
version = "3.2.1"
requires_python = ">=3.9"
summary = "pyparsing module - Classes and methods to define and execute parsing grammars"
groups = ["default"]
files = [
{file = "pyparsing-3.1.2-py3-none-any.whl", hash = "sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742"},
{file = "pyparsing-3.1.2.tar.gz", hash = "sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad"},
{file = "pyparsing-3.2.1-py3-none-any.whl", hash = "sha256:506ff4f4386c4cec0590ec19e6302d3aedb992fdc02c761e90416f158dacf8e1"},
{file = "pyparsing-3.2.1.tar.gz", hash = "sha256:61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a"},
]
[[package]]
name = "pywin32-ctypes"
version = "0.2.2"
version = "0.2.3"
requires_python = ">=3.6"
summary = "A (partial) reimplementation of pywin32 using ctypes/cffi"
groups = ["build"]
marker = "sys_platform == \"win32\""
files = [
{file = "pywin32-ctypes-0.2.2.tar.gz", hash = "sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60"},
{file = "pywin32_ctypes-0.2.2-py3-none-any.whl", hash = "sha256:bf490a1a709baf35d688fe0ecf980ed4de11d2b3e37b51e5442587a75d9957e7"},
{file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"},
{file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"},
]
[[package]]
name = "ruff"
version = "0.5.0"
version = "0.9.2"
requires_python = ">=3.7"
summary = "An extremely fast Python linter and code formatter, written in Rust."
groups = ["lint"]
groups = ["format"]
files = [
{file = "ruff-0.5.0-py3-none-linux_armv6l.whl", hash = "sha256:ee770ea8ab38918f34e7560a597cc0a8c9a193aaa01bfbd879ef43cb06bd9c4c"},
{file = "ruff-0.5.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:38f3b8327b3cb43474559d435f5fa65dacf723351c159ed0dc567f7ab735d1b6"},
{file = "ruff-0.5.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7594f8df5404a5c5c8f64b8311169879f6cf42142da644c7e0ba3c3f14130370"},
{file = "ruff-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:adc7012d6ec85032bc4e9065110df205752d64010bed5f958d25dbee9ce35de3"},
{file = "ruff-0.5.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d505fb93b0fabef974b168d9b27c3960714d2ecda24b6ffa6a87ac432905ea38"},
{file = "ruff-0.5.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9dc5cfd3558f14513ed0d5b70ce531e28ea81a8a3b1b07f0f48421a3d9e7d80a"},
{file = "ruff-0.5.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:db3ca35265de239a1176d56a464b51557fce41095c37d6c406e658cf80bbb362"},
{file = "ruff-0.5.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b1a321c4f68809fddd9b282fab6a8d8db796b270fff44722589a8b946925a2a8"},
{file = "ruff-0.5.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2c4dfcd8d34b143916994b3876b63d53f56724c03f8c1a33a253b7b1e6bf2a7d"},
{file = "ruff-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81e5facfc9f4a674c6a78c64d38becfbd5e4f739c31fcd9ce44c849f1fad9e4c"},
{file = "ruff-0.5.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e589e27971c2a3efff3fadafb16e5aef7ff93250f0134ec4b52052b673cf988d"},
{file = "ruff-0.5.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d2ffbc3715a52b037bcb0f6ff524a9367f642cdc5817944f6af5479bbb2eb50e"},
{file = "ruff-0.5.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:cd096e23c6a4f9c819525a437fa0a99d1c67a1b6bb30948d46f33afbc53596cf"},
{file = "ruff-0.5.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:46e193b36f2255729ad34a49c9a997d506e58f08555366b2108783b3064a0e1e"},
{file = "ruff-0.5.0-py3-none-win32.whl", hash = "sha256:49141d267100f5ceff541b4e06552e98527870eafa1acc9dec9139c9ec5af64c"},
{file = "ruff-0.5.0-py3-none-win_amd64.whl", hash = "sha256:e9118f60091047444c1b90952736ee7b1792910cab56e9b9a9ac20af94cd0440"},
{file = "ruff-0.5.0-py3-none-win_arm64.whl", hash = "sha256:ed5c4df5c1fb4518abcb57725b576659542bdbe93366f4f329e8f398c4b71178"},
{file = "ruff-0.5.0.tar.gz", hash = "sha256:eb641b5873492cf9bd45bc9c5ae5320648218e04386a5f0c264ad6ccce8226a1"},
{file = "ruff-0.9.2-py3-none-linux_armv6l.whl", hash = "sha256:80605a039ba1454d002b32139e4970becf84b5fee3a3c3bf1c2af6f61a784347"},
{file = "ruff-0.9.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b9aab82bb20afd5f596527045c01e6ae25a718ff1784cb92947bff1f83068b00"},
{file = "ruff-0.9.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:fbd337bac1cfa96be615f6efcd4bc4d077edbc127ef30e2b8ba2a27e18c054d4"},
{file = "ruff-0.9.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82b35259b0cbf8daa22a498018e300b9bb0174c2bbb7bcba593935158a78054d"},
{file = "ruff-0.9.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8b6a9701d1e371bf41dca22015c3f89769da7576884d2add7317ec1ec8cb9c3c"},
{file = "ruff-0.9.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9cc53e68b3c5ae41e8faf83a3b89f4a5d7b2cb666dff4b366bb86ed2a85b481f"},
{file = "ruff-0.9.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:8efd9da7a1ee314b910da155ca7e8953094a7c10d0c0a39bfde3fcfd2a015684"},
{file = "ruff-0.9.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3292c5a22ea9a5f9a185e2d131dc7f98f8534a32fb6d2ee7b9944569239c648d"},
{file = "ruff-0.9.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a605fdcf6e8b2d39f9436d343d1f0ff70c365a1e681546de0104bef81ce88df"},
{file = "ruff-0.9.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c547f7f256aa366834829a08375c297fa63386cbe5f1459efaf174086b564247"},
{file = "ruff-0.9.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d18bba3d3353ed916e882521bc3e0af403949dbada344c20c16ea78f47af965e"},
{file = "ruff-0.9.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b338edc4610142355ccf6b87bd356729b62bf1bc152a2fad5b0c7dc04af77bfe"},
{file = "ruff-0.9.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:492a5e44ad9b22a0ea98cf72e40305cbdaf27fac0d927f8bc9e1df316dcc96eb"},
{file = "ruff-0.9.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:af1e9e9fe7b1f767264d26b1075ac4ad831c7db976911fa362d09b2d0356426a"},
{file = "ruff-0.9.2-py3-none-win32.whl", hash = "sha256:71cbe22e178c5da20e1514e1e01029c73dc09288a8028a5d3446e6bba87a5145"},
{file = "ruff-0.9.2-py3-none-win_amd64.whl", hash = "sha256:c5e1d6abc798419cf46eed03f54f2e0c3adb1ad4b801119dedf23fcaf69b55b5"},
{file = "ruff-0.9.2-py3-none-win_arm64.whl", hash = "sha256:a1b63fa24149918f8b37cef2ee6fff81f24f0d74b6f0bdc37bc3e1f2143e41c6"},
{file = "ruff-0.9.2.tar.gz", hash = "sha256:b5eceb334d55fae5f316f783437392642ae18e16dcf4f1858d55d3c2a0f8f5d0"},
]
[[package]]
name = "setuptools"
version = "70.2.0"
requires_python = ">=3.8"
version = "75.8.0"
requires_python = ">=3.9"
summary = "Easily download, build, install, upgrade, and uninstall Python packages"
groups = ["build"]
files = [
{file = "setuptools-70.2.0-py3-none-any.whl", hash = "sha256:b8b8060bb426838fbe942479c90296ce976249451118ef566a5a0b7d8b78fb05"},
{file = "setuptools-70.2.0.tar.gz", hash = "sha256:bd63e505105011b25c3c11f753f7e3b8465ea739efddaccef8f0efac2137bac1"},
{file = "setuptools-75.8.0-py3-none-any.whl", hash = "sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3"},
{file = "setuptools-75.8.0.tar.gz", hash = "sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6"},
]
[[package]]
name = "tomli"
version = "2.0.1"
requires_python = ">=3.7"
version = "2.2.1"
requires_python = ">=3.8"
summary = "A lil' TOML parser"
groups = ["default", "lint"]
groups = ["default"]
marker = "python_version < \"3.11\""
files = [
{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
]
[[package]]
name = "typing-extensions"
version = "4.12.2"
requires_python = ">=3.8"
summary = "Backported and Experimental Type Hints for Python 3.8+"
groups = ["lint"]
files = [
{file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"},
{file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"},
{file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
{file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
{file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"},
{file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"},
{file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"},
{file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"},
{file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"},
{file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"},
{file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"},
{file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"},
{file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"},
{file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"},
{file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"},
{file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"},
{file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"},
{file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"},
{file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"},
{file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"},
{file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"},
{file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"},
{file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"},
{file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"},
{file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"},
{file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"},
{file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"},
{file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"},
{file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"},
{file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"},
{file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"},
{file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"},
{file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"},
{file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"},
]
[[package]]
name = "voicemeeter-api"
version = "2.6.0"
version = "2.6.1"
requires_python = "<4.0,>=3.10"
summary = "A Python wrapper for the Voiceemeter API"
groups = ["default"]
dependencies = [
"tomli<3.0.0,>=2.0.1; python_version < \"3.11\"",
"tomli<3.0,>=2.0.1; python_version < \"3.11\"",
]
files = [
{file = "voicemeeter_api-2.6.0-py3-none-any.whl", hash = "sha256:c2ef8eb063ce3aeac4827ad7883150c407a0effb0fde3778782cd3024a295255"},
{file = "voicemeeter_api-2.6.0.tar.gz", hash = "sha256:db93f27b58ce927c7d56084b224e1d0cdd6406ab7f26e4f99a9a873495a3d2e7"},
{file = "voicemeeter_api-2.6.1-py3-none-any.whl", hash = "sha256:8ae3bce0f9ad6bbad78f2f69f522b6fb2e229d314918a075ad83d4009aff7020"},
{file = "voicemeeter_api-2.6.1.tar.gz", hash = "sha256:34d8672603ec66197f2d61fd8f038f46d8451759c81fbe222b00e7d3ccccd1f5"},
]

View File

@ -1,79 +1,39 @@
[project]
name = "nvda_voicemeeter"
version = "0.6.4"
name = "nvda-voicemeeter"
version = "1.0.0"
description = "A Voicemeeter app compatible with NVDA"
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
dependencies = [
"pyparsing>=3.1.1",
"voicemeeter-api>=2.6.0",
"freesimplegui>=5.1.0",
authors = [
{name = "Onyx and Iris", email = "code@onyxandiris.online"},
]
requires-python = ">=3.10,<3.12"
dependencies = ["pyparsing>=3.2.1", "voicemeeter-api>=2.6.1", "freesimplegui>=5.1.1"]
requires-python = ">=3.10,<3.13"
readme = "README.md"
license = {text = "MIT"}
[project.license]
text = "MIT"
[dependency-groups]
format = [
"ruff>=0.9.2",
]
build = [
"pyinstaller>=6.3.0",
]
[tool.pdm.dev-dependencies]
lint = ["black>=23.7.0", "ruff>=0.0.291", "mypy>=1.7.0"]
build = ["pyinstaller>=6.3.0"]
[project.scripts]
gui-basic = "nvda_voicemeeter.gui.basic:run"
gui-banana = "nvda_voicemeeter.gui.banana:run"
gui-potato = "nvda_voicemeeter.gui.potato:run"
[tool.pdm.scripts.build]
shell = "build.ps1"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.black]
line-length = 119
[tool.pdm]
distribution = true
[tool.pdm.scripts]
build = {shell = "pwsh build.ps1"}
[tool.ruff]
select = ["E", "F"]
ignore = ["E501"]
fixable = [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"I",
"N",
"Q",
"S",
"T",
"W",
"ANN",
"ARG",
"BLE",
"COM",
"DJ",
"DTZ",
"EM",
"ERA",
"EXE",
"FBT",
"ICN",
"INP",
"ISC",
"NPY",
"PD",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"PYI",
"RET",
"RSE",
"RUF",
"SIM",
"SLF",
"TCH",
"TID",
"TRY",
"UP",
"YTT",
]
unfixable = []
exclude = [
".bzr",
".direnv",
@ -97,12 +57,60 @@ exclude = [
"node_modules",
"venv",
]
line-length = 119
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
indent-width = 4
# Assume Python 3.10
target-version = "py310"
[tool.ruff.mccabe]
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Unlike Black, use single quotes for strings.
quote-style = "single"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402", "F401"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"E402",
"F401",
]

View File

@ -16,7 +16,7 @@ class Builder:
menu = [[self.make_menu()]]
layout0 = []
if self.kind.name == "basic":
if self.kind.name == 'basic':
steps = (
self.make_tab0_row0,
self.make_tab0_row1,
@ -62,65 +62,65 @@ class Builder:
def _make_inner_tabgroup(layouts, identifier) -> psg.TabGroup:
inner_layout = []
for i, tabname in enumerate(("buttons", "sliders")):
inner_layout.append([psg.Tab(tabname.capitalize(), layouts[i], key=f"tab||{identifier}||{tabname}")])
for i, tabname in enumerate(('buttons', 'sliders')):
inner_layout.append([psg.Tab(tabname.capitalize(), layouts[i], key=f'tab||{identifier}||{tabname}')])
return psg.TabGroup(
inner_layout,
change_submits=True,
enable_events=True,
key=f"tabgroup||{identifier}",
key=f'tabgroup||{identifier}',
)
def _make_tabs(identifier) -> psg.Tab:
match identifier:
case "Settings":
return psg.Tab("Settings", layout0, key="tab||Settings")
case "Physical Strip":
case 'Settings':
return psg.Tab('Settings', layout0, key='tab||Settings')
case 'Physical Strip':
tabgroup = _make_inner_tabgroup((layout1_1, layout1_2), identifier)
case "Virtual Strip":
case 'Virtual Strip':
tabgroup = _make_inner_tabgroup((layout2_1, layout2_2), identifier)
case "Buses":
case 'Buses':
tabgroup = _make_inner_tabgroup((layout3_1, layout3_2), identifier)
return psg.Tab(identifier, [[tabgroup]], key=f"tab||{identifier}")
return psg.Tab(identifier, [[tabgroup]], key=f'tab||{identifier}')
tabs = []
for tab in util.get_tabs_labels():
tabs.append(_make_tabs(tab))
tab_group = psg.TabGroup([tabs], change_submits=True, enable_events=True, key="tabgroup")
tab_group = psg.TabGroup([tabs], change_submits=True, enable_events=True, key='tabgroup')
return [[menu], [tab_group]]
def make_menu(self) -> psg.Menu:
themes = [f"{theme}::MENU THEME" for theme in util.get_themes_list()]
themes.append("Default::MENU THEME")
themes = [f'{theme}::MENU THEME' for theme in util.get_themes_list()]
themes.append('Default::MENU THEME')
menu_def = [
[
"&Voicemeeter",
'&Voicemeeter',
[
"Restart Audio Engine::MENU",
"Save Settings::MENU",
"Load Settings::MENU",
"Load Settings on Startup ::MENU",
'Restart Audio Engine::MENU',
'Save Settings::MENU',
'Load Settings::MENU',
'Load Settings on Startup ::MENU',
],
],
["&Theme", themes],
['&Theme', themes],
]
return psg.Menu(menu_def, key="menus")
return psg.Menu(menu_def, key='menus')
def make_tab0_row0(self) -> psg.Frame:
"""tab0 row0 represents hardware ins"""
def add_physical_device_opts(layout):
devices = util.get_input_device_list(self.vm)
devices.append("- remove device selection -")
devices.append('- remove device selection -')
layout.append(
[
psg.ButtonMenu(
f"IN {i + 1}",
f'IN {i + 1}',
size=(6, 3),
menu_def=["", devices],
key=f"HARDWARE IN||{i + 1}",
menu_def=['', devices],
key=f'HARDWARE IN||{i + 1}',
)
for i in range(self.kind.phys_in)
]
@ -128,23 +128,23 @@ class Builder:
hardware_in = []
[step(hardware_in) for step in (add_physical_device_opts,)]
return psg.Frame("Hardware In", hardware_in)
return psg.Frame('Hardware In', hardware_in)
def make_tab0_row1(self) -> psg.Frame:
"""tab0 row1 represents hardware outs"""
def add_physical_device_opts(layout):
if self.kind.name == "basic":
if self.kind.name == 'basic':
num_outs = self.kind.phys_out + self.kind.virt_out
else:
num_outs = self.kind.phys_out
layout.append(
[
psg.ButtonMenu(
f"A{i + 1}",
f'A{i + 1}',
size=(6, 3),
menu_def=["", util.get_output_device_list(i, self.vm)],
key=f"HARDWARE OUT||A{i + 1}",
menu_def=['', util.get_output_device_list(i, self.vm)],
key=f'HARDWARE OUT||A{i + 1}',
)
for i in range(num_outs)
]
@ -152,7 +152,7 @@ class Builder:
hardware_out = []
[step(hardware_out) for step in (add_physical_device_opts,)]
return psg.Frame("Hardware Out", hardware_out)
return psg.Frame('Hardware Out', hardware_out)
def make_tab0_row3(self) -> psg.Frame:
"""tab0 row3 represents patch composite"""
@ -162,10 +162,10 @@ class Builder:
layout.append(
[
psg.ButtonMenu(
f"PC{i + 1}",
f'PC{i + 1}',
size=(5, 2),
menu_def=["", outputs],
key=f"PATCH COMPOSITE||PC{i + 1}",
menu_def=['', outputs],
key=f'PATCH COMPOSITE||PC{i + 1}',
)
for i in range(self.kind.composite)
]
@ -173,7 +173,7 @@ class Builder:
hardware_out = []
[step(hardware_out) for step in (add_physical_device_opts,)]
return psg.Frame("PATCH COMPOSITE", hardware_out)
return psg.Frame('PATCH COMPOSITE', hardware_out)
def make_tab0_row4(self) -> psg.Frame:
"""tab0 row4 represents patch insert"""
@ -185,28 +185,28 @@ class Builder:
[
psg.Checkbox(
text=channel,
default=self.window.cache["insert"][
f"INSERT CHECKBOX||{util.get_insert_checkbox_index(self.kind, j, i)}"
default=self.window.cache['insert'][
f'INSERT CHECKBOX||{util.get_insert_checkbox_index(self.kind, j, i)}'
],
enable_events=True,
key=f"INSERT CHECKBOX||IN{i} {j}",
key=f'INSERT CHECKBOX||IN{i} {j}',
)
],
)
for j, channel in enumerate(("LEFT", "RIGHT"))
for j, channel in enumerate(('LEFT', 'RIGHT'))
]
else:
layout.append(
[
psg.Checkbox(
text=channel,
default=self.window.cache["insert"][
f"INSERT CHECKBOX||{util.get_insert_checkbox_index(self.kind, j, i)}"
default=self.window.cache['insert'][
f'INSERT CHECKBOX||{util.get_insert_checkbox_index(self.kind, j, i)}'
],
enable_events=True,
key=f"INSERT CHECKBOX||IN{i} {j}",
key=f'INSERT CHECKBOX||IN{i} {j}',
)
for j, channel in enumerate(("LEFT", "RIGHT", "C", "LFE", "SL", "SR", "BL", "BR"))
for j, channel in enumerate(('LEFT', 'RIGHT', 'C', 'LFE', 'SL', 'SR', 'BL', 'BR'))
],
)
@ -216,29 +216,29 @@ class Builder:
for i, checkbox_list in enumerate(checkbox_lists):
if i < self.kind.phys_in:
[step(checkbox_list, i + 1) for step in (add_insert_checkboxes,)]
inner.append(psg.Frame(f"In#{i + 1}", checkbox_list))
inner.append(psg.Frame(f'In#{i + 1}', checkbox_list))
else:
[step(checkbox_list, i + 1) for step in (add_insert_checkboxes,)]
asio_checkboxes.append([psg.Frame(f"In#{i + 1}", checkbox_list)])
asio_checkboxes.append([psg.Frame(f'In#{i + 1}', checkbox_list)])
asio_checkboxes.insert(0, inner)
return psg.Frame("PATCH INSERT", asio_checkboxes)
return psg.Frame('PATCH INSERT', asio_checkboxes)
def make_tab0_row5(self) -> psg.Frame:
"""tab0 row5 represents advanced settings"""
return psg.Frame(
"ADVANCED SETTINGS",
'ADVANCED SETTINGS',
[
[
psg.Button(
"ADVANCED SETTINGS",
'ADVANCED SETTINGS',
size=(20, 2),
key="ADVANCED SETTINGS",
key='ADVANCED SETTINGS',
)
],
],
key="ADVANCED SETTINGS FRAME",
key='ADVANCED SETTINGS FRAME',
)
def make_tab1_button_row(self, i) -> psg.Frame:
@ -248,26 +248,26 @@ class Builder:
layout.append(
[
psg.Button(
f"A{j + 1}" if j < self.kind.phys_out else f"B{j - self.kind.phys_out + 1}",
f'A{j + 1}' if j < self.kind.phys_out else f'B{j - self.kind.phys_out + 1}',
size=(4, 2),
key=f"STRIP {i}||A{j + 1}"
key=f'STRIP {i}||A{j + 1}'
if j < self.kind.phys_out
else f"STRIP {i}||B{j - self.kind.phys_out + 1}",
else f'STRIP {i}||B{j - self.kind.phys_out + 1}',
)
for j in range(self.kind.phys_out + self.kind.virt_out)
],
)
layout.append(
[
psg.Button("Mono", size=(6, 2), key=f"STRIP {i}||MONO"),
psg.Button("Solo", size=(6, 2), key=f"STRIP {i}||SOLO"),
psg.Button("Mute", size=(6, 2), key=f"STRIP {i}||MUTE"),
psg.Button('Mono', size=(6, 2), key=f'STRIP {i}||MONO'),
psg.Button('Solo', size=(6, 2), key=f'STRIP {i}||SOLO'),
psg.Button('Mute', size=(6, 2), key=f'STRIP {i}||MUTE'),
],
)
outputs = []
[step(outputs) for step in (add_strip_outputs,)]
return psg.Frame(self.window.cache["labels"][f"STRIP {i}||LABEL"], outputs, key=f"STRIP {i}||LABEL")
return psg.Frame(self.window.cache['labels'][f'STRIP {i}||LABEL'], outputs, key=f'STRIP {i}||LABEL')
def make_tab1_button_rows(self) -> psg.Frame:
layout = [[self.make_tab1_button_row(i)] for i in range(self.kind.phys_in)]
@ -277,7 +277,7 @@ class Builder:
def add_gain_slider(layout):
layout.append(
[
psg.Text("Gain"),
psg.Text('Gain'),
psg.Slider(
range=(-60, 12),
default_value=self.vm.strip[i].gain,
@ -286,8 +286,8 @@ class Builder:
expand_x=True,
enable_events=True,
disabled=True,
orientation="horizontal",
key=f"STRIP {i}||SLIDER GAIN",
orientation='horizontal',
key=f'STRIP {i}||SLIDER GAIN',
),
]
)
@ -298,7 +298,7 @@ class Builder:
def add_limit_slider(layout):
layout.append(
[
psg.Text("Limit"),
psg.Text('Limit'),
psg.Slider(
range=(-40, 12),
default_value=self.vm.strip[i].limit,
@ -306,18 +306,18 @@ class Builder:
disable_number_display=True,
expand_x=True,
enable_events=True,
orientation="horizontal",
key=f"STRIP {i}||SLIDER LIMIT",
orientation='horizontal',
key=f'STRIP {i}||SLIDER LIMIT',
),
]
)
layout = []
steps = (add_gain_slider, add_param_sliders)
if self.kind.name in ("banana", "potato"):
if self.kind.name in ('banana', 'potato'):
steps += (add_limit_slider,)
[step(layout) for step in steps]
return psg.Frame(self.window.cache["labels"][f"STRIP {i}||LABEL"], layout, key=f"STRIP {i}||LABEL||SLIDER")
return psg.Frame(self.window.cache['labels'][f'STRIP {i}||LABEL'], layout, key=f'STRIP {i}||LABEL||SLIDER')
def make_tab1_slider_rows(self) -> psg.Frame:
layout = [[self.make_tab1_slider_row(i)] for i in range(self.kind.phys_in)]
@ -330,11 +330,11 @@ class Builder:
layout.append(
[
psg.Button(
f"A{j + 1}" if j < self.kind.phys_out else f"B{j - self.kind.phys_out + 1}",
f'A{j + 1}' if j < self.kind.phys_out else f'B{j - self.kind.phys_out + 1}',
size=(4, 2),
key=f"STRIP {i}||A{j + 1}"
key=f'STRIP {i}||A{j + 1}'
if j < self.kind.phys_out
else f"STRIP {i}||B{j - self.kind.phys_out + 1}",
else f'STRIP {i}||B{j - self.kind.phys_out + 1}',
)
for j in range(self.kind.phys_out + self.kind.virt_out)
]
@ -342,26 +342,26 @@ class Builder:
if i == self.kind.phys_in + 1:
layout.append(
[
psg.Button("K", size=(6, 2), key=f"STRIP {i}||KARAOKE"),
psg.Button("Solo", size=(6, 2), key=f"STRIP {i}||SOLO"),
psg.Button("Mute", size=(6, 2), key=f"STRIP {i}||MUTE"),
psg.Button('K', size=(6, 2), key=f'STRIP {i}||KARAOKE'),
psg.Button('Solo', size=(6, 2), key=f'STRIP {i}||SOLO'),
psg.Button('Mute', size=(6, 2), key=f'STRIP {i}||MUTE'),
],
)
else:
layout.append(
[
psg.Button("MC", size=(6, 2), key=f"STRIP {i}||MC"),
psg.Button("Solo", size=(6, 2), key=f"STRIP {i}||SOLO"),
psg.Button("Mute", size=(6, 2), key=f"STRIP {i}||MUTE"),
psg.Button('MC', size=(6, 2), key=f'STRIP {i}||MC'),
psg.Button('Solo', size=(6, 2), key=f'STRIP {i}||SOLO'),
psg.Button('Mute', size=(6, 2), key=f'STRIP {i}||MUTE'),
],
)
outputs = []
[step(outputs) for step in (add_strip_outputs,)]
return psg.Frame(
self.window.cache["labels"][f"STRIP {i}||LABEL"],
self.window.cache['labels'][f'STRIP {i}||LABEL'],
outputs,
key=f"STRIP {i}||LABEL",
key=f'STRIP {i}||LABEL',
)
def make_tab2_button_rows(self) -> psg.Frame:
@ -374,7 +374,7 @@ class Builder:
def add_gain_slider(layout):
layout.append(
[
psg.Text("Gain"),
psg.Text('Gain'),
psg.Slider(
range=(-60, 12),
default_value=self.vm.strip[i].gain,
@ -383,14 +383,14 @@ class Builder:
expand_x=True,
enable_events=True,
disabled=True,
orientation="horizontal",
key=f"STRIP {i}||SLIDER GAIN",
orientation='horizontal',
key=f'STRIP {i}||SLIDER GAIN',
),
]
)
def add_param_sliders(layout):
if self.kind.name in ("basic", "banana"):
if self.kind.name in ('basic', 'banana'):
for param in util.get_slider_params(i, self.kind):
layout.append([LabelSlider(self.window, i, param, range_=(-12, 12))])
else:
@ -404,7 +404,7 @@ class Builder:
def add_limit_slider(layout):
layout.append(
[
psg.Text("Limit"),
psg.Text('Limit'),
psg.Slider(
range=(-40, 12),
default_value=self.vm.strip[i].limit,
@ -412,21 +412,21 @@ class Builder:
disable_number_display=True,
expand_x=True,
enable_events=True,
orientation="horizontal",
key=f"STRIP {i}||SLIDER LIMIT",
orientation='horizontal',
key=f'STRIP {i}||SLIDER LIMIT',
),
]
)
layout = []
steps = (add_gain_slider, add_param_sliders)
if self.kind.name in ("banana", "potato"):
if self.kind.name in ('banana', 'potato'):
steps += (add_limit_slider,)
[step(layout) for step in steps]
return psg.Frame(
self.window.cache["labels"][f"STRIP {i}||LABEL"],
self.window.cache['labels'][f'STRIP {i}||LABEL'],
layout,
key=f"STRIP {i}||LABEL||SLIDER",
key=f'STRIP {i}||LABEL||SLIDER',
)
def make_tab2_slider_rows(self) -> psg.Frame:
@ -439,9 +439,9 @@ class Builder:
"""tab3 row represents bus composite toggle"""
def add_strip_outputs(layout):
params = ["MONO", "EQ", "MUTE"]
if self.kind.name == "basic":
params.remove("EQ")
params = ['MONO', 'EQ', 'MUTE']
if self.kind.name == 'basic':
params.remove('EQ')
busmodes = [util._bus_mode_map[mode] for mode in util.get_bus_modes(self.vm)]
layout.append(
[
@ -449,15 +449,15 @@ class Builder:
psg.Button(
param.capitalize(),
size=(6, 2),
key=f"BUS {i}||{param}",
key=f'BUS {i}||{param}',
)
for param in params
],
psg.ButtonMenu(
"BUSMODE",
'BUSMODE',
size=(12, 2),
menu_def=["", busmodes],
key=f"BUS {i}||MODE",
menu_def=['', busmodes],
key=f'BUS {i}||MODE',
),
]
)
@ -465,9 +465,9 @@ class Builder:
outputs = []
[step(outputs) for step in (add_strip_outputs,)]
return psg.Frame(
self.window.cache["labels"][f"BUS {i}||LABEL"],
self.window.cache['labels'][f'BUS {i}||LABEL'],
outputs,
key=f"BUS {i}||LABEL",
key=f'BUS {i}||LABEL',
)
def make_tab3_button_rows(self) -> psg.Frame:
@ -478,7 +478,7 @@ class Builder:
def add_gain_slider(layout):
layout.append(
[
psg.Text("Gain"),
psg.Text('Gain'),
psg.Slider(
range=(-60, 12),
default_value=self.vm.bus[i].gain,
@ -487,15 +487,15 @@ class Builder:
expand_x=True,
enable_events=True,
disabled=True,
orientation="horizontal",
key=f"BUS {i}||SLIDER GAIN",
orientation='horizontal',
key=f'BUS {i}||SLIDER GAIN',
),
]
)
outputs = []
[step(outputs) for step in (add_gain_slider,)]
return psg.Frame(self.window.cache["labels"][f"BUS {i}||LABEL"], outputs, key=f"BUS {i}||LABEL||SLIDER")
return psg.Frame(self.window.cache['labels'][f'BUS {i}||LABEL'], outputs, key=f'BUS {i}||LABEL||SLIDER')
def make_tab3_slider_rows(self) -> psg.Frame:
layout = [[self.make_tab3_slider_row(i)] for i in range(self.kind.num_bus)]

View File

@ -7,40 +7,40 @@ from .errors import NVDAVMError
BITS = 64 if ct.sizeof(ct.c_void_p) == 8 else 32
if platform.system() != "Windows":
raise NVDAVMError("Only Windows OS supported")
if platform.system() != 'Windows':
raise NVDAVMError('Only Windows OS supported')
REG_KEY = "\\".join(
REG_KEY = '\\'.join(
filter(
None,
(
"SOFTWARE",
"WOW6432Node" if BITS == 64 else "",
"Microsoft",
"Windows",
"CurrentVersion",
"Uninstall",
"NVDA",
'SOFTWARE',
'WOW6432Node' if BITS == 64 else '',
'Microsoft',
'Windows',
'CurrentVersion',
'Uninstall',
'NVDA',
),
)
)
def get_nvdapath():
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"{}".format(REG_KEY)) as nvda_key:
return winreg.QueryValueEx(nvda_key, r"UninstallDirectory")[0]
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r'{}'.format(REG_KEY)) as nvda_key:
return winreg.QueryValueEx(nvda_key, r'UninstallDirectory')[0]
try:
NVDA_PATH = Path(get_nvdapath()) / "nvda.exe"
NVDA_PATH = Path(get_nvdapath()) / 'nvda.exe'
except FileNotFoundError:
NVDA_PATH = ""
NVDA_PATH = ''
controller_path = Path(__file__).parents[2].resolve() / "controllerClient"
controller_path = Path(__file__).parents[2].resolve() / 'controllerClient'
if not controller_path.exists():
controller_path = Path("_internal") / "controllerClient"
controller_path = Path('_internal') / 'controllerClient'
DLL_PATH = controller_path / f"x{64 if BITS == 64 else 86}" / f"nvdaControllerClient{BITS}.dll"
DLL_PATH = controller_path / f'x{64 if BITS == 64 else 86}' / 'nvdaControllerClient.dll'
libc = ct.CDLL(str(DLL_PATH))

View File

@ -10,10 +10,10 @@ class LabelSlider(psg.Frame):
def __init__(self, parent, i, param, range_=(0, 10), *args, **kwargs):
self.parent = parent
if param in ("AUDIBILITY", "DENOISER"):
if param in ('AUDIBILITY', 'DENOISER'):
size = 7
else:
if psg.theme() == "HighContrast":
if psg.theme() == 'HighContrast':
size = 5
else:
size = 4
@ -28,8 +28,8 @@ class LabelSlider(psg.Frame):
size=(12, 16),
expand_x=True,
enable_events=True,
orientation="horizontal",
key=f"STRIP {i}||SLIDER {param}",
orientation='horizontal',
key=f'STRIP {i}||SLIDER {param}',
),
]
]
@ -37,7 +37,7 @@ class LabelSlider(psg.Frame):
def default_value(self, i, param):
target = getattr(self.parent.vm.strip[i], param.lower())
if param in ("COMP", "GATE", "DENOISER"):
if param in ('COMP', 'GATE', 'DENOISER'):
return target.knob
return target
@ -52,70 +52,70 @@ class CompSlider(psg.Slider):
disable_number_display=True,
expand_x=True,
enable_events=True,
orientation="horizontal",
key=f"COMPRESSOR||SLIDER {param}",
orientation='horizontal',
key=f'COMPRESSOR||SLIDER {param}',
**self.default_params(param),
)
def default_params(self, param):
match param:
case "INPUT GAIN":
case 'INPUT GAIN':
return {
"range": (-24, 24),
"default_value": self.vm.strip[self.index].comp.gainin,
"resolution": 0.1,
"disabled": True,
'range': (-24, 24),
'default_value': self.vm.strip[self.index].comp.gainin,
'resolution': 0.1,
'disabled': True,
}
case "RATIO":
case 'RATIO':
return {
"range": (1, 8),
"default_value": self.vm.strip[self.index].comp.ratio,
"resolution": 0.1,
'range': (1, 8),
'default_value': self.vm.strip[self.index].comp.ratio,
'resolution': 0.1,
}
case "THRESHOLD":
case 'THRESHOLD':
return {
"range": (-40, -3),
"default_value": self.vm.strip[self.index].comp.threshold,
"resolution": 0.1,
'range': (-40, -3),
'default_value': self.vm.strip[self.index].comp.threshold,
'resolution': 0.1,
}
case "ATTACK":
case 'ATTACK':
return {
"range": (0, 200),
"default_value": self.vm.strip[self.index].comp.attack,
"resolution": 0.1,
'range': (0, 200),
'default_value': self.vm.strip[self.index].comp.attack,
'resolution': 0.1,
}
case "RELEASE":
case 'RELEASE':
return {
"range": (0, 5000),
"default_value": self.vm.strip[self.index].comp.release,
"resolution": 0.1,
'range': (0, 5000),
'default_value': self.vm.strip[self.index].comp.release,
'resolution': 0.1,
}
case "KNEE":
case 'KNEE':
return {
"range": (0, 1),
"default_value": self.vm.strip[self.index].comp.knee,
"resolution": 0.01,
'range': (0, 1),
'default_value': self.vm.strip[self.index].comp.knee,
'resolution': 0.01,
}
case "OUTPUT GAIN":
case 'OUTPUT GAIN':
return {
"range": (-24, 24),
"default_value": self.vm.strip[self.index].comp.gainout,
"resolution": 0.1,
"disabled": True,
'range': (-24, 24),
'default_value': self.vm.strip[self.index].comp.gainout,
'resolution': 0.1,
'disabled': True,
}
@staticmethod
def check_bounds(param, val):
match param:
case "RATIO":
case 'RATIO':
val = util.check_bounds(val, (1, 8))
case "THRESHOLD":
case 'THRESHOLD':
val = util.check_bounds(val, (-40, -3))
case "ATTACK":
case 'ATTACK':
val = util.check_bounds(val, (0, 200))
case "RELEASE":
case 'RELEASE':
val = util.check_bounds(val, (0, 5000))
case "KNEE":
case 'KNEE':
val = util.check_bounds(val, (0, 1))
return val
@ -128,64 +128,64 @@ class GateSlider(psg.Slider):
disable_number_display=True,
expand_x=True,
enable_events=True,
orientation="horizontal",
key=f"GATE||SLIDER {param}",
orientation='horizontal',
key=f'GATE||SLIDER {param}',
**self.default_params(param),
)
def default_params(self, param):
match param:
case "THRESHOLD":
case 'THRESHOLD':
return {
"range": (-60, -10),
"default_value": self.vm.strip[self.index].gate.threshold,
"resolution": 0.1,
'range': (-60, -10),
'default_value': self.vm.strip[self.index].gate.threshold,
'resolution': 0.1,
}
case "DAMPING":
case 'DAMPING':
return {
"range": (-60, -10),
"default_value": self.vm.strip[self.index].gate.damping,
"resolution": 0.1,
'range': (-60, -10),
'default_value': self.vm.strip[self.index].gate.damping,
'resolution': 0.1,
}
case "BPSIDECHAIN":
case 'BPSIDECHAIN':
return {
"range": (100, 4000),
"default_value": self.vm.strip[self.index].gate.bpsidechain,
"resolution": 1,
'range': (100, 4000),
'default_value': self.vm.strip[self.index].gate.bpsidechain,
'resolution': 1,
}
case "ATTACK":
case 'ATTACK':
return {
"range": (0, 1000),
"default_value": self.vm.strip[self.index].gate.attack,
"resolution": 0.1,
'range': (0, 1000),
'default_value': self.vm.strip[self.index].gate.attack,
'resolution': 0.1,
}
case "HOLD":
case 'HOLD':
return {
"range": (0, 5000),
"default_value": self.vm.strip[self.index].gate.hold,
"resolution": 0.1,
'range': (0, 5000),
'default_value': self.vm.strip[self.index].gate.hold,
'resolution': 0.1,
}
case "RELEASE":
case 'RELEASE':
return {
"range": (0, 5000),
"default_value": self.vm.strip[self.index].gate.release,
"resolution": 0.1,
'range': (0, 5000),
'default_value': self.vm.strip[self.index].gate.release,
'resolution': 0.1,
}
@staticmethod
def check_bounds(param, val):
match param:
case "THRESHOLD":
case 'THRESHOLD':
val = util.check_bounds(val, (-60, -10))
case "DAMPING MAX":
case 'DAMPING MAX':
val = util.check_bounds(val, (-60, -10))
case "BPSIDECHAIN":
case 'BPSIDECHAIN':
val = util.check_bounds(val, (100, 4000))
case "ATTACK":
case 'ATTACK':
val = util.check_bounds(val, (0, 1000))
case "HOLD":
case 'HOLD':
val = util.check_bounds(val, (0, 5000))
case "RELEASE":
case 'RELEASE':
val = util.check_bounds(val, (0, 5000))
return val
@ -195,8 +195,8 @@ class LabelSliderAdvanced(psg.Frame):
def __init__(self, parent, index, param, slider_cls: Union[CompSlider, GateSlider], *args, **kwargs):
label_map = {
"DAMPING": "Damping Max",
"BPSIDECHAIN": "BP Sidechain",
'DAMPING': 'Damping Max',
'BPSIDECHAIN': 'BP Sidechain',
}
layout = [

View File

@ -1,14 +1,14 @@
import json
from pathlib import Path
SETTINGS = Path.cwd() / "settings.json"
SETTINGS = Path.cwd() / 'settings.json'
def config_from_json():
data = {}
if not SETTINGS.exists():
return data
with open(SETTINGS, "r") as f:
with open(SETTINGS, 'r') as f:
data = json.load(f)
return data
@ -24,11 +24,11 @@ def get(key, default=None):
def set(key, value):
config[key] = value
with open(SETTINGS, "w") as f:
with open(SETTINGS, 'w') as f:
json.dump(config, f)
def delete(key):
del config[key]
with open(SETTINGS, "w") as f:
with open(SETTINGS, 'w') as f:
json.dump(config, f)

View File

@ -8,4 +8,4 @@ class NVDAVMCAPIError(NVDAVMError):
def __init__(self, fn_name, code):
self.fn_name = fn_name
self.code = code
super().__init__(f"{self.fn_name} returned {self.code}")
super().__init__(f'{self.fn_name} returned {self.code}')

View File

@ -0,0 +1 @@
from .main import run

View File

@ -0,0 +1,11 @@
import voicemeeterlib
import nvda_voicemeeter
def run():
KIND_ID = 'banana'
with voicemeeterlib.api(KIND_ID) as vm:
with nvda_voicemeeter.draw(KIND_ID, vm) as window:
window.run()

View File

@ -0,0 +1 @@
from .main import run

View File

@ -0,0 +1,11 @@
import voicemeeterlib
import nvda_voicemeeter
def run():
KIND_ID = 'basic'
with voicemeeterlib.api(KIND_ID) as vm:
with nvda_voicemeeter.draw(KIND_ID, vm) as window:
window.run()

View File

@ -0,0 +1 @@
from .main import run

View File

@ -0,0 +1,11 @@
import voicemeeterlib
import nvda_voicemeeter
def run():
KIND_ID = 'potato'
with voicemeeterlib.api(KIND_ID) as vm:
with nvda_voicemeeter.draw(KIND_ID, vm) as window:
window.run()

View File

@ -1,58 +1,58 @@
def _make_hardware_ins_cache(vm) -> dict:
return {**{f"HARDWARE IN||{i + 1}": vm.strip[i].device.name for i in range(vm.kind.phys_in)}}
return {**{f'HARDWARE IN||{i + 1}': vm.strip[i].device.name for i in range(vm.kind.phys_in)}}
def _make_hardware_outs_cache(vm) -> dict:
hw_outs = {**{f"HARDWARE OUT||A{i + 1}": vm.bus[i].device.name for i in range(vm.kind.phys_out)}}
if vm.kind.name == "basic":
hw_outs |= {"HARDWARE OUT||A2": vm.bus[1].device.name}
hw_outs = {**{f'HARDWARE OUT||A{i + 1}': vm.bus[i].device.name for i in range(vm.kind.phys_out)}}
if vm.kind.name == 'basic':
hw_outs |= {'HARDWARE OUT||A2': vm.bus[1].device.name}
return hw_outs
def _make_param_cache(vm, channel_type) -> dict:
params = {}
if channel_type == "strip":
if channel_type == 'strip':
match vm.kind.name:
case "basic":
case 'basic':
params |= {
**{f"STRIP {i}||A1": vm.strip[i].A1 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||B1": vm.strip[i].B1 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A1': vm.strip[i].A1 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||B1': vm.strip[i].B1 for i in range(vm.kind.num_strip)},
}
case "banana":
case 'banana':
params |= {
**{f"STRIP {i}||A1": vm.strip[i].A1 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||A2": vm.strip[i].A2 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||A3": vm.strip[i].A3 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||B1": vm.strip[i].B1 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||B2": vm.strip[i].B2 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A1': vm.strip[i].A1 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A2': vm.strip[i].A2 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A3': vm.strip[i].A3 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||B1': vm.strip[i].B1 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||B2': vm.strip[i].B2 for i in range(vm.kind.num_strip)},
}
case "potato":
case 'potato':
params |= {
**{f"STRIP {i}||A1": vm.strip[i].A1 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||A2": vm.strip[i].A2 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||A3": vm.strip[i].A3 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||A4": vm.strip[i].A4 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||A5": vm.strip[i].A5 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||B1": vm.strip[i].B1 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||B2": vm.strip[i].B2 for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||B3": vm.strip[i].B3 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A1': vm.strip[i].A1 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A2': vm.strip[i].A2 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A3': vm.strip[i].A3 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A4': vm.strip[i].A4 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||A5': vm.strip[i].A5 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||B1': vm.strip[i].B1 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||B2': vm.strip[i].B2 for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||B3': vm.strip[i].B3 for i in range(vm.kind.num_strip)},
}
params |= {
**{f"STRIP {i}||MONO": vm.strip[i].mono for i in range(vm.kind.phys_in)},
**{f"STRIP {i}||SOLO": vm.strip[i].solo for i in range(vm.kind.num_strip)},
**{f"STRIP {i}||MUTE": vm.strip[i].mute for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||MONO': vm.strip[i].mono for i in range(vm.kind.phys_in)},
**{f'STRIP {i}||SOLO': vm.strip[i].solo for i in range(vm.kind.num_strip)},
**{f'STRIP {i}||MUTE': vm.strip[i].mute for i in range(vm.kind.num_strip)},
}
for i in range(vm.kind.phys_in, vm.kind.phys_in + vm.kind.virt_in):
if i == vm.kind.phys_in + 1:
params[f"STRIP {i}||KARAOKE"] = vm.strip[i].k
params[f'STRIP {i}||KARAOKE'] = vm.strip[i].k
else:
params[f"STRIP {i}||MC"] = vm.strip[i].mc
params[f'STRIP {i}||MC'] = vm.strip[i].mc
else:
params |= {
**{f"BUS {i}||MONO": vm.bus[i].mono for i in range(vm.kind.num_bus)},
**{f"BUS {i}||EQ": vm.bus[i].eq.on for i in range(vm.kind.num_bus)},
**{f"BUS {i}||MUTE": vm.bus[i].mute for i in range(vm.kind.num_bus)},
**{f"BUS {i}||MODE": vm.bus[i].mode.get() for i in range(vm.kind.num_bus)},
**{f'BUS {i}||MONO': vm.bus[i].mono for i in range(vm.kind.num_bus)},
**{f'BUS {i}||EQ': vm.bus[i].eq.on for i in range(vm.kind.num_bus)},
**{f'BUS {i}||MUTE': vm.bus[i].mute for i in range(vm.kind.num_bus)},
**{f'BUS {i}||MODE': vm.bus[i].mode.get() for i in range(vm.kind.num_bus)},
}
return params
@ -60,19 +60,19 @@ def _make_param_cache(vm, channel_type) -> dict:
def _make_label_cache(vm) -> dict:
return {
**{
f"STRIP {i}||LABEL": vm.strip[i].label if vm.strip[i].label else f"Hardware Input {i + 1}"
f'STRIP {i}||LABEL': vm.strip[i].label if vm.strip[i].label else f'Hardware Input {i + 1}'
for i in range(vm.kind.phys_in)
},
**{
f"STRIP {i}||LABEL": vm.strip[i].label if vm.strip[i].label else f"Virtual Input {i - vm.kind.phys_in + 1}"
f'STRIP {i}||LABEL': vm.strip[i].label if vm.strip[i].label else f'Virtual Input {i - vm.kind.phys_in + 1}'
for i in range(vm.kind.phys_in, vm.kind.phys_in + vm.kind.virt_in)
},
**{
f"BUS {i}||LABEL": vm.bus[i].label if vm.bus[i].label else f"Physical Bus {i + 1}"
f'BUS {i}||LABEL': vm.bus[i].label if vm.bus[i].label else f'Physical Bus {i + 1}'
for i in range(vm.kind.phys_out)
},
**{
f"BUS {i}||LABEL": vm.bus[i].label if vm.bus[i].label else f"Virtual Bus {i - vm.kind.phys_out + 1}"
f'BUS {i}||LABEL': vm.bus[i].label if vm.bus[i].label else f'Virtual Bus {i - vm.kind.phys_out + 1}'
for i in range(vm.kind.phys_out, vm.kind.phys_out + vm.kind.virt_out)
},
}
@ -80,16 +80,16 @@ def _make_label_cache(vm) -> dict:
def _make_patch_asio_cache(vm) -> dict:
params = {}
if vm.kind.name != "basic":
params |= {**{f"ASIO INPUT SPINBOX||{i}": vm.patch.asio[i].get() for i in range(vm.kind.phys_out * 2)}}
if vm.kind.name != 'basic':
params |= {**{f'ASIO INPUT SPINBOX||{i}': vm.patch.asio[i].get() for i in range(vm.kind.phys_out * 2)}}
for i in range(vm.kind.phys_out - 1):
target = getattr(vm.patch, f"A{i + 2}")
params |= {**{f"ASIO OUTPUT A{i + 2} SPINBOX||{j}": target[j].get() for j in range(vm.kind.num_bus)}}
target = getattr(vm.patch, f'A{i + 2}')
params |= {**{f'ASIO OUTPUT A{i + 2} SPINBOX||{j}': target[j].get() for j in range(vm.kind.num_bus)}}
return params
def _make_patch_insert_cache(vm) -> dict:
params = {}
if vm.kind.name != "basic":
params |= {**{f"INSERT CHECKBOX||{i}": vm.patch.insert[i].on for i in range(vm.kind.num_strip_levels)}}
if vm.kind.name != 'basic':
params |= {**{f'INSERT CHECKBOX||{i}': vm.patch.insert[i].on for i in range(vm.kind.num_strip_levels)}}
return params

View File

@ -4,10 +4,10 @@ from pyparsing import Group, OneOrMore, Optional, Suppress, Word, alphanums, res
class Parser:
def __init__(self):
self.widget = Group(OneOrMore(Word(alphanums)))
self.widget_token = Suppress("||")
self.widget_token = Suppress('||')
self.identifier = Group(OneOrMore(Word(alphanums)))
self.event = Group(OneOrMore(Word(alphanums)))
self.menu_token = Suppress("::")
self.menu_token = Suppress('::')
self.match = (
self.widget + self.widget_token + self.identifier + Optional(self.widget_token) + Optional(self.event)
| self.identifier + self.menu_token + self.event

File diff suppressed because it is too large Load Diff

View File

@ -18,9 +18,9 @@ def get_insert_checkbox_index(kind, channel, num) -> int:
_rejected_ids = (
"VBAudio100VMVAIO3",
"{F5735BD4-6EAF-4758-9710-9886E5AD0FF3}",
"{0239BE07-CEEF-4236-A900-AA778D432FD4}",
'VBAudio100VMVAIO3',
'{F5735BD4-6EAF-4758-9710-9886E5AD0FF3}',
'{0239BE07-CEEF-4236-A900-AA778D432FD4}',
)
@ -28,8 +28,8 @@ def get_input_device_list(vm) -> list:
devices = []
for j in range(vm.device.ins):
device = vm.device.input(j)
if device["id"] not in _rejected_ids:
devices.append("{type}: {name}".format(**device))
if device['id'] not in _rejected_ids:
devices.append('{type}: {name}'.format(**device))
return devices
@ -37,37 +37,37 @@ def get_output_device_list(i, vm) -> list:
devices = []
for j in range(vm.device.outs):
device = vm.device.output(j)
if device["id"] not in _rejected_ids:
devices.append("{type}: {name}".format(**device))
if device['id'] not in _rejected_ids:
devices.append('{type}: {name}'.format(**device))
if i == 0:
return devices
devices.append("- remove device selection -")
return [device for device in devices if not device.startswith("asio")]
devices.append('- remove device selection -')
return [device for device in devices if not device.startswith('asio')]
def get_patch_composite_list(kind) -> list:
temp = []
for i in range(kind.phys_out):
[temp.append(f"IN#{i + 1} {channel}") for channel in ("Left", "Right")]
[temp.append(f'IN#{i + 1} {channel}') for channel in ('Left', 'Right')]
for i in range(kind.phys_out, kind.phys_out + kind.virt_out):
[
temp.append(f"IN#{i + 1} {channel}")
for channel in ("Left", "Right", "Center", "LFE", "SL", "SR", "BL", "BR")
temp.append(f'IN#{i + 1} {channel}')
for channel in ('Left', 'Right', 'Center', 'LFE', 'SL', 'SR', 'BL', 'BR')
]
temp.append("BUS Channel")
temp.append('BUS Channel')
return temp
def get_patch_insert_channels() -> list:
return [
"left",
"right",
"center",
"low frequency effect",
"surround left",
"surround right",
"back left",
"back right",
'left',
'right',
'center',
'low frequency effect',
'surround left',
'surround right',
'back left',
'back right',
]
@ -75,8 +75,8 @@ _patch_insert_channels = get_patch_insert_channels()
def get_asio_samples_list(driver) -> list:
if driver == "MME":
samples = ["2048", "1536", "1024", "896", "768", "704", "640", "576", "512", "480", "441"]
if driver == 'MME':
samples = ['2048', '1536', '1024', '896', '768', '704', '640', '576', '512', '480', '441']
else:
# fmt: off
samples = [
@ -84,14 +84,14 @@ def get_asio_samples_list(driver) -> list:
"352", "320", "288", "256", "224", "192", "160", "128"
]
# fmt: on
if driver == "ASIO":
samples = [x for x in samples if x not in ("2048", "1536")]
samples.append("Default")
if driver == 'ASIO':
samples = [x for x in samples if x not in ('2048', '1536')]
samples.append('Default')
return samples
def get_tabs_labels() -> list:
return ["Settings", "Physical Strip", "Virtual Strip", "Buses"]
return ['Settings', 'Physical Strip', 'Virtual Strip', 'Buses']
def open_context_menu_for_buttonmenu(window, identifier) -> None:
@ -106,52 +106,52 @@ def get_channel_identifier_list(vm) -> list:
identifiers = []
for i in range(vm.kind.phys_in):
for j in range(2):
identifiers.append(f"IN{i + 1} {j}")
identifiers.append(f'IN{i + 1} {j}')
for i in range(vm.kind.phys_in, vm.kind.phys_in + vm.kind.virt_in):
for j in range(8):
identifiers.append(f"IN{i + 1} {j}")
identifiers.append(f'IN{i + 1} {j}')
return identifiers
_bus_mode_map = {
"normal": "Normal",
"amix": "Mix Down A",
"bmix": "Mix Down B",
"repeat": "Stereo Repeat",
"composite": "Composite",
"tvmix": "Up Mix TV",
"upmix21": "Up Mix 2.1",
"upmix41": "Up Mix 4.1",
"upmix61": "Up Mix 6.1",
"centeronly": "Center Only",
"lfeonly": "Low Frequency Effect Only",
"rearonly": "Rear Only",
'normal': 'Normal',
'amix': 'Mix Down A',
'bmix': 'Mix Down B',
'repeat': 'Stereo Repeat',
'composite': 'Composite',
'tvmix': 'Up Mix TV',
'upmix21': 'Up Mix 2.1',
'upmix41': 'Up Mix 4.1',
'upmix61': 'Up Mix 6.1',
'centeronly': 'Center Only',
'lfeonly': 'Low Frequency Effect Only',
'rearonly': 'Rear Only',
}
_bus_mode_map_reversed = dict((reversed(item) for item in _bus_mode_map.items()))
def get_bus_modes(vm) -> list:
if vm.kind.name == "basic":
if vm.kind.name == 'basic':
return [
"normal",
"amix",
"repeat",
"composite",
'normal',
'amix',
'repeat',
'composite',
]
return [
"normal",
"amix",
"bmix",
"repeat",
"composite",
"tvmix",
"upmix21",
"upmix41",
"upmix61",
"centeronly",
"lfeonly",
"rearonly",
'normal',
'amix',
'bmix',
'repeat',
'composite',
'tvmix',
'upmix21',
'upmix41',
'upmix61',
'centeronly',
'lfeonly',
'rearonly',
]
@ -166,77 +166,77 @@ def check_bounds(val, bounds: tuple) -> int | float:
def get_slider_params(i, kind) -> Iterable:
if i < kind.phys_in:
if kind.name == "basic":
return ("AUDIBILITY",)
if kind.name == "banana":
return ("COMP", "GATE")
if kind.name == "potato":
return ("COMP", "GATE", "DENOISER")
return ("BASS", "MID", "TREBLE")
if kind.name == 'basic':
return ('AUDIBILITY',)
if kind.name == 'banana':
return ('COMP', 'GATE')
if kind.name == 'potato':
return ('COMP', 'GATE', 'DENOISER')
return ('BASS', 'MID', 'TREBLE')
def get_full_slider_params(i, kind) -> Iterable:
params = list(get_slider_params(i, kind) + ("GAIN", "LIMIT"))
if kind.name == "basic":
params.remove("LIMIT")
params = list(get_slider_params(i, kind) + ('GAIN', 'LIMIT'))
if kind.name == 'basic':
params.remove('LIMIT')
return params
def get_slider_modes() -> Iterable:
return (
"GAIN MODE",
"BASS MODE",
"MID MODE",
"TREBLE MODE",
"AUDIBILITY MODE",
"COMP MODE",
"GATE MODE",
"DENOISER MODE",
"LIMIT MODE",
'GAIN MODE',
'BASS MODE',
'MID MODE',
'TREBLE MODE',
'AUDIBILITY MODE',
'COMP MODE',
'GATE MODE',
'DENOISER MODE',
'LIMIT MODE',
)
def _get_bus_assignments(kind) -> list:
return [f"A{i}" for i in range(1, kind.phys_out + 1)] + [f"B{i}" for i in range(1, kind.virt_out + 1)]
return [f'A{i}' for i in range(1, kind.phys_out + 1)] + [f'B{i}' for i in range(1, kind.virt_out + 1)]
psg.theme_add_new(
"HighContrast",
'HighContrast',
{
"BACKGROUND": "#FFFFFF",
"TEXT": "#000000",
"INPUT": "#FAF9F6",
"TEXT_INPUT": "#000000",
"SCROLL": "#FAF9F6",
"BUTTON": ("#000000", "#FFFFFF"),
"PROGRESS": ("#000000", "#FFFFFF"),
"BORDER": 2,
"SLIDER_DEPTH": 3,
"PROGRESS_DEPTH": 0,
'BACKGROUND': '#FFFFFF',
'TEXT': '#000000',
'INPUT': '#FAF9F6',
'TEXT_INPUT': '#000000',
'SCROLL': '#FAF9F6',
'BUTTON': ('#000000', '#FFFFFF'),
'PROGRESS': ('#000000', '#FFFFFF'),
'BORDER': 2,
'SLIDER_DEPTH': 3,
'PROGRESS_DEPTH': 0,
},
)
def get_themes_list() -> list:
return [
"Bright Colors",
"Dark Blue 14",
"Dark Brown 2",
"Dark Brown 3",
"Dark Green 2",
"Dark Grey 2",
"Dark Teal1",
"Dark Teal6",
"Kayak",
"Light Blue 2",
"Light Brown 2",
"Light Brown 5",
"Light Green",
"Light Green 3",
"Light Grey 2",
"Light Purple",
"Neutral Blue",
"Reds",
"Sandy Beach",
"High Contrast",
'Bright Colors',
'Dark Blue 14',
'Dark Brown 2',
'Dark Brown 3',
'Dark Green 2',
'Dark Grey 2',
'Dark Teal1',
'Dark Teal6',
'Kayak',
'Light Blue 2',
'Light Brown 2',
'Light Brown 5',
'Light Green',
'Light Green 3',
'Light Grey 2',
'Light Purple',
'Neutral Blue',
'Reds',
'Sandy Beach',
'High Contrast',
]

File diff suppressed because it is too large Load Diff