8 Commits

Author SHA1 Message Date
15f0fcda69 add link to buseqchannelcell 2025-06-15 23:50:24 +01:00
738688a8a7 Merge pull request #16 from wcyoung08/add-to-bus-class
Extends BusEQclass with BusEQChCell, giving access to all bus eq channel cell parameters.
2025-06-15 23:47:15 +01:00
1509afd4f5 add 2.7.0 to CHANGELOG 2025-06-15 23:42:23 +01:00
7232ba6248 add eqedit poe script
minor bump
2025-06-15 23:38:11 +01:00
1ff2017d51 iterate over cells. 2025-06-15 23:32:47 +01:00
William Young
fe1f4ee324 Updated example script to be sure other params work, updated readme and changed channel number from 9 to 8 2025-06-15 16:59:17 -05:00
4953751c02 instantiate types
bump poethepoet
2025-06-15 22:32:46 +01:00
William Young
abbbf57982 Added some logic to test but changes seem to work now 2025-06-15 15:43:41 -05:00
7 changed files with 78 additions and 17 deletions

View File

@@ -11,11 +11,18 @@ Before any major/minor/patch bump all unit tests will be run to verify they pass
- [x] - [x]
## [2.7.0] - 2025-06-15
### Added
- Bus.EQ Channel Cell commands added, see [Bus.EQ.Channel.Cell](https://github.com/onyx-and-iris/voicemeeter-api-python?tab=readme-ov-file#buseqchannelcell).
- Added by [PR #16](https://github.com/onyx-and-iris/voicemeeter-api-python/pull/16)
## [2.6.0] - 2024-06-29 ## [2.6.0] - 2024-06-29
### Added ### Added
- bits kwarg for overriding the type of GUI that is launched on startup. - bits kwarg for overriding the type of GUI that is launched on startup.
- Defaults to 64, set it to either 32 or 64. - Defaults to 64, set it to either 32 or 64.
### Fixed ### Fixed

View File

@@ -292,6 +292,23 @@ example:
vm.bus[3].eq.on = True vm.bus[3].eq.on = True
``` ```
##### Bus.EQ.Channel.Cell
The following properties are available.
- `on`: boolean
- `type`: int
- `f`: float
- `gain`: float
- `q`: quality
example:
```python
vm.bus[3].eq.channel[0].cell[2].on = True
vm.bus[3].eq.channel[0].cell[2].f = 5000
```
##### Bus.Modes ##### Bus.Modes
The following properties are available. The following properties are available.

View File

@@ -2,20 +2,49 @@ import time
import voicemeeterlib import voicemeeterlib
def main(): def main():
KIND_ID = 'banana' KIND_ID = 'banana'
BUS_INDEX = 0 # Index of the bus to edit, can be changed as needed
CHANNEL_INDEX = 0 # Index of the channel to edit, can be changed as needed
with voicemeeterlib.api(KIND_ID) as vm: with voicemeeterlib.api(KIND_ID) as vm:
vm.bus[0].eq.on = True print(f'Bus[{BUS_INDEX}].EQ.on: {vm.bus[BUS_INDEX].eq.on}')
vm.bus[0].eq.channel[0].cell[0].on = True print(
vm.bus[0].eq.channel[0].cell[0].f = 500 f'Bus[{BUS_INDEX}].EQ.channel[{CHANNEL_INDEX}].cell[0].on: {vm.bus[BUS_INDEX].eq.channel[CHANNEL_INDEX].cell[0].on}'
vm.bus[0].eq.channel[0].cell[0].type = 3 # Should correspond to LPF )
print('Check sending commands (should affect your VM Banana window)')
vm.bus[BUS_INDEX].eq.on = True
vm.bus[BUS_INDEX].eq.ab = 0 # corresponds to A EQ memory slot
vm.bus[BUS_INDEX].mute = False
for j, cell in enumerate(vm.bus[BUS_INDEX].eq.channel[CHANNEL_INDEX].cell):
cell.on = True
cell.f = 500
cell.gain = -10
cell.type = 3 # Should correspond to LPF
cell.q = 10
print(
f'Channel {CHANNEL_INDEX}, Cell {j}: on={cell.on}, f={cell.f}, type={cell.type}, gain={cell.gain}, q={cell.q}'
)
time.sleep(1) # Sleep to simulate processing time
cell.on = False
cell.f = 50
cell.gain = 0
cell.type = 0
cell.q = 3
print(
f'Channel {CHANNEL_INDEX}, Cell {j}: on={cell.on}, f={cell.f}, type={cell.type} , gain={cell.gain}, q={cell.q}'
)
vm.bus[BUS_INDEX].eq.on = False
time.sleep(3)
vm.bus[0].eq.on = False
vm.bus[0].eq.channel[0].cell[0].on = False
vm.bus[0].eq.channel[0].cell[0].f = 50
vm.bus[0].eq.channel[0].cell[0].type = 0
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "voicemeeter-api" name = "voicemeeter-api"
version = "2.6.1" version = "2.7.0"
description = "A Python wrapper for the Voiceemeter API" description = "A Python wrapper for the Voiceemeter API"
authors = [ authors = [
{name = "Onyx and Iris",email = "code@onyxandiris.online"} {name = "Onyx and Iris",email = "code@onyxandiris.online"}
@@ -16,7 +16,7 @@ dependencies = [
packages = [{ include = "voicemeeterlib" }] packages = [{ include = "voicemeeterlib" }]
[tool.poetry.requires-plugins] [tool.poetry.requires-plugins]
poethepoet = "^0.32.1" poethepoet = "^0.35.0"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
pytest = "^8.3.4" pytest = "^8.3.4"
@@ -37,6 +37,7 @@ levels.script = "scripts:ex_levels"
midi.script = "scripts:ex_midi" midi.script = "scripts:ex_midi"
obs.script = "scripts:ex_obs" obs.script = "scripts:ex_obs"
observer.script = "scripts:ex_observer" observer.script = "scripts:ex_observer"
eqedit.script = "scripts:ex_eqedit"
test-basic.script = "scripts:test_basic" test-basic.script = "scripts:test_basic"
test-banana.script = "scripts:test_banana" test-banana.script = "scripts:test_banana"
test-potato.script = "scripts:test_potato" test-potato.script = "scripts:test_potato"

View File

@@ -37,6 +37,11 @@ def ex_observer():
subprocess.run([sys.executable, str(scriptpath)]) subprocess.run([sys.executable, str(scriptpath)])
def ex_eqedit():
scriptpath = Path.cwd() / 'examples' / 'eq_edit' / '.'
subprocess.run([sys.executable, str(scriptpath)])
def test_basic(): def test_basic():
subprocess.run(['tox'], env=os.environ.copy() | {'KIND': 'basic'}) subprocess.run(['tox'], env=os.environ.copy() | {'KIND': 'basic'})

View File

@@ -96,7 +96,7 @@ class BusEQ(IRemote):
Returns a BusEQ class. Returns a BusEQ class.
""" """
kls = (cls,) kls = (cls,)
return type( BusEQ_cls = type(
'BusEQ', 'BusEQ',
kls, kls,
{ {
@@ -105,6 +105,7 @@ class BusEQ(IRemote):
) )
}, },
) )
return BusEQ_cls(remote, i)
@property @property
def identifier(self) -> str: def identifier(self) -> str:
@@ -136,7 +137,7 @@ class BusEQCh(IRemote):
Returns a BusEQCh class. Returns a BusEQCh class.
""" """
kls = (cls,) kls = (cls,)
return type( BusEQCh_cls = type(
'BusEQCh', 'BusEQCh',
kls, kls,
{ {
@@ -145,6 +146,7 @@ class BusEQCh(IRemote):
) )
}, },
) )
return BusEQCh_cls(remote, i, j)
def __init__(self, remote, i, j): def __init__(self, remote, i, j):
super().__init__(remote, i) super().__init__(remote, i)

View File

@@ -90,7 +90,7 @@ class BananaMap(KindMapClass):
asio: tuple = (6, 8) asio: tuple = (6, 8)
insert: int = 22 insert: int = 22
composite: int = 8 composite: int = 8
channels: int = 9 channels: int = 8
cells: int = 6 cells: int = 6
@@ -102,7 +102,7 @@ class PotatoMap(KindMapClass):
asio: tuple = (10, 8) asio: tuple = (10, 8)
insert: int = 34 insert: int = 34
composite: int = 8 composite: int = 8
channels: int = 9 channels: int = 8
cells: int = 6 cells: int = 6