diff --git a/companion/HELP.md b/companion/HELP.md index bcc0e9c..2dcb744 100644 --- a/companion/HELP.md +++ b/companion/HELP.md @@ -23,3 +23,4 @@ If you're missing a feature, feel free to [open an issue](https://github.com/bit | Shows, Snapshots, Cues | Load shows, snapshots and cues. Save snapshots and cues | | Phantom Power | Switch phantom power on hardware channels | | Automix | Enable/disable automix groups, assign channels to groups | +| FX Settings | Set parameters and BPM for FX processors | diff --git a/examples/page12-fx-settings.companionconfig b/examples/page12-fx-settings.companionconfig index 8bd6c46..b32a916 100644 --- a/examples/page12-fx-settings.companionconfig +++ b/examples/page12-fx-settings.companionconfig @@ -11,14 +11,14 @@ "1": { "type": "button", "style": { - "text": "BPM 120\\nFX 2,3,4", + "text": "FX 1\\nBPM 30", "textExpression": false, "size": "14", "png64": null, "alignment": "center:center", "pngalignment": "center:center", "color": 16777215, - "bgcolor": 0, + "bgcolor": 26112, "show_topbar": "default" }, "options": { @@ -32,16 +32,14 @@ "action_sets": { "down": [ { - "id": "OARPe-Gg6irO-VAkLJbRH", + "id": "UTgS7ob8TRE7nk5gOPsC5", "action": "setfxbpm", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": { "fx": [ - 2, - 3, - 4 + 1 ], - "bpm": 120 + "bpm": 30 }, "delay": 0 } @@ -57,14 +55,14 @@ "2": { "type": "button", "style": { - "text": "BPM 60\\nFX 2,3,4", + "text": "FX 2\\nBPM 180", "textExpression": false, "size": "14", "png64": null, "alignment": "center:center", "pngalignment": "center:center", "color": 16777215, - "bgcolor": 0, + "bgcolor": 26112, "show_topbar": "default" }, "options": { @@ -78,16 +76,14 @@ "action_sets": { "down": [ { - "id": "lFiVLFdmrjX8IckLqnsqR", + "id": "VDd81R1RXwS19SWTVahwi", "action": "setfxbpm", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": { "fx": [ - 2, - 3, - 4 + 2 ], - "bpm": 60 + "bpm": 180 }, "delay": 0 } @@ -103,14 +99,58 @@ "3": { "type": "button", "style": { - "text": "BPM 80\\nFX 4", + "text": "FX 3\\nBPM 100", "textExpression": false, "size": "14", "png64": null, "alignment": "center:center", "pngalignment": "center:center", "color": 16777215, - "bgcolor": 0, + "bgcolor": 26112, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "YYPIz5BL2opF6x84x9VIX", + "action": "setfxbpm", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": [ + 3 + ], + "bpm": 100 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "4": { + "type": "button", + "style": { + "text": "FX 4\\nBPM 80", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 26112, "show_topbar": "default" }, "options": { @@ -144,17 +184,17 @@ } } }, - "4": { + "6": { "type": "button", "style": { - "text": "BPM 100\\nFX 3", + "text": "FX 2,3,4\\nBPM 120", "textExpression": false, "size": "14", "png64": null, "alignment": "center:center", "pngalignment": "center:center", "color": 16777215, - "bgcolor": 0, + "bgcolor": 26112, "show_topbar": "default" }, "options": { @@ -168,14 +208,62 @@ "action_sets": { "down": [ { - "id": "YYPIz5BL2opF6x84x9VIX", + "id": "OARPe-Gg6irO-VAkLJbRH", "action": "setfxbpm", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": { "fx": [ - 3 + 2, + 3, + 4 ], - "bpm": 100 + "bpm": 120 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "7": { + "type": "button", + "style": { + "text": "FX 2,3,4\\nBPM 60", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 26112, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "lFiVLFdmrjX8IckLqnsqR", + "action": "setfxbpm", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": [ + 2, + 3, + 4 + ], + "bpm": 60 }, "delay": 0 } @@ -192,11 +280,529 @@ "1": { "0": { "type": "pagenum" + }, + "1": { + "type": "button", + "style": { + "text": "FX 1\\nParam 2\\n80 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "9ZWjUhGQke9s-mwOXDrns", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 1, + "param": 2, + "value": 80 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "2": { + "type": "button", + "style": { + "text": "FX 2\\nParam 3\\n60 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "gEfXHsixkpnpeCx4Q5fQv", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 2, + "param": 3, + "value": 60 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "3": { + "type": "button", + "style": { + "text": "FX 3\\nParam 4\\n20 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "RntQBYjPiXG3lFZapzcu9", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 3, + "param": 4, + "value": 20 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "4": { + "type": "button", + "style": { + "text": "FX 4\\nParam 1\\n80 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "r8eMny7b6gm_KWUAsZIgH", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 4, + "param": 1, + "value": 80 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } } }, "2": { "0": { "type": "pagedown" + }, + "1": { + "type": "button", + "style": { + "text": "FX 1\\nParam 2\\n50 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "3LR7ssY07MlFCXeL1nqLv", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 1, + "param": 2, + "value": 50 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "2": { + "type": "button", + "style": { + "text": "FX 2\\nParam 3\\n100 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "1m7vGzmPF36YsKT0e2q8o", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 2, + "param": 3, + "value": 100 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "3": { + "type": "button", + "style": { + "text": "FX 3\\nParam 4\\n90 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "XlF_urOlF0okOVhzxGDWH", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 3, + "param": 4, + "value": 90 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "4": { + "type": "button", + "style": { + "text": "FX 4\\nParam 1\\n35 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "ZDKd0UDgI68O64Ch0Nwog", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 4, + "param": 1, + "value": 35 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + } + }, + "3": { + "1": { + "type": "button", + "style": { + "text": "FX 1\\nParam 3\\n30 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "_MlubS7ORUtN-EQ3YdDpW", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 1, + "param": 3, + "value": 30 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "2": { + "type": "button", + "style": { + "text": "FX 2\\nParam 4\\n0 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "5YB8N0V1wpwdh8fVwWNfu", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 2, + "param": 4, + "value": 0 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "3": { + "type": "button", + "style": { + "text": "FX 3\\nParam 1\\n80 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "jVY_U355Mbg-D6rT3V6Nf", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 3, + "param": 1, + "value": 80 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } + }, + "4": { + "type": "button", + "style": { + "text": "FX 4\\nParam 3\\n10 %", + "textExpression": false, + "size": "14", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "c05AxYUrimP6Ej0fjTrHq", + "action": "setfxparam", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "fx": 4, + "param": 3, + "value": 10 + }, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } } } }, diff --git a/src/actions.ts b/src/actions.ts index 30714e5..ffb6bc3 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -47,6 +47,7 @@ export enum ActionId { // FX Settings SetFxBPM = 'setfxbpm', + SetFxParam = 'setfxparam', // Volume Buses (SOLO, Headphone) SetVolumeBusValue = 'setvolumebusvalue', @@ -537,6 +538,57 @@ export function GetActionsList(conn: SoundcraftUI): CompanionActionDefinitions { }, }, + [ActionId.SetFxParam]: { + name: 'FX: Set FX Parameter', + description: + 'Set parameter for an FX processor. Not every FX uses all of the 6 available parameters. There are no units and number conversion available: The value represents the fader range in percent.', + options: [ + { + type: 'dropdown', + label: 'FX', + id: 'fx', + choices: [ + { id: 1, label: 'FX 1' }, + { id: 2, label: 'FX 2' }, + { id: 3, label: 'FX 3' }, + { id: 4, label: 'FX 4' }, + ], + default: 1, + }, + { + type: 'dropdown', + label: 'Parameter', + id: 'param', + choices: [ + { id: 1, label: '1' }, + { id: 2, label: '2' }, + { id: 3, label: '3' }, + { id: 4, label: '4' }, + { id: 5, label: '5' }, + { id: 6, label: '6' }, + ], + default: 1, + }, + { + type: 'number', + label: 'Parameter Fader Level (%)', + id: 'value', + range: true, + required: true, + default: 0, + step: 1, + min: 0, + max: 100, + }, + ], + callback: (action) => { + const normalizedValue = Number(action.options.value) / 100 + + const fx = conn.fx(Number(action.options.fx)) + fx.setParam(Number(action.options.param), normalizedValue) + }, + }, + /** * Media Player */