fill in comp/gate endpoints.

minor bump
This commit is contained in:
onyx-and-iris 2026-04-05 23:23:46 +01:00
parent a492006d67
commit 921cf8796d
4 changed files with 100 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[project] [project]
name = "vmr-http" name = "vmr-http"
version = "0.6.0" version = "0.7.0"
description = "HTTP API for controlling Voicemeeter" description = "HTTP API for controlling Voicemeeter"
readme = "README.md" readme = "README.md"
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }] authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]

View File

@ -25,3 +25,59 @@ async def get_strip_comp_knob(index: int, voicemeeter=Depends(get_voicemeeter_cl
"""Get the current compressor knob value for the specified strip index.""" """Get the current compressor knob value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp strip_comp = voicemeeter.strip[index].comp
return {'knob': strip_comp.knob} return {'knob': strip_comp.knob}
@router.get('/gainin')
async def get_strip_comp_gainin(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor gain in value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'gainin': strip_comp.gainin}
@router.get('/ratio')
async def get_strip_comp_ratio(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor ratio value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'ratio': strip_comp.ratio}
@router.get('/threshold')
async def get_strip_comp_threshold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor threshold value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'threshold': strip_comp.threshold}
@router.get('/attack')
async def get_strip_comp_attack(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor attack value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'attack': strip_comp.attack}
@router.get('/release')
async def get_strip_comp_release(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor release value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'release': strip_comp.release}
@router.get('/knee')
async def get_strip_comp_knee(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor knee value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'knee': strip_comp.knee}
@router.get('/gainout')
async def get_strip_comp_gainout(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor gain out value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'gainout': strip_comp.gainout}
@router.get('/makeup')
async def get_strip_comp_makeup(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor makeup status for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'makeup': strip_comp.makeup}

View File

@ -25,3 +25,45 @@ async def get_strip_gate_knob(index: int, voicemeeter=Depends(get_voicemeeter_cl
"""Get the current gate knob value for the specified strip index.""" """Get the current gate knob value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate strip_gate = voicemeeter.strip[index].gate
return {'knob': strip_gate.knob} return {'knob': strip_gate.knob}
@router.get('/threshold')
async def get_strip_gate_threshold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate threshold value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'threshold': strip_gate.threshold}
@router.get('/damping')
async def get_strip_gate_damping(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate damping value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'damping': strip_gate.damping}
@router.get('/bpsidechain')
async def get_strip_gate_bpsidechain(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate sidechain value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'bpsidechain': strip_gate.bpsidechain}
@router.get('/attack')
async def get_strip_gate_attack(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate attack value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'attack': strip_gate.attack}
@router.get('/hold')
async def get_strip_gate_hold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate hold value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'hold': strip_gate.hold}
@router.get('/release')
async def get_strip_gate_release(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate release value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'release': strip_gate.release}

2
uv.lock generated
View File

@ -1151,7 +1151,7 @@ wheels = [
[[package]] [[package]]
name = "vmr-http" name = "vmr-http"
version = "0.6.0" version = "0.7.0"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "fastapi" }, { name = "fastapi" },