mirror of
https://github.com/onyx-and-iris/vmr-http.git
synced 2026-04-06 09:59:11 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e849d7739b | |||
| 07bcdd17fb | |||
| 112679450f | |||
| a2acbe1ac2 |
@ -128,6 +128,46 @@ curl -X 'PATCH' \
|
||||
}'
|
||||
```
|
||||
|
||||
## Bus EQ Channel Cell Router
|
||||
|
||||
### */bus/{index}/eq/channel/{channel_index}/cell/{cell_index}*
|
||||
|
||||
> Get single parameter
|
||||
|
||||
```console
|
||||
curl -X 'GET' \
|
||||
'http://127.0.0.1:8000/bus/0/eq/channel/0/cell/0/type' \
|
||||
-H 'accept: application/json'
|
||||
```
|
||||
|
||||
> Set single parameter
|
||||
|
||||
```console
|
||||
curl -X 'PATCH' \
|
||||
'http://127.0.0.1:8000/bus/0/eq/channel/0/cell/0' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"q": 9.5
|
||||
}'
|
||||
```
|
||||
|
||||
> Set multiple parameters
|
||||
|
||||
```console
|
||||
curl -X 'PATCH' \
|
||||
'http://127.0.0.1:8000/bus/0/eq/channel/0/cell/0' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"on": true,
|
||||
"type": 4,
|
||||
"f": 538.2,
|
||||
"gain": -0.6,
|
||||
"q": 9.5
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## More
|
||||
|
||||
@ -19,7 +19,7 @@ uvicorn vmr_http:app
|
||||
|
||||
## Documentation
|
||||
|
||||
For a few examples see [./API_EXAMPLES.md].
|
||||
For a few examples see [API_EXAMPLES](./API_EXAMPLES.md).
|
||||
|
||||
For an exhaustive list of the endpoints FastAPI generates [automatic docs][auto-docs], simply launch the server and then visit:
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "vmr-http"
|
||||
version = "0.7.0"
|
||||
version = "0.7.1"
|
||||
description = "HTTP API for controlling Voicemeeter"
|
||||
readme = "README.md"
|
||||
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
||||
|
||||
@ -8,15 +8,15 @@ from pydantic import BaseModel, Field
|
||||
class EQParams(BaseModel):
|
||||
"""Parameters for an equalizer."""
|
||||
|
||||
on: Optional[bool] = Field(description='Whether the equalizer is enabled or not.')
|
||||
ab: Optional[bool] = Field(description='Whether the equalizer is in mode A/B.')
|
||||
on: Optional[bool] = Field(None, description='Whether the equalizer is enabled or not.')
|
||||
ab: Optional[bool] = Field(None, description='Whether the equalizer is in mode A/B.')
|
||||
|
||||
|
||||
class EQChannelCellParams(BaseModel):
|
||||
"""Parameters for an equalizer channel."""
|
||||
|
||||
on: Optional[bool] = Field(description='Whether the equalizer channel is enabled or not.')
|
||||
type: Optional[int] = Field(ge=0, le=6, description='Type of the equalizer channel.')
|
||||
f: Optional[float] = Field(ge=20.0, le=20000.0, description='Frequency of the equalizer channel.')
|
||||
gain: Optional[float] = Field(ge=-36.0, le=18.0, description='Gain of the equalizer channel.')
|
||||
q: Optional[float] = Field(ge=0.3, le=100.0, description='Q factor of the equalizer channel.')
|
||||
on: Optional[bool] = Field(None, description='Whether the equalizer channel is enabled or not.')
|
||||
type: Optional[int] = Field(None, ge=0, le=6, description='Type of the equalizer channel.')
|
||||
f: Optional[float] = Field(None, ge=20.0, le=20000.0, description='Frequency of the equalizer channel.')
|
||||
gain: Optional[float] = Field(None, ge=-36.0, le=18.0, description='Gain of the equalizer channel.')
|
||||
q: Optional[float] = Field(None, ge=0.3, le=100.0, description='Q factor of the equalizer channel.')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user