Added OSC
Some checks failed
CI / Native Windows Build And Tests (push) Failing after 7s
CI / React UI Build (push) Has been cancelled
CI / Windows Release Package (push) Has been cancelled

This commit is contained in:
2026-05-03 12:17:03 +10:00
parent 1b56ede462
commit 254d4cd070
14 changed files with 499 additions and 0 deletions

65
docs/OSC_CONTROL.md Normal file
View File

@@ -0,0 +1,65 @@
# OSC Control
Video Shader Toys can listen for local OSC messages and map them onto shader layer parameters.
## Configuration
Set the UDP port in `config/runtime-host.json`:
```json
{
"oscPort": 9000
}
```
Set `oscPort` to `0` to disable the OSC listener.
## Address Pattern
Send OSC messages to:
```text
/VideoShaderToys/{LayerNameOrID}/{ParameterNameOrID}
```
Examples:
```text
/VideoShaderToys/layer-1/brightness
/VideoShaderToys/VHS/intensity
/VideoShaderToys/TemporalLowFPS/frameRate
```
Layer keys are resolved against:
- Layer ID, such as `layer-1`
- Shader package ID, such as `vhs`
- Shader display name, such as `VHS`
Parameter keys are resolved against:
- Parameter ID from `shader.json`
- Parameter label from `shader.json`
Matching is exact first. If that fails, names are compared in a simplified form that ignores spaces, underscores, hyphens, and casing. For live control, prefer stable IDs where possible.
## Values
The listener accepts one OSC argument per message:
- `f`: float
- `i`: integer
- `s`: string
- `T` / `F`: boolean true/false
Values are validated with the same shader parameter rules used by the REST API. Invalid values or unknown addresses are ignored.
## Network
The listener binds to localhost only:
```text
127.0.0.1:<oscPort>
```
This keeps the control surface local to the machine running Video Shader Toys.

View File

@@ -359,6 +359,8 @@ components:
properties:
serverPort:
type: number
oscPort:
type: number
autoReload:
type: boolean
maxTemporalHistoryFrames: