diff --git a/astro.config.mjs b/astro.config.mjs
index 5084e8e..1411dfa 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -65,6 +65,11 @@ export default defineConfig({
{
label: 'Processors',
items: [
+ {
+ label: "Router",
+ collapsed: true,
+ autogenerate: { directory: 'processors/router' }
+ },
{
label: "Int",
collapsed: true,
diff --git a/package-lock.json b/package-lock.json
index 79b1eb0..38824f8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2164,6 +2164,7 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -2187,6 +2188,7 @@
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1",
@@ -2362,6 +2364,7 @@
"integrity": "sha512-CHiohwJIS4L0G6/IzE1Fx3dgWqXBCXus/od0eGUfxrZJD2um2pE7ehclMmgL/fXqbU7NfE1Ze2pq34h2QaA6iQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@astrojs/compiler": "^2.13.0",
"@astrojs/internal-helpers": "0.7.5",
@@ -6360,6 +6363,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"nanoid": "^3.3.8",
"picocolors": "^1.1.1",
@@ -6415,6 +6419,7 @@
"integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
@@ -6928,6 +6933,7 @@
"integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@types/estree": "1.0.8"
},
@@ -7364,6 +7370,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
+ "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -7760,6 +7767,7 @@
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.4.4",
@@ -8177,6 +8185,7 @@
"integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
"dev": true,
"license": "ISC",
+ "peer": true,
"bin": {
"yaml": "bin.mjs"
},
@@ -8330,6 +8339,7 @@
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
diff --git a/src/content/docs/concepts/routes.md b/src/content/docs/concepts/routes.md
index ffde31d..962b1ff 100644
--- a/src/content/docs/concepts/routes.md
+++ b/src/content/docs/concepts/routes.md
@@ -4,11 +4,10 @@ sidebar:
order: 3
---
-Routes take the messages coming from a module and push them out another module. The message can be optionally "processed" with any number of processor steps.
+Routes take the messages coming from a module and push them through a list of [processors](/concepts/processors). Having no processors is valid but serves no real purpose and is basically a no-op.
## YAML Definition
- **input**: the id of the [module](/concepts/modules) that will provide messages to this route
- **processors**: (optional) array of [processors](/concepts/processors) that will be called in order and the result of the previous will be fed to the next processor.
- - if at any point the output of a processor is `nil` the entire route will be terminated (subject to change to support output `nil` values?)
- - an error in a processor step will also result in the route being terminated
-- **output**: the id of the [module](/concepts/modules) that will consume messages from the route
\ No newline at end of file
+ - if at any point the output of a processor is `nil` the entire route will be terminated (subject to change to support passing through `nil` values?)
+ - an error in a processor step will result in the individual route being terminated
\ No newline at end of file
diff --git a/src/content/docs/examples/dial-a-cue.mdx b/src/content/docs/examples/dial-a-cue.mdx
index 4df2e48..ba5363f 100644
--- a/src/content/docs/examples/dial-a-cue.mdx
+++ b/src/content/docs/examples/dial-a-cue.mdx
@@ -24,9 +24,11 @@ routes:
processors:
- type: osc.message.create
params:
- address: "/cue/{{.To}}/go"
+ address: "/cue/{{.Payload.To}}/go"
- type: osc.message.encode
- output: udp
+ - type: router.output
+ params:
+ module: udp
`
diff --git a/src/content/docs/examples/http-to-osc.mdx b/src/content/docs/examples/http-to-osc.mdx
index 395b476..e694d36 100644
--- a/src/content/docs/examples/http-to-osc.mdx
+++ b/src/content/docs/examples/http-to-osc.mdx
@@ -25,9 +25,11 @@ routes:
processors:
- type: osc.message.create # create OSC message
params:
- address: "{{.URL.Path}}" # template the address from the incoming message
+ address: "{{.Payload.URL.Path}}" # template the address from the incoming message
- type: osc.message.encode # turn OSC message into bytes
- output: udp
+ - type: router.output # output to the udp module
+ params:
+ module: udp
`
diff --git a/src/content/docs/modules/midi/input.mdx b/src/content/docs/modules/midi/input.mdx
index c594e15..8c47d8a 100644
--- a/src/content/docs/modules/midi/input.mdx
+++ b/src/content/docs/modules/midi/input.mdx
@@ -10,7 +10,7 @@ import { Aside } from '@astrojs/starlight/components';
This module is not currently included in the pre-compiled binaries for [showbridge](https://github.com/jwetzell/showbridge-go/releases/latest)
-The `midi.input` module connects to a midi device (or virtual device) and emits MIDI messages that come in on that port. This module does not output any message and so using it as an `output` of a [route](/concepts/routes) would be pointless.
+The `midi.input` module connects to a midi device (or virtual device) and emits MIDI messages that come in on that port. This module does not support output.
- **type**: `midi.input`
- **params**:
diff --git a/src/content/docs/processors/router/output.md b/src/content/docs/processors/router/output.md
new file mode 100644
index 0000000..5064f71
--- /dev/null
+++ b/src/content/docs/processors/router/output.md
@@ -0,0 +1,17 @@
+---
+title: Router Output
+sidebar:
+ order: 1
+---
+The `router.output` processor takes any payload and outputs to the specified module.
+
+- **type**: `router.output`
+- **params**:
+ - **module**: the id of the [module](/concepts/modules) to output to.
+### Example
+Output to the `osc-out` module.
+```
+- type: router.output
+ params:
+ module: osc-out
+```
\ No newline at end of file
diff --git a/src/content/docs/showbridge/dictionary.md b/src/content/docs/showbridge/dictionary.md
deleted file mode 100644
index 0670c3c..0000000
--- a/src/content/docs/showbridge/dictionary.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: Dictionary
----
-
-- **router**: throughout documentation I will use the term router to refer to configured/running instance of showbridge
-- **modules**: modules are configured instances that can produce or consume message like a TCP server or a UDP client
-- **routes**: routes take messages coming from a module (input), do some optional processing and send that message to a module (output)
-- **processors**: processors process messages, the processors are localized to the route the processor is a part of. Examples of processors or turning bytes into an OSC message or parsing a string into an integer
\ No newline at end of file
diff --git a/src/content/docs/showbridge/dictionary.mdx b/src/content/docs/showbridge/dictionary.mdx
new file mode 100644
index 0000000..4e57ecf
--- /dev/null
+++ b/src/content/docs/showbridge/dictionary.mdx
@@ -0,0 +1,18 @@
+---
+title: Dictionary
+---
+
+- **router**: throughout documentation I will use the term router to refer to a configured/running instance of showbridge
+- **modules**: modules are configured instances that can produce or consume message like a TCP server or a UDP client
+- **routes**: routes take messages coming from a module (input), pass the
+- **processors**: processors process messages, this can be anything such as:
+ - [decoding bytes into a string](/processors/string/decode)
+ - [creating random numbers](/processors/int/random)
+ - [filtering OSC message](/processors/osc/message/filter)
+ - [running custom JavaScript snippets](/processors/script/js)
+
+import { Aside } from '@astrojs/starlight/components';
+
+
\ No newline at end of file
diff --git a/src/content/docs/showbridge/overview.md b/src/content/docs/showbridge/overview.md
index 37f763f..f49c52a 100644
--- a/src/content/docs/showbridge/overview.md
+++ b/src/content/docs/showbridge/overview.md
@@ -13,6 +13,7 @@ showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) take
- UDP
- client
- server
+ - multicast client
- TCP
- client
- server
@@ -20,8 +21,12 @@ showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) take
- client
- [NATS](https://nats.io/)
- client
+ - server
- [PosiStageNet](https://posistage.net/)
- client
+- [SIP](https://datatracker.ietf.org/doc/html/rfc3261)
+ - call server
+ - [DTMF](https://en.wikipedia.org/wiki/DTMF_signaling) server
- MIDI
- input (not included in pre-built binaries yet)
- output (not included in pre-built binaries yet)