mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-22 11:00:47 +00:00
changelog, readme updated to reflect changes
minor version bump
This commit is contained in:
parent
bd686ef67d
commit
af0d51eeb1
17
CHANGELOG.md
17
CHANGELOG.md
@ -11,6 +11,23 @@ Before any major/minor/patch bump all unit tests will be run to verify they pass
|
|||||||
|
|
||||||
- [x]
|
- [x]
|
||||||
|
|
||||||
|
## [0.8.0] - 2022-09-29
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Logging level INFO set on all examples.
|
||||||
|
- Minor version bump
|
||||||
|
- vm.subject subsection added to README
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Logging module used in place of print statements across the interface.
|
||||||
|
- time.time() now used to steady rate of updates in updater thread.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- call to cache bug in updater thread
|
||||||
|
|
||||||
## [0.7.0] - 2022-09-03
|
## [0.7.0] - 2022-09-03
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
61
README.md
61
README.md
@ -579,36 +579,9 @@ with voicemeeterlib.api('banana') as vm:
|
|||||||
|
|
||||||
will load a user config file at configs/banana/example.toml for Voicemeeter Banana.
|
will load a user config file at configs/banana/example.toml for Voicemeeter Banana.
|
||||||
|
|
||||||
## `Base Module`
|
## Events
|
||||||
|
|
||||||
### Remote class
|
Level updates are considered high volume, by default they are NOT listened for. Use subs keyword arg to initialize event updates.
|
||||||
|
|
||||||
`voicemeeterlib.api(kind_id: str)`
|
|
||||||
|
|
||||||
You may pass the following optional keyword arguments:
|
|
||||||
|
|
||||||
- `sync`: boolean=False, force the getters to wait for dirty parameters to clear. For most cases leave this as False.
|
|
||||||
- `ratelimit`: float=0.033, how often to check for updates in ms.
|
|
||||||
- `subs`: dict={"pdirty": True, "mdirty": True, "midi": True, "ldirty": False}, initialize which event updates to listen for.
|
|
||||||
- `pdirty`: parameter updates
|
|
||||||
- `mdirty`: macrobutton updates
|
|
||||||
- `midi`: midi updates
|
|
||||||
- `ldirty`: level updates
|
|
||||||
|
|
||||||
#### Event updates
|
|
||||||
|
|
||||||
To receive event updates you should do the following:
|
|
||||||
|
|
||||||
- register your app to receive updates using the `vm.subject.add(observer)` method, where observer is your app.
|
|
||||||
- define an `on_update(subject)` callback function in your app. The value of subject may be checked for the type of event.
|
|
||||||
|
|
||||||
See `examples/observer` for a demonstration.
|
|
||||||
|
|
||||||
Level updates are considered high volume, by default they are NOT listened for. However, polling them with strip.levels and bus.levels methods will still work.
|
|
||||||
|
|
||||||
So if you don't wish to receive level updates, or you prefer to handle them yourself simply leave ldirty as default (False).
|
|
||||||
|
|
||||||
Each of the update types may be enabled/disabled separately. Don't use a midi controller? You have the option to disable midi updates.
|
|
||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
@ -620,6 +593,22 @@ with voicemeeterlib.api('banana', ratelimit=0.05, subs={"ldirty": True, "midi":
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### `vm.subject`
|
||||||
|
|
||||||
|
Use the Subject class to register an app as event observer.
|
||||||
|
|
||||||
|
The following methods are available:
|
||||||
|
|
||||||
|
- `add`: registers an app as an event observer
|
||||||
|
- `remove`: deregisters an app as an event observer
|
||||||
|
|
||||||
|
example:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# register the app self as an event observer
|
||||||
|
self.vm.subject.add(self)
|
||||||
|
```
|
||||||
|
|
||||||
#### `vm.event`
|
#### `vm.event`
|
||||||
|
|
||||||
You may also add/remove event subscriptions as necessary with the Event class.
|
You may also add/remove event subscriptions as necessary with the Event class.
|
||||||
@ -635,6 +624,20 @@ vm.event.remove("pdirty")
|
|||||||
print(vm.event.get())
|
print(vm.event.get())
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Remote class
|
||||||
|
|
||||||
|
`voicemeeterlib.api(kind_id: str)`
|
||||||
|
|
||||||
|
You may pass the following optional keyword arguments:
|
||||||
|
|
||||||
|
- `sync`: boolean=False, force the getters to wait for dirty parameters to clear. For most cases leave this as False.
|
||||||
|
- `ratelimit`: float=0.033, how often to check for updates in ms.
|
||||||
|
- `subs`: dict={"pdirty": True, "mdirty": True, "midi": True, "ldirty": False}, initialize which event updates to listen for.
|
||||||
|
- `pdirty`: parameter updates
|
||||||
|
- `mdirty`: macrobutton updates
|
||||||
|
- `midi`: midi updates
|
||||||
|
- `ldirty`: level updates
|
||||||
|
|
||||||
Access to lower level Getters and Setters are provided with these functions:
|
Access to lower level Getters and Setters are provided with these functions:
|
||||||
|
|
||||||
- `vm.get(param, is_string=False)`: For getting the value of any parameter. Set string to True if getting a property value expected to return a string.
|
- `vm.get(param, is_string=False)`: For getting the value of any parameter. Set string to True if getting a property value expected to return a string.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "voicemeeter-api"
|
name = "voicemeeter-api"
|
||||||
version = "0.7.2"
|
version = "0.8.0"
|
||||||
description = "A Python wrapper for the Voiceemeter API"
|
description = "A Python wrapper for the Voiceemeter API"
|
||||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
Loading…
Reference in New Issue
Block a user