switch to WebMIDI driver when building JS

This commit is contained in:
Joel Wetzell
2026-03-30 15:16:35 -05:00
parent 050ada6a70
commit 1d4cb251e9
10 changed files with 30 additions and 71 deletions

View File

@@ -23,76 +23,26 @@ func main() {
},
Modules: []config.ModuleConfig{
{
Id: "timer",
Type: "time.interval",
Id: "midi",
Type: "midi.input",
Params: map[string]any{
"duration": 1000,
},
},
{
Id: "button1",
Type: "web.onclick",
Params: map[string]any{
"id": "button1",
},
},
{
Id: "button2",
Type: "web.onclick",
Params: map[string]any{
"id": "button2",
"port": "Launchpad S",
},
},
},
Routes: []config.RouteConfig{
{
Input: "timer",
Input: "midi",
Processors: []config.ProcessorConfig{
{
Type: "debug.log",
},
},
},
{
Input: "button1",
Processors: []config.ProcessorConfig{
{
Type: "string.create",
Params: map[string]any{
"template": "{{.Payload.UnixMilli}}",
},
},
{
Type: "debug.log",
},
{
Type: "web.set",
Params: map[string]any{
"id": "output1",
"property": "innerText",
"value": "Button1 Pressed @ {{.Payload}}",
},
},
},
},
{
Input: "button2",
Processors: []config.ProcessorConfig{
{
Type: "string.create",
Params: map[string]any{
"template": "{{.Payload.UnixMilli}}",
},
},
{
Type: "debug.log",
},
{
Type: "web.set",
Params: map[string]any{
"id": "output2",
"property": "innerText",
"value": "Button2 Pressed @ {{.Payload}}",
"id": "output",
"property": "textContent",
"value": "{{.Payload}}",
},
},
},