This commit is contained in:
Joel Wetzell
2026-05-17 21:12:04 -05:00
parent 69bc31d3f1
commit 8e6cd58006
82 changed files with 642 additions and 450 deletions
+6 -6
View File
@@ -1,10 +1,10 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: 'npm' - package-ecosystem: "npm"
directory: '/' directory: "/"
schedule: schedule:
interval: 'weekly' interval: "weekly"
- package-ecosystem: 'github-actions' - package-ecosystem: "github-actions"
directory: '/' directory: "/"
schedule: schedule:
interval: 'weekly' interval: "weekly"
+3 -3
View File
@@ -13,9 +13,9 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version-file: '.nvmrc' node-version-file: ".nvmrc"
cache: 'npm' cache: "npm"
cache-dependency-path: 'package-lock.json' cache-dependency-path: "package-lock.json"
- name: Install Node.js dependencies - name: Install Node.js dependencies
run: npm ci run: npm ci
+3 -3
View File
@@ -13,9 +13,9 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version-file: '.nvmrc' node-version-file: ".nvmrc"
cache: 'npm' cache: "npm"
cache-dependency-path: 'package-lock.json' cache-dependency-path: "package-lock.json"
- name: Install Node.js dependencies - name: Install Node.js dependencies
run: npm ci run: npm ci
+52 -12
View File
@@ -158,12 +158,16 @@ export default defineConfig({
{ {
label: "Request", label: "Request",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/http/request" } }], items: [
{ autogenerate: { directory: "processors/http/request" } },
],
}, },
{ {
label: "Response", label: "Response",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/http/response" } }], items: [
{ autogenerate: { directory: "processors/http/response" } },
],
}, },
], ],
}, },
@@ -189,27 +193,45 @@ export default defineConfig({
{ {
label: "Message", label: "Message",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/midi/message" } }], items: [
{ autogenerate: { directory: "processors/midi/message" } },
],
}, },
{ {
label: "Note On", label: "Note On",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/midi/note_on" } }], items: [
{ autogenerate: { directory: "processors/midi/note_on" } },
],
}, },
{ {
label: "Note Off", label: "Note Off",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/midi/note_off" } }], items: [
{ autogenerate: { directory: "processors/midi/note_off" } },
],
}, },
{ {
label: "Control Change", label: "Control Change",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/midi/control_change" } }], items: [
{
autogenerate: {
directory: "processors/midi/control_change",
},
},
],
}, },
{ {
label: "Program Change", label: "Program Change",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/midi/program_change" } }], items: [
{
autogenerate: {
directory: "processors/midi/program_change",
},
},
],
}, },
], ],
}, },
@@ -220,7 +242,9 @@ export default defineConfig({
{ {
label: "Message", label: "Message",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/mqtt/message" } }], items: [
{ autogenerate: { directory: "processors/mqtt/message" } },
],
}, },
], ],
}, },
@@ -231,7 +255,9 @@ export default defineConfig({
{ {
label: "Message", label: "Message",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/nats/message" } }], items: [
{ autogenerate: { directory: "processors/nats/message" } },
],
}, },
], ],
}, },
@@ -242,7 +268,9 @@ export default defineConfig({
{ {
label: "Message", label: "Message",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/osc/message" } }], items: [
{ autogenerate: { directory: "processors/osc/message" } },
],
}, },
], ],
}, },
@@ -267,12 +295,24 @@ export default defineConfig({
{ {
label: "Audio", label: "Audio",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/sip/response/audio" } }], items: [
{
autogenerate: {
directory: "processors/sip/response/audio",
},
},
],
}, },
{ {
label: "DTMF", label: "DTMF",
collapsed: true, collapsed: true,
items:[{ autogenerate: { directory: "processors/sip/response/dtmf" } }], items: [
{
autogenerate: {
directory: "processors/sip/response/dtmf",
},
},
],
}, },
], ],
}, },
+3 -3
View File
@@ -1,6 +1,6 @@
import { defineCollection } from 'astro:content'; import { defineCollection } from "astro:content";
import { docsLoader } from '@astrojs/starlight/loaders'; import { docsLoader } from "@astrojs/starlight/loaders";
import { docsSchema } from '@astrojs/starlight/schema'; import { docsSchema } from "@astrojs/starlight/schema";
export const collections = { export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
+2
View File
@@ -3,7 +3,9 @@ title: Config
sidebar: sidebar:
order: 1 order: 1
--- ---
The showbridge router's config is entirely controlled by a YAML/JSON config file. This file must be made by hand for now. I do provide some starter/example configs to look at to get a general idea of what one entails. The showbridge router's config is entirely controlled by a YAML/JSON config file. This file must be made by hand for now. I do provide some starter/example configs to look at to get a general idea of what one entails.
Resources Resources
- good idea to start with [config.yaml](https://github.com/jwetzell/showbridge-go/blob/main/config.yaml) - good idea to start with [config.yaml](https://github.com/jwetzell/showbridge-go/blob/main/config.yaml)
+1
View File
@@ -7,6 +7,7 @@ sidebar:
Modules are anything that can produce input and/or handle output. They are configured in the `modules` property of the [router config file](/concepts/config). Modules are anything that can produce input and/or handle output. They are configured in the `modules` property of the [router config file](/concepts/config).
## YAML Definition ## YAML Definition
A module YAML block has the following properties A module YAML block has the following properties
- **id**: user assigned unique identifier that will be used to reference a module instance in a [route](/concepts/routes) - **id**: user assigned unique identifier that will be used to reference a module instance in a [route](/concepts/routes)
+1
View File
@@ -5,6 +5,7 @@ sidebar:
--- ---
[Processors](/concepts/Processors) operator on a "wrapped" version of the message produces by the module. This wrapped version is available to all processors and is defined as follows: [Processors](/concepts/Processors) operator on a "wrapped" version of the message produces by the module. This wrapped version is available to all processors and is defined as follows:
- **Payload**: the actual message produced by the module (or the result of the previous [processor](/concepts/processors) in the [route](/concepts/routes)). - **Payload**: the actual message produced by the module (or the result of the previous [processor](/concepts/processors) in the [route](/concepts/routes)).
- **Source**: the id of the module that produced the original payload. - **Source**: the id of the module that produced the original payload.
- **Sender**: the network address of the module that produced the message (if applicable not all modules will have a sender address). - **Sender**: the network address of the module that produced the message (if applicable not all modules will have a sender address).
+1
View File
@@ -7,6 +7,7 @@ sidebar:
Processors are anything that create or manipulate messages. They are configured in the `processors` property of an individual [route](/concepts/routes). Processors have the ability to change the type of the message flowing through the system so a byte array can come into a `osc.message.decode` processor and a OSC message type will come out of the processor. Processors are anything that create or manipulate messages. They are configured in the `processors` property of an individual [route](/concepts/routes). Processors have the ability to change the type of the message flowing through the system so a byte array can come into a `osc.message.decode` processor and a OSC message type will come out of the processor.
## YAML Definition ## YAML Definition
A processor YAML block has the following properties A processor YAML block has the following properties
- **type**: the processor type - **type**: the processor type
+1
View File
@@ -7,6 +7,7 @@ sidebar:
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. 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 ## YAML Definition
- **input**: the id of the [module](/concepts/modules) that will provide messages to this route - **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. - **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.
- an error in a processor step will result in the individual route being terminated - an error in a processor step will result in the individual route being terminated
+2 -2
View File
@@ -4,7 +4,7 @@ sidebar:
order: 2 order: 2
--- ---
import { Code } from '@astrojs/starlight/components'; import { Code } from "@astrojs/starlight/components";
This config starts an SIP server listening on port `5060`. Any incoming call will result in a OSC message being sent to `127.0.0.1:53000` with the address set to [fire a QLab cue](https://qlab.app/docs/v5/scripting/osc-dictionary-v5/#/cue/{cue_number}/go) with the dialed number as the cue number. This was tested with a cheap SIP gateway like [this one](https://www.grandstream.com/products/gateways-and-atas/analog-telephone-adaptors/product/ht802). This config starts an SIP server listening on port `5060`. Any incoming call will result in a OSC message being sent to `127.0.0.1:53000` with the address set to [fire a QLab cue](https://qlab.app/docs/v5/scripting/osc-dictionary-v5/#/cue/{cue_number}/go) with the dialed number as the cue number. This was tested with a cheap SIP gateway like [this one](https://www.grandstream.com/products/gateways-and-atas/analog-telephone-adaptors/product/ht802).
@@ -32,6 +32,6 @@ routes:
- type: router.output - type: router.output
params: params:
module: udp module: udp
` `;
<Code code={example} title="config.yaml" lang="yaml" /> <Code code={example} title="config.yaml" lang="yaml" />
+2 -3
View File
@@ -4,11 +4,10 @@ sidebar:
order: 1 order: 1
--- ---
import { Code } from '@astrojs/starlight/components'; import { Code } from "@astrojs/starlight/components";
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. 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.
export const example = ` export const example = `
api: api:
enabled: true enabled: true
@@ -33,6 +32,6 @@ routes:
- type: router.output # output to the udp module - type: router.output # output to the udp module
params: params:
module: udp module: udp
` `;
<Code code={example} title="config.yaml" lang="yaml" /> <Code code={example} title="config.yaml" lang="yaml" />
+3
View File
@@ -3,6 +3,7 @@ title: SQLite
sidebar: sidebar:
order: 1 order: 1
--- ---
The `db.sqlite` module can open/create SQLite databases The `db.sqlite` module can open/create SQLite databases
- **type**: `db.sqlite` - **type**: `db.sqlite`
@@ -12,7 +13,9 @@ The `db.sqlite` module can open/create SQLite databases
## Cap ## Cap
### Example snippet ### Example snippet
Opens an in-memory SQLite database Opens an in-memory SQLite database
```yaml ```yaml
- id: db - id: db
type: db.sqlite type: db.sqlite
@@ -4,6 +4,7 @@ sidebar:
label: Server label: Server
order: 2 order: 2
--- ---
The `http.server` module emits a message for every HTTP request that is made to the server. The `http.server` module emits a message for every HTTP request that is made to the server.
- **type**: `http.server` - **type**: `http.server`
@@ -11,7 +12,9 @@ The `http.server` module emits a message for every HTTP request that is made to
- **port**: TCP port to listen for HTTP requests on - **port**: TCP port to listen for HTTP requests on
### Example ### Example
Start an HTTP server listening on port 3000 Start an HTTP server listening on port 3000
```yaml ```yaml
- id: httpServer - id: httpServer
type: http.server type: http.server
+5 -2
View File
@@ -5,10 +5,11 @@ sidebar:
order: 1 order: 1
--- ---
import { Aside } from '@astrojs/starlight/components'; import { Aside } from "@astrojs/starlight/components";
<Aside type="caution"> <Aside type="caution">
This module is not currently included in the docker builds of [showbridge](https://hub.docker.com/r/jwetzell/showbridge) This module is not currently included in the docker builds of
[showbridge](https://hub.docker.com/r/jwetzell/showbridge)
</Aside> </Aside>
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. 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.
@@ -18,7 +19,9 @@ The `midi.input` module connects to a midi device (or virtual device) and emits
- **port**: name of the MIDI port to connect to - **port**: name of the MIDI port to connect to
### Example ### Example
Open a MIDI connection to `Logic Pro Virtual Out`. Open a MIDI connection to `Logic Pro Virtual Out`.
```yaml ```yaml
- id: midiInput - id: midiInput
type: midi.input type: midi.input
+6 -2
View File
@@ -4,10 +4,12 @@ sidebar:
label: Output label: Output
order: 2 order: 2
--- ---
import { Aside } from '@astrojs/starlight/components';
import { Aside } from "@astrojs/starlight/components";
<Aside type="caution"> <Aside type="caution">
This module is not currently included in the docker builds of [showbridge](https://hub.docker.com/r/jwetzell/showbridge) This module is not currently included in the docker builds of
[showbridge](https://hub.docker.com/r/jwetzell/showbridge)
</Aside> </Aside>
The `midi.output` module connects to a midi device (or virtual device) and allows sending MIDI messages out to that device. This module does not produce any messages and so using it as an `input` to a [route](/concepts/routes) would be pointless. The `midi.output` module connects to a midi device (or virtual device) and allows sending MIDI messages out to that device. This module does not produce any messages and so using it as an `input` to a [route](/concepts/routes) would be pointless.
@@ -17,7 +19,9 @@ The `midi.output` module connects to a midi device (or virtual device) and allow
- **port**: name of the MIDI port to connect to - **port**: name of the MIDI port to connect to
### Example ### Example
Open a MIDI connection to `Logic Pro Virtual In`. Open a MIDI connection to `Logic Pro Virtual In`.
```yaml ```yaml
- id: midiOutput - id: midiOutput
type: midi.output type: midi.output
+2
View File
@@ -14,7 +14,9 @@ The `mqtt.client` module connects to a MQTT broker and emits a message messages
- **clientId** client ID for this connection to the broker - **clientId** client ID for this connection to the broker
### Example ### Example
Open a mqtt connection to `test.mosquitto.org` subscribing to the `showbridge` topic. Open a mqtt connection to `test.mosquitto.org` subscribing to the `showbridge` topic.
```yaml ```yaml
- id: mqttClient - id: mqttClient
type: mqtt.client type: mqtt.client
+4
View File
@@ -4,14 +4,18 @@ sidebar:
label: Client label: Client
order: 1 order: 1
--- ---
This module connects to a [NATS](https://nats.io/) server and subscribes to a subject. This module connects to a [NATS](https://nats.io/) server and subscribes to a subject.
- **type**: `nats.client` - **type**: `nats.client`
- **params**: - **params**:
- **url**: the URL of the NATS server to connect to (e.g. `nats://localhost:4222`) - **url**: the URL of the NATS server to connect to (e.g. `nats://localhost:4222`)
- **subject**: the subject to subscribe to - **subject**: the subject to subscribe to
### Example ### Example
Connect to a local NATS server and subscribe to the `events` subject Connect to a local NATS server and subscribe to the `events` subject
```yaml ```yaml
- id: natsClient - id: natsClient
type: nats.client type: nats.client
+4
View File
@@ -4,14 +4,18 @@ sidebar:
label: Server label: Server
order: 2 order: 2
--- ---
This module starts a NATS server that listens for incoming connections. This module starts a NATS server that listens for incoming connections.
- **type**: `nats.server` - **type**: `nats.server`
- **params**: - **params**:
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0` - **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
- **port**: (optional) the port to listen on defaults to `4222` - **port**: (optional) the port to listen on defaults to `4222`
### Example ### Example
Start a local NATS server listening on port 5555 Start a local NATS server listening on port 5555
```yaml ```yaml
- id: httpServer - id: httpServer
type: http.server type: http.server
+3 -1
View File
@@ -4,6 +4,7 @@ sidebar:
label: Client label: Client
order: 1 order: 1
--- ---
The `net.tcp.client` module connects to TCP server and emits messages based on the data it receives from the server that it connects to. Messages are determined by "framing" techniques as TCP is a stream based protocol. The module will attempt to reconnect anytime the connection is closed. The `net.tcp.client` module connects to TCP server and emits messages based on the data it receives from the server that it connects to. Messages are determined by "framing" techniques as TCP is a stream based protocol. The module will attempt to reconnect anytime the connection is closed.
- **type**: `net.tcp.client` - **type**: `net.tcp.client`
@@ -17,9 +18,10 @@ The `net.tcp.client` module connects to TCP server and emits messages based on t
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol) - [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
- RAW (no framing is done bytes are sent out as they are received) - RAW (no framing is done bytes are sent out as they are received)
### Example ### Example
Open a TCP connection to `127.0.0.1` port 8888, any incoming data will be split on line-feed (`\n`) Open a TCP connection to `127.0.0.1` port 8888, any incoming data will be split on line-feed (`\n`)
```yaml ```yaml
- id: tcpClient - id: tcpClient
type: net.tcp.client type: net.tcp.client
+3 -1
View File
@@ -4,6 +4,7 @@ sidebar:
label: Server label: Server
order: 2 order: 2
--- ---
The `net.tcp.server` module emits a message messages based on the data it receives from clients that connect to it. Messages are determined by "framing" techniques as TCP is a stream based protocol. The `net.tcp.server` module emits a message messages based on the data it receives from clients that connect to it. Messages are determined by "framing" techniques as TCP is a stream based protocol.
- **type**: `net.tcp.server` - **type**: `net.tcp.server`
@@ -17,9 +18,10 @@ The `net.tcp.server` module emits a message messages based on the data it receiv
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol) - [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
- RAW (no framing is done bytes are sent out as they are received) - RAW (no framing is done bytes are sent out as they are received)
### Example ### Example
Start a TCP server listening on port 8888, incoming data will be split on line-feed (`\n`) Start a TCP server listening on port 8888, incoming data will be split on line-feed (`\n`)
```yaml ```yaml
- id: tcpServer - id: tcpServer
type: net.tcp.server type: net.tcp.server
@@ -4,6 +4,7 @@ sidebar:
label: Client label: Client
order: 1 order: 1
--- ---
The `net.udp.client` module sends messages to a the configured `host` and `port`. This module does not produce any messages and so using it as an `input` to a [route](/concepts/routes) would be pointless. The `net.udp.client` module sends messages to a the configured `host` and `port`. This module does not produce any messages and so using it as an `input` to a [route](/concepts/routes) would be pointless.
- **type**: `net.udp.client` - **type**: `net.udp.client`
@@ -12,7 +13,9 @@ The `net.udp.client` module sends messages to a the configured `host` and `port`
- **port**: UDP port to send messages to - **port**: UDP port to send messages to
### Example ### Example
setup up a UDP client that will send UDP packets to `127.0.0.1` on port 8888 setup up a UDP client that will send UDP packets to `127.0.0.1` on port 8888
```yaml ```yaml
- id: udpClient - id: udpClient
type: net.udp.client type: net.udp.client
@@ -11,7 +11,9 @@ sidebar:
- **port**: the port to listen on - **port**: the port to listen on
### Example ### Example
Listen to the mDNS multicast address on port 5353 Listen to the mDNS multicast address on port 5353
```yaml ```yaml
- id: mdnsListener - id: mdnsListener
type: net.udp.multicast type: net.udp.multicast
@@ -4,6 +4,7 @@ sidebar:
label: Server label: Server
order: 2 order: 2
--- ---
The `net.udp.server` module emits a message for every incoming UDP datagram. The `net.udp.server` module emits a message for every incoming UDP datagram.
- **type**: `net.udp.server` - **type**: `net.udp.server`
@@ -13,7 +14,9 @@ The `net.udp.server` module emits a message for every incoming UDP datagram.
- **bufferSize**: (optional) Size of the read buffer for incoming UDP datagrams, defaults to `2048` - **bufferSize**: (optional) Size of the read buffer for incoming UDP datagrams, defaults to `2048`
### Example ### Example
Start a UDP server listening on port 8888 and only on `127.0.0.1` Start a UDP server listening on port 8888 and only on `127.0.0.1`
```yaml ```yaml
- id: udpServer - id: udpServer
type: net.udp.server type: net.udp.server
+1
View File
@@ -10,6 +10,7 @@ sidebar:
This module listens on the [PosiStageNet](http://posistage.net/) multicast address and emits tracker states anytime a new PSN message is received. This module listens on the [PosiStageNet](http://posistage.net/) multicast address and emits tracker states anytime a new PSN message is received.
### Example ### Example
```yaml ```yaml
- id: psnClient - id: psnClient
type: psn.client type: psn.client
@@ -13,7 +13,9 @@ The `redis.client` module connects to a Redis server. This module does not produ
- **port**: the Redis server port - **port**: the Redis server port
### Example ### Example
Connect to a Redis server running on `localhost` at port `6379`. Connect to a Redis server running on `localhost` at port `6379`.
```yaml ```yaml
- id: redisClient - id: redisClient
type: redis.client type: redis.client
+5 -2
View File
@@ -5,10 +5,11 @@ sidebar:
order: 1 order: 1
--- ---
import { Aside } from '@astrojs/starlight/components'; import { Aside } from "@astrojs/starlight/components";
<Aside type="caution"> <Aside type="caution">
This module is not currently included in the docker builds of [showbridge](https://hub.docker.com/r/jwetzell/showbridge) This module is not currently included in the docker builds of
[showbridge](https://hub.docker.com/r/jwetzell/showbridge)
</Aside> </Aside>
The `serial.client` module connects to a serial device and emits a message messages based on the data it receives from the port. Messages are determined by "framing" techniques as serial is a stream based protocol. The `serial.client` module connects to a serial device and emits a message messages based on the data it receives from the port. Messages are determined by "framing" techniques as serial is a stream based protocol.
@@ -25,7 +26,9 @@ The `serial.client` module connects to a serial device and emits a message messa
- RAW (no framing is done bytes are sent out as they are received) - RAW (no framing is done bytes are sent out as they are received)
### Example ### Example
Open a serial connection to `/dev/ttyS0` with a buad rate of `115200`, any incoming data will be split on line-feed (`\n`) Open a serial connection to `/dev/ttyS0` with a buad rate of `115200`, any incoming data will be split on line-feed (`\n`)
```yaml ```yaml
- id: serialClient - id: serialClient
type: serial.client type: serial.client
@@ -4,7 +4,9 @@ sidebar:
label: Server label: Server
order: 1 order: 1
--- ---
This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections and emits call events when a new call is received. This can be used with cheap SIP gateway devices to connect an analog phone line and do interesting things like [firing QLab cues with phone calls](/examples/dial-a-cue). This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections and emits call events when a new call is received. This can be used with cheap SIP gateway devices to connect an analog phone line and do interesting things like [firing QLab cues with phone calls](/examples/dial-a-cue).
- **type**: `sip.call.server` - **type**: `sip.call.server`
- **params**: - **params**:
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0` - **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
@@ -13,7 +15,9 @@ This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Prot
- **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge` - **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge`
### Example ### Example
Start a UDP SIP server listening on port 5060 Start a UDP SIP server listening on port 5060
```yaml ```yaml
- id: sipCallServer - id: sipCallServer
type: sip.call.server type: sip.call.server
+4 -1
View File
@@ -4,6 +4,7 @@ sidebar:
label: Server label: Server
order: 1 order: 1
--- ---
This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections. When a call is received this module will emit events based on the touch tones (DTMF) received during the call. The event is sent out whenever the use presses the separator key defined in the params. This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections. When a call is received this module will emit events based on the touch tones (DTMF) received during the call. The event is sent out whenever the use presses the separator key defined in the params.
- **type**: `sip.dtmf.server` - **type**: `sip.dtmf.server`
@@ -15,7 +16,9 @@ This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Prot
- **separator**: the DTMF separator key to know when to emit events - **separator**: the DTMF separator key to know when to emit events
### Example ### Example
Start a UDP SIP server listening on port 5060 that will emit events whenever the user presses the `#` key on their phone during a call Start a UDP SIP server listening on port 5060 that will emit events whenever the user presses the `#` key on their phone during a call
```yaml ```yaml
- id: sipDTMFServer - id: sipDTMFServer
type: sip.dtmf.server type: sip.dtmf.server
@@ -23,5 +26,5 @@ Start a UDP SIP server listening on port 5060 that will emit events whenever the
ip: 127.0.0.1 ip: 127.0.0.1
port: 5060 port: 5060
transport: udp transport: udp
separator: '#' separator: "#"
``` ```
@@ -3,6 +3,7 @@ title: Interval
sidebar: sidebar:
order: 2 order: 2
--- ---
The `time.interval` module emits a message at a specified duration. Sending any message to this module will reset the interval timer. The `time.interval` module emits a message at a specified duration. Sending any message to this module will reset the interval timer.
- **type**: `time.interval` - **type**: `time.interval`
@@ -10,7 +11,9 @@ The `time.interval` module emits a message at a specified duration. Sending any
- **duration**: time in milliseconds between messsages - **duration**: time in milliseconds between messsages
### Example snippet ### Example snippet
Emits a message every 3 seconds Emits a message every 3 seconds
```yaml ```yaml
- id: every3Secs - id: every3Secs
type: time.interval type: time.interval
+3
View File
@@ -3,6 +3,7 @@ title: Timer
sidebar: sidebar:
order: 1 order: 1
--- ---
The `time.timer` module emits only one message after a specified duration. Sending any message to this module will reset the timer. The `time.timer` module emits only one message after a specified duration. Sending any message to this module will reset the timer.
- **type**: `time.timer` - **type**: `time.timer`
@@ -10,7 +11,9 @@ The `time.timer` module emits only one message after a specified duration. Sendi
- **duration**: time in milliseconds to wait before emitting message - **duration**: time in milliseconds to wait before emitting message
### Example snippet ### Example snippet
Emits a message 5 seconds after the module is initialized Emits a message 5 seconds after the module is initialized
```yaml ```yaml
- id: 5secs - id: 5secs
type: time.timer type: time.timer
@@ -12,7 +12,9 @@ The `websocket.client` module opens a websocket connection to the specified URL.
- **url**: the full url to connect to (`wss://echo.websocket.org`) - **url**: the full url to connect to (`wss://echo.websocket.org`)
### Example ### Example
Connect to the example WS server at `echo.websocket.org`. Connect to the example WS server at `echo.websocket.org`.
```yaml ```yaml
- id: websocket - id: websocket
type: websocket.client type: websocket.client
@@ -10,6 +10,7 @@ sidebar:
This processor will decode incoming bytes into an ArtNet packet. This processor will return an error if the message being processed is not an array of bytes. This processor will decode incoming bytes into an ArtNet packet. This processor will return an error if the message being processed is not an array of bytes.
### Example ### Example
```yaml ```yaml
- type: artnet.packet.decode - type: artnet.packet.decode
``` ```
@@ -9,6 +9,7 @@ sidebar:
This processor will encode an ArtNet packet into an array of bytes. This processor will return an error if the message being processed is not an ArtNet packet. This processor will encode an ArtNet packet into an array of bytes. This processor will return an error if the message being processed is not an ArtNet packet.
### Example ### Example
```yaml ```yaml
- type: artnet.packet.encode - type: artnet.packet.encode
``` ```
+4
View File
@@ -4,14 +4,18 @@ sidebar:
label: Query label: Query
order: 1 order: 1
--- ---
The `db.query` processor will issue a query to the specified module and return the result to the next processor in line. The `db.query` processor will issue a query to the specified module and return the result to the next processor in line.
- **type**: `db.query` - **type**: `db.query`
- **params**: - **params**:
- **module**: the id of the [module](/concepts/modules) to issue query to. - **module**: the id of the [module](/concepts/modules) to issue query to.
- **query**: the query to execute. - **query**: the query to execute.
### Example ### Example
Issue a `SELECT` statement to a module with id `sqlite`. Issue a `SELECT` statement to a module with id `sqlite`.
```yaml ```yaml
- type: db.query - type: db.query
params: params:
@@ -9,6 +9,7 @@ sidebar:
This processor will log information about the message being processed to the console. This processor does not modify the message in any way and will pass the message through to the next processor in the chain. This processor will log information about the message being processed to the console. This processor does not modify the message in any way and will pass the message through to the next processor in the chain.
### Example ### Example
```yaml ```yaml
- type: debug.log - type: debug.log
``` ```
@@ -9,8 +9,8 @@ This processor will only pass messages through if the value of the message has c
- **type**: `filter.change` - **type**: `filter.change`
### Example ### Example
```yaml ```yaml
- type: filter.change - type: filter.change
``` ```
@@ -4,6 +4,7 @@ sidebar:
label: Expr label: Expr
order: 2 order: 2
--- ---
The `filter.expr` processor evaluates an [Expr expression](https://expr-lang.org/playground). If the expression evaluates to true then the payload is sent through. This processor will return an error if the expression fails to evaluate. The `filter.expr` processor evaluates an [Expr expression](https://expr-lang.org/playground). If the expression evaluates to true then the payload is sent through. This processor will return an error if the expression fails to evaluate.
- **type**: `filter.expr` - **type**: `filter.expr`
@@ -11,7 +12,9 @@ The `filter.expr` processor evaluates an [Expr expression](https://expr-lang.org
- **expression**: [Expr expression](https://expr-lang.org/playground) to evaluate. The expression has access to the [wrapped payload](/concepts/payload). - **expression**: [Expr expression](https://expr-lang.org/playground) to evaluate. The expression has access to the [wrapped payload](/concepts/payload).
### Example ### Example
Match a payload great than or equal to 0 Match a payload great than or equal to 0
```yaml ```yaml
- type: filter.expr - type: filter.expr
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Regex label: Regex
order: 1 order: 1
--- ---
The `filter.regex` processor matches incoming string payload against a regular expression. If there is a match then the payload is sent through. This processor will return an error if the message being processed is not a string. The `filter.regex` processor matches incoming string payload against a regular expression. If there is a match then the payload is sent through. This processor will return an error if the message being processed is not a string.
- **type**: `filter.regex` - **type**: `filter.regex`
@@ -11,7 +12,9 @@ The `filter.regex` processor matches incoming string payload against a regular e
- **pattern**: regex pattern to match against the incoming string - **pattern**: regex pattern to match against the incoming string
### Example ### Example
Match strings starting with `hello` Match strings starting with `hello`
```yaml ```yaml
- type: filter.regex - type: filter.regex
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Parse label: Parse
order: 1 order: 1
--- ---
The `float.parse` processor takes a string and parses it as a float with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into a float. The `float.parse` processor takes a string and parses it as a float with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into a float.
- **type**: `float.parse` - **type**: `float.parse`
@@ -11,7 +12,9 @@ The `float.parse` processor takes a string and parses it as a float with the spe
- **bitSize**: (optional) the bit size of the float to parse, defaults to 64 - **bitSize**: (optional) the bit size of the float to parse, defaults to 64
### Example ### Example
This would parse the string payload as a 32 bit float and set the payload to that value. This would parse the string payload as a 32 bit float and set the payload to that value.
```yaml ```yaml
- type: float.parse - type: float.parse
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Random label: Random
order: 2 order: 2
--- ---
The `float.random` processor will set the payload to a random float between the specified `min` and `max` value. The `float.random` processor will set the payload to a random float between the specified `min` and `max` value.
- **type**: `float.random` - **type**: `float.random`
@@ -13,7 +14,9 @@ The `float.random` processor will set the payload to a random float between the
- **max**: the maximum value for the random float (exclusive). - **max**: the maximum value for the random float (exclusive).
### Example ### Example
This would generate a random 64-bit float between 1.1 and 1.5 and set the payload to that value. This would generate a random 64-bit float between 1.1 and 1.5 and set the payload to that value.
```yaml ```yaml
- type: float.random - type: float.random
params: params:
@@ -19,8 +19,8 @@ This processor will create a new FreeD message with the specified parameters.
- **zoom**: the zoom value to set for the FreeD message - **zoom**: the zoom value to set for the FreeD message
- **focus**: the focus value to set for the FreeD message - **focus**: the focus value to set for the FreeD message
### Example ### Example
```yaml ```yaml
- type: free.d.create - type: free.d.create
params: params:
@@ -10,6 +10,7 @@ This processor will decode incoming bytes into a FreeD message. This processor w
- **type**: `free.d.decode` - **type**: `free.d.decode`
### Example ### Example
```yaml ```yaml
- type: free.d.decode - type: free.d.decode
``` ```
@@ -10,6 +10,7 @@ This processor will encode a FreeD message into an array of bytes. This processo
- **type**: `free.d.encode` - **type**: `free.d.encode`
### Example ### Example
```yaml ```yaml
- type: free.d.encode - type: free.d.encode
``` ```
@@ -12,9 +12,10 @@ This process will make an HTTP request to the specified URL using the specified
- **method**: the HTTP method to use for the request (e.g. `GET`, `POST`, `PUT`, etc.) - **method**: the HTTP method to use for the request (e.g. `GET`, `POST`, `PUT`, etc.)
- **url**: the URL to send the request to - **url**: the URL to send the request to
### Example ### Example
Make a GET request to `https://example.com` Make a GET request to `https://example.com`
```yaml ```yaml
- type: http.request.do - type: http.request.do
params: params:
@@ -13,7 +13,9 @@ This processor will create a new HTTP response with the specified status code an
- **body**: the body template to set for the response - **body**: the body template to set for the response
### Example ### Example
This would create an HTTP response with a status code of `200` and a body of `OK` This would create an HTTP response with a status code of `200` and a body of `OK`
```yaml ```yaml
- type: http.response.create - type: http.response.create
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Parse label: Parse
order: 1 order: 1
--- ---
The `int.parse` processor takes a string and parses it as an integer with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into an integer. The `int.parse` processor takes a string and parses it as an integer with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into an integer.
- **type**: `int.parse` - **type**: `int.parse`
@@ -12,7 +13,9 @@ The `int.parse` processor takes a string and parses it as an integer with the sp
- **bitSize**: (optional) the bit size of the integer to parse, defaults to 64 - **bitSize**: (optional) the bit size of the integer to parse, defaults to 64
### Example ### Example
This would parse the string payload as a 32 bit, base 10 integer and set the payload to that value. This would parse the string payload as a 32 bit, base 10 integer and set the payload to that value.
```yaml ```yaml
- type: int.parse - type: int.parse
params: params:
@@ -3,6 +3,7 @@ title: Create Random Int
sidebar: sidebar:
order: 2 order: 2
--- ---
The `int.random` processor will set the payload to a random integer between the specified `min` and `max` value. The `int.random` processor will set the payload to a random integer between the specified `min` and `max` value.
- **type**: `int.random` - **type**: `int.random`
@@ -11,7 +12,9 @@ The `int.random` processor will set the payload to a random integer between the
- **max**: the maximum value for the random integer (inclusive). - **max**: the maximum value for the random integer (inclusive).
### Example ### Example
This would generate a random integer between -127 and 127 and set the payload to that value. This would generate a random integer between -127 and 127 and set the payload to that value.
```yaml ```yaml
- type: int.random - type: int.random
params: params:
@@ -15,7 +15,9 @@ This processor will scale an integer value from one range to another. This proce
- **outMax**: the maximum value of the output range - **outMax**: the maximum value of the output range
### Example ### Example
Scale an integer value from the range 0-255 to the range 0-100 Scale an integer value from the range 0-255 to the range 0-100
```yaml ```yaml
- type: int.scale - type: int.scale
params: params:
@@ -4,10 +4,13 @@ sidebar:
label: Decode label: Decode
order: 2 order: 2
--- ---
Convert an incoming byte array or raw string into a JSON object. This processor will return an error if the message being processed is not an array of bytes or a raw string, or if the bytes/string cannot be parsed as JSON. Convert an incoming byte array or raw string into a JSON object. This processor will return an error if the message being processed is not an array of bytes or a raw string, or if the bytes/string cannot be parsed as JSON.
- **type**: `json.decode` - **type**: `json.decode`
### Example ### Example
```yaml ```yaml
- type: json.decode - type: json.decode
``` ```
+1 -1
View File
@@ -9,8 +9,8 @@ This processor will encode an incoming object into a JSON byte array. This proce
- **type**: `json.encode` - **type**: `json.encode`
### Example ### Example
```yaml ```yaml
- type: json.encode - type: json.encode
``` ```
+3
View File
@@ -4,6 +4,7 @@ sidebar:
label: Get label: Get
order: 1 order: 1
--- ---
The `kv.get` processor gets the value associated with a key from a compatible module. The output payload is the value if the key is found. The `kv.get` processor gets the value associated with a key from a compatible module. The output payload is the value if the key is found.
- **type**: `kv.get` - **type**: `kv.get`
@@ -12,7 +13,9 @@ The `kv.get` processor gets the value associated with a key from a compatible mo
- **key**: the key to look up - **key**: the key to look up
### Example ### Example
This will attempt to get the value for the `counter` key from the module with an id of `redis` This will attempt to get the value for the `counter` key from the module with an id of `redis`
```yaml ```yaml
- type: kv.get - type: kv.get
params: params:
+3
View File
@@ -4,6 +4,7 @@ sidebar:
label: Set label: Set
order: 2 order: 2
--- ---
The `kv.set` processor sets the value associated with a key from a compatible module. The payload is unchanged so whatever is received by this payload is output unless any errors are encountered. The `kv.set` processor sets the value associated with a key from a compatible module. The payload is unchanged so whatever is received by this payload is output unless any errors are encountered.
- **type**: `kv.set` - **type**: `kv.set`
@@ -13,7 +14,9 @@ The `kv.set` processor sets the value associated with a key from a compatible mo
- **value**: the value to set - **value**: the value to set
### Example ### Example
This will attempt to set the key `hello` to `world` using the module with an id of `redis` This will attempt to set the key `hello` to `world` using the module with an id of `redis`
```yaml ```yaml
- type: kv.set - type: kv.set
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 1 order: 1
--- ---
This processor will create a MIDI Control Change message with the specified channel, control number, and control value. This processor will create a MIDI Control Change message with the specified channel, control number, and control value.
- **type**: `midi.control_change.create` - **type**: `midi.control_change.create`
@@ -13,6 +14,7 @@ This processor will create a MIDI Control Change message with the specified chan
- **value**: the control value - **value**: the control value
### Example ### Example
```yaml ```yaml
- type: midi.control_change.create - type: midi.control_change.create
params: params:
@@ -4,11 +4,13 @@ sidebar:
label: Decode label: Decode
order: 3 order: 3
--- ---
This processor will decode incoming bytes into a MIDI message. This processor will return an error if the message being processed is not an array of bytes. This processor will decode incoming bytes into a MIDI message. This processor will return an error if the message being processed is not an array of bytes.
- **type**: `midi.message.decode` - **type**: `midi.message.decode`
### Example ### Example
```yaml ```yaml
- type: midi.message.decode - type: midi.message.decode
``` ```
@@ -4,11 +4,13 @@ sidebar:
label: Encode label: Encode
order: 2 order: 2
--- ---
This processor will encode a MIDI message into an array of bytes. This processor will return an error if the message being processed is not a MIDI message. This processor will encode a MIDI message into an array of bytes. This processor will return an error if the message being processed is not a MIDI message.
- **type**: `midi.message.encode` - **type**: `midi.message.encode`
### Example ### Example
```yaml ```yaml
- type: midi.message.encode - type: midi.message.encode
``` ```
@@ -4,11 +4,13 @@ sidebar:
label: Unpack label: Unpack
order: 4 order: 4
--- ---
This processor will unpack a MIDI message into its individual components. This processor will return an error if the message being processed is not a MIDI message. This processor will unpack a MIDI message into its individual components. This processor will return an error if the message being processed is not a MIDI message.
- **type**: `midi.message.unpack` - **type**: `midi.message.unpack`
### Example ### Example
```yaml ```yaml
- type: midi.message.unpack - type: midi.message.unpack
``` ```
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 1 order: 1
--- ---
This processor will create a MIDI Note On message with the specified channel, note, and velocity. This processor will create a MIDI Note On message with the specified channel, note, and velocity.
- **type**: `midi.note_on.create` - **type**: `midi.note_on.create`
@@ -13,6 +14,7 @@ This processor will create a MIDI Note On message with the specified channel, no
- **velocity**: the velocity - **velocity**: the velocity
### Example ### Example
```yaml ```yaml
- type: midi.note_on.create - type: midi.note_on.create
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 1 order: 1
--- ---
This processor will create a MIDI Note Off message with the specified channel, note, and velocity. This processor will create a MIDI Note Off message with the specified channel, note, and velocity.
- **type**: `midi.note_off.create` - **type**: `midi.note_off.create`
@@ -13,6 +14,7 @@ This processor will create a MIDI Note Off message with the specified channel, n
- **velocity**: the velocity - **velocity**: the velocity
### Example ### Example
```yaml ```yaml
- type: midi.note_off.create - type: midi.note_off.create
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 1 order: 1
--- ---
This processor will create a MIDI Program Change message with the specified channel and program number. This processor will create a MIDI Program Change message with the specified channel and program number.
- **type**: `midi.program_change.create` - **type**: `midi.program_change.create`
@@ -12,6 +13,7 @@ This processor will create a MIDI Program Change message with the specified chan
- **program**: the program number - **program**: the program number
### Example ### Example
```yaml ```yaml
- type: midi.program_change.create - type: midi.program_change.create
params: params:
@@ -3,6 +3,7 @@ title: Create MQTT Message
sidebar: sidebar:
order: 1 order: 1
--- ---
This processor will create an MQTT message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. This processor will create an MQTT message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type.
- **type**: `mqtt.message.create` - **type**: `mqtt.message.create`
@@ -13,6 +14,7 @@ This processor will create an MQTT message from the provided parameters. This pr
- **payload**: the payload of the message. This can be a string or a byte array. - **payload**: the payload of the message. This can be a string or a byte array.
### Example ### Example
```yaml ```yaml
- type: mqtt.message.create - type: mqtt.message.create
params: params:
@@ -6,12 +6,14 @@ sidebar:
--- ---
This processor will create a NATS message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. This processor will create a NATS message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type.
- **type**: `nats.message.create` - **type**: `nats.message.create`
- **params**: - **params**:
- **subject**: the subject to publish the message to. - **subject**: the subject to publish the message to.
- **payload**: the payload of the message. - **payload**: the payload of the message.
### Example ### Example
```yaml ```yaml
- type: nats.message.create - type: nats.message.create
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 1 order: 1
--- ---
This processor will create an OSC message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. The address parameter is required, while the args and types parameters are optional. However, if args are provided, then types must also be provided and must match the amount of args provided. This processor will create an OSC message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. The address parameter is required, while the args and types parameters are optional. However, if args are provided, then types must also be provided and must match the amount of args provided.
- **type**: `osc.message.create` - **type**: `osc.message.create`
@@ -13,6 +14,7 @@ This processor will create an OSC message from the provided parameters. This pro
- **types**: (optional) a single string with the of each arg in order. This is required if args are provided. - **types**: (optional) a single string with the of each arg in order. This is required if args are provided.
### Example ### Example
Create an OSC message with the address `/test/message` and two integer arguments from the payload of the message being processed. Create an OSC message with the address `/test/message` and two integer arguments from the payload of the message being processed.
```yaml ```yaml
@@ -4,11 +4,13 @@ sidebar:
label: Decode label: Decode
order: 3 order: 3
--- ---
The `osc.message.decode` processor takes a array of bytes and turn it into OSC message if it can be. This processor will return an error if the bytes cannot be parsed as an OSC message The `osc.message.decode` processor takes a array of bytes and turn it into OSC message if it can be. This processor will return an error if the bytes cannot be parsed as an OSC message
- **type**: `osc.message.decode` - **type**: `osc.message.decode`
### Example ### Example
```yaml ```yaml
- type: osc.message.encode - type: osc.message.encode
``` ```
@@ -4,11 +4,13 @@ sidebar:
label: Encode label: Encode
order: 2 order: 2
--- ---
The `osc.message.encode` processor takes an OSC message and turns it into an array of bytes. This processor will return an error if the OSC message cannot be turned into bytes. The `osc.message.encode` processor takes an OSC message and turns it into an array of bytes. This processor will return an error if the OSC message cannot be turned into bytes.
- **type**: `osc.message.encode` - **type**: `osc.message.encode`
### Example ### Example
```yaml ```yaml
- type: osc.message.encode - type: osc.message.encode
``` ```
@@ -4,14 +4,15 @@ sidebar:
label: Output label: Output
order: 1 order: 1
--- ---
The `router.output` processor takes any payload and outputs to the specified module. The `router.output` processor takes any payload and outputs to the specified module.
- **type**: `router.output` - **type**: `router.output`
- **params**: - **params**:
- **module**: the id of the [module](/concepts/modules) to output to. - **module**: the id of the [module](/concepts/modules) to output to.
### Example ### Example
Output to the `osc-out` module. Output to the `osc-out` module.
```yaml ```yaml
@@ -4,12 +4,15 @@ sidebar:
label: Expr label: Expr
order: 2 order: 2
--- ---
The processor will execute the provided Expr expression and return the result as the new payload. This processor will return an error if the expression cannot be executed or if there is an error during execution. The expression will have access to the [wrapped payload](/concepts/payloads). The processor will execute the provided Expr expression and return the result as the new payload. This processor will return an error if the expression cannot be executed or if there is an error during execution. The expression will have access to the [wrapped payload](/concepts/payloads).
- **type**: `script.expr` - **type**: `script.expr`
- **params**: - **params**:
- **expression**: the Expr expressiont to execute. - **expression**: the Expr expressiont to execute.
### Example ### Example
This example will add 1 to the wrapped payload. This example will add 1 to the wrapped payload.
```yaml ```yaml
@@ -14,7 +14,9 @@ This run your JavaScript program in a [sandboxed environment](https://gitlab.com
- **type**: `script.js` - **type**: `script.js`
- **params**: - **params**:
- **program**: The JavaScript program to run. The payload is available as a global variable called `payload`. - **program**: The JavaScript program to run. The payload is available as a global variable called `payload`.
### Example ### Example
Replace all occurrences of `|` with `,` in the payload Replace all occurrences of `|` with `,` in the payload
```yaml ```yaml
@@ -4,6 +4,7 @@ sidebar:
label: WASM label: WASM
order: 3 order: 3
--- ---
This processor will load and execute a WASM plugin using the [Extism](https://extism.org/) runtime. The processor will execute the specified function in the WASM plugin and return the result as the new payload. This processor will return an error if the plugin cannot be loaded, if the function cannot be executed, or if there is an error during execution. The incoming payload will be passed as the argument to the WASM function. If the plugin is successfully executed, the result of the function will be returned as the new payload. This processor will load and execute a WASM plugin using the [Extism](https://extism.org/) runtime. The processor will execute the specified function in the WASM plugin and return the result as the new payload. This processor will return an error if the plugin cannot be loaded, if the function cannot be executed, or if there is an error during execution. The incoming payload will be passed as the argument to the WASM function. If the plugin is successfully executed, the result of the function will be returned as the new payload.
- **type**: `script.wasm` - **type**: `script.wasm`
@@ -13,7 +14,9 @@ This processor will load and execute a WASM plugin using the [Extism](https://ex
- **enableWasi**: (optional) whether to enable WASI for the plugin defaults to `false` - **enableWasi**: (optional) whether to enable WASI for the plugin defaults to `false`
### Example ### Example
This example will load the plugin at `./test.wasm` and execute the `test` function This example will load the plugin at `./test.wasm` and execute the `test` function
```yaml ```yaml
- type: script.wasm - type: script.wasm
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 1 order: 1
--- ---
This processor will create a SIP response message with an audio file as the payload. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the audio file included in the response. This processor will create a SIP response message with an audio file as the payload. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the audio file included in the response.
- **type**: `sip.response.audio.create` - **type**: `sip.response.audio.create`
@@ -13,7 +14,9 @@ This processor will create a SIP response message with an audio file as the payl
- **postWait**: the amount of time in milliseconds to wait after sending the response - **postWait**: the amount of time in milliseconds to wait after sending the response
### Example ### Example
This example will create a SIP response that will wait 1 second then play `response.wav` then wait another second before completing the response. This example will create a SIP response that will wait 1 second then play `response.wav` then wait another second before completing the response.
```yaml ```yaml
- type: sip.response.audio.create - type: sip.response.audio.create
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 1 order: 1
--- ---
This processor will create a SIP DTMF response from the provided parameters. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the DTMF tones specified. This processor will create a SIP DTMF response from the provided parameters. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the DTMF tones specified.
- **type**: `sip.response.dtmf.create` - **type**: `sip.response.dtmf.create`
@@ -13,7 +14,9 @@ This processor will create a SIP DTMF response from the provided parameters. If
- **postWait**: the amount of time in milliseconds to wait after sending the response - **postWait**: the amount of time in milliseconds to wait after sending the response
### Example ### Example
This example will create a SIP response that will wait 1 second then play the DTMF digits "1234" then wait another second before completing the response. This example will create a SIP response that will wait 1 second then play the DTMF digits "1234" then wait another second before completing the response.
```yaml ```yaml
- type: sip.response.dtmf.create - type: sip.response.dtmf.create
params: params:
@@ -4,6 +4,7 @@ sidebar:
label: Create label: Create
order: 3 order: 3
--- ---
The `string.create` processor creates a string based on the provided template. This processor will return an error if there is an issue executing the template. The template property is just a [Go template](https://pkg.go.dev/text/template) that will be evaluated with the incoming message provided as an environment. The `string.create` processor creates a string based on the provided template. This processor will return an error if there is an issue executing the template. The template property is just a [Go template](https://pkg.go.dev/text/template) that will be evaluated with the incoming message provided as an environment.
- **type**: `string.create` - **type**: `string.create`
@@ -11,7 +12,9 @@ The `string.create` processor creates a string based on the provided template. T
- **template**: string template that will have the incoming message as the context - **template**: string template that will have the incoming message as the context
### Example ### Example
This would create a string using the `Address` property of the incoming message like and OSC message This would create a string using the `Address` property of the incoming message like and OSC message
```yaml ```yaml
- type: string.create - type: string.create
params: params:
@@ -4,11 +4,13 @@ sidebar:
label: Decode label: Decode
order: 1 order: 1
--- ---
The `string.decode` processor takes a array of bytes and turn it into string. This processor will return an error if the message being processed is not an array of bytes. The `string.decode` processor takes a array of bytes and turn it into string. This processor will return an error if the message being processed is not an array of bytes.
- **type**: `string.decode` - **type**: `string.decode`
### Example ### Example
```yaml ```yaml
- type: string.decode - type: string.decode
``` ```
@@ -4,11 +4,13 @@ sidebar:
label: Encode label: Encode
order: 2 order: 2
--- ---
The `string.encode` processor takes a string and turns it into an array of bytes. This processor will return an error if the message being processed is not a string. The `string.encode` processor takes a string and turns it into an array of bytes. This processor will return an error if the message being processed is not a string.
- **type**: `string.encode` - **type**: `string.encode`
### Example ### Example
```yaml ```yaml
- type: string.encode - type: string.encode
``` ```
@@ -4,6 +4,7 @@ sidebar:
label: Split label: Split
order: 5 order: 5
--- ---
The `string.split` processor takes a string and turns it into an array of strings by splitting on `params.separator`. This processor will return an error if the message being processed is not a string. The `string.split` processor takes a string and turns it into an array of strings by splitting on `params.separator`. This processor will return an error if the message being processed is not a string.
- **type**: `string.split` - **type**: `string.split`
@@ -11,6 +12,7 @@ The `string.split` processor takes a string and turns it into an array of string
- **pattern**: string to split incoming string on - **pattern**: string to split incoming string on
### Example ### Example
Split incoming string on `,` i.e `"one,two,three"` -> `["one","two","three"]` Split incoming string on `,` i.e `"one,two,three"` -> `["one","two","three"]`
```yaml ```yaml
@@ -4,6 +4,7 @@ sidebar:
label: Sleep label: Sleep
order: 1 order: 1
--- ---
The `time.sleep` processor will sleep for the specified `duration` in milliseconds before passing the message to the next processor. The `time.sleep` processor will sleep for the specified `duration` in milliseconds before passing the message to the next processor.
- **type**: `time.sleep` - **type**: `time.sleep`
@@ -11,7 +12,9 @@ The `time.sleep` processor will sleep for the specified `duration` in millisecon
- **duration**: the duration to sleep in milliseconds - **duration**: the duration to sleep in milliseconds
### Example ### Example
This would sleep for 5 seconds before passing the message to the next processor. This would sleep for 5 seconds before passing the message to the next processor.
```yaml ```yaml
- type: time.sleep - type: time.sleep
params: params:
+7 -5
View File
@@ -4,21 +4,23 @@ sidebar:
order: 1 order: 1
--- ---
import { Steps } from '@astrojs/starlight/components'; import { Steps } from "@astrojs/starlight/components";
<Steps> <Steps>
1. install 1. install
- via go: `go install github.com/jwetzell/showbridge-go/cmd/showbridge@latest` - via go: `go install github.com/jwetzell/showbridge-go/cmd/showbridge@latest`
- [binaries](https://github.com/jwetzell/showbridge-go/releases/latest) - <a
href="https://github.com/jwetzell/showbridge-go/releases/latest"
target="_blank"
>
binaries
</a>
2. create a config file (see [config](/concepts/config/)) 2. create a config file (see [config](/concepts/config/))
3. run 3. run
- `showbridge --config config.yaml` - `showbridge --config config.yaml`
- see below for all flags - see below for all flags
+2 -5
View File
@@ -4,19 +4,16 @@ sidebar:
order: 2 order: 2
--- ---
import { Steps, Code } from '@astrojs/starlight/components'; import { Steps, Code } from "@astrojs/starlight/components";
<Steps> <Steps>
1. create a config file (see [config](/concepts/config/)) 1. create a config file (see [config](/concepts/config/))
2. run
3. run
- <Code code="docker run -it -v/path/to/config.yaml:/app/config.yaml jwetzell/showbridge:latest --debug" /> - <Code code="docker run -it -v/path/to/config.yaml:/app/config.yaml jwetzell/showbridge:latest --debug" />
- see [CLI Usage](/guides/cli-usage) for more detail on flags - see [CLI Usage](/guides/cli-usage) for more detail on flags
- see [Docker docs](https://docs.docker.com/) for how to use docker - see [Docker docs](https://docs.docker.com/) for how to use docker
</Steps> </Steps>
+1 -2
View File
@@ -4,7 +4,7 @@ sidebar:
order: 3 order: 3
--- ---
import { Steps } from '@astrojs/starlight/components'; import { Steps } from "@astrojs/starlight/components";
<Steps> <Steps>
1. clone repo 1. clone repo
@@ -12,7 +12,6 @@ import { Steps } from '@astrojs/starlight/components';
2. install dependencies: `go mod tidy` 2. install dependencies: `go mod tidy`
3. run cli: 3. run cli:
- `go run ./cmd/showbridge --config config.yaml` - `go run ./cmd/showbridge --config config.yaml`
- see [CLI Usage](/guides/cli-usage) for more flags - see [CLI Usage](/guides/cli-usage) for more flags
+1 -1
View File
@@ -14,7 +14,7 @@ sidebar:
- [filtering OSC message](/processors/osc/message/filter) - [filtering OSC message](/processors/osc/message/filter)
- [running custom JavaScript snippets](/processors/script/js) - [running custom JavaScript snippets](/processors/script/js)
import { Aside } from '@astrojs/starlight/components'; import { Aside } from "@astrojs/starlight/components";
<Aside type="note"> <Aside type="note">
Router output is also handled by [a processor](/processors/router/output)! Router output is also handled by [a processor](/processors/router/output)!
+1
View File
@@ -8,6 +8,7 @@ sidebar:
showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) taken way too far. showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) taken way too far.
### Included Modules ### Included Modules
- HTTP - HTTP
- server - server
- UDP - UDP