Skip to content

HTTP > OSC

This config starts an HTTP server listening on port 3000. Any HTTP request coming into that server will result in a OSC message being sent to 127.0.0.1:8000 with the address set to the path from the incoming HTTP message.

config.yaml
api:
enabled: true
port: 8080
modules:
- id: http
type: http.server
params:
port: 3000
- id: udp
type: net.udp.client
params:
host: 127.0.0.1
port: 8000
routes:
- id: http-to-osc
input: http
processors:
- id: create-osc-message
type: osc.message.create # create OSC message
params:
address: "{{.Payload.URL.Path}}" # template the address from the incoming message
- id: encode-osc-message
type: osc.message.encode # turn OSC message into bytes
- id: send-osc
type: module.output # output to the udp module
params:
module: udp