Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions companion/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ If you continue to experience issues, you can open an issue on the [GitHub repos
| Common | Undo Panorama Adjust | Undo the previous adjustment on the panorama of a channel, aux, bus, matrix or main. |
| Common | Undo Send Level Adjust | Undo the previous send level adjustment from a destination channel strip to a source |
| Common | Undo Send Panorama Adjust | Undo the panorama adjustment of a send from a channel or aux to a bus or matrix. |
| Configuration | Set Monitor PFL Dim | Set the PFL dim amount of a monitor channel (0 to 40 dB). |
| Configuration | Set Monitor Source Level | Set the source level of a monitor channel (-144 to 10 dB). |
| Configuration | Set Solo Dim | Set or toggle the dim state of the solo output. |
| Configuration | Set Solo LR Swap | Set the left-right channel swap of the solo channel. |
| Configuration | Set Solo Mono | Set or toggle the mono state of the solo output. |
Expand Down
44 changes: 37 additions & 7 deletions src/actions/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ import { WingConfig } from '../config.js'
import * as ActionUtil from './utils.js'
import { ConfigurationCommands } from '../commands/config.js'
import { getIdLabelPair } from '../choices/utils.js'
import { getTalkbackOptions, getTalkbackModeOptions, getTalkbackIndividualOptions } from '../choices/config.js'
import {
getTalkbackOptions,
getTalkbackModeOptions,
getTalkbackIndividualOptions,
getMonitorOptions,
} from '../choices/config.js'
import { WingRack } from '../models/rack.js'

export enum ConfigActions {
Expand All @@ -28,6 +33,8 @@ export enum ConfigActions {

// Monitor
SetMonitorLevel = 'set-monitor-level',
SetMonitorSourceLevel = 'set-monitor-source-level',
SetMonitorPflDim = 'set-monitor-pfl-dim',

// Talkback
TalkbackOn = 'talkback-on',
Expand Down Expand Up @@ -103,12 +110,7 @@ export function createConfigurationActions(self: InstanceBaseExt<WingConfig>): C
description:
'Set the level of a monitor channel. ATTENTION: This command only works on the Rack and Compact Model, due to the full-size Wing having potentiometers as control knobs.',
options: [
...GetDropdownWithVariables(
'Monitor',
'mon',
[getIdLabelPair('1', 'Monitor 1'), getIdLabelPair('2', 'Monitor 2')],
'1',
),
...GetDropdownWithVariables('Monitor', 'mon', getMonitorOptions(), '1'),
...GetFaderInputFieldWithVariables('level'),
],
callback: async (event) => {
Expand All @@ -119,6 +121,34 @@ export function createConfigurationActions(self: InstanceBaseExt<WingConfig>): C
},
}
: undefined,
[ConfigActions.SetMonitorSourceLevel]: {
name: 'Set Monitor Source Level',
description: 'Set the source level of a monitor channel (-144 to 10 dB).',
options: [
...GetDropdownWithVariables('Monitor', 'mon', getMonitorOptions(), '1'),
...GetFaderInputFieldWithVariables('level'),
],
callback: async (event) => {
const monitor = ActionUtil.getNumberWithVariables(event, 'mon')
const level = ActionUtil.getNumberWithVariables(event, 'level')
const cmd = ConfigurationCommands.MonitorSourceLevel(monitor)
ActionUtil.runTransition(cmd, 'level', event, state, transitions, level)
},
},
[ConfigActions.SetMonitorPflDim]: {
name: 'Set Monitor PFL Dim',
description: 'Set the PFL dim amount of a monitor channel (0 to 40 dB).',
options: [
...GetDropdownWithVariables('Monitor', 'mon', getMonitorOptions(), '1'),
...GetNumberFieldWithVariables('Dim [dB]', 'dim', 0, 40, 1, 10),
],
callback: async (event) => {
const monitor = ActionUtil.getNumberWithVariables(event, 'mon')
const dim = ActionUtil.getNumberWithVariables(event, 'dim')
const cmd = ConfigurationCommands.MonitorPflDim(monitor)
await send(cmd, dim, true)
},
},

////////////////////////////////////////////////////////////////
// Talkback
Expand Down
4 changes: 4 additions & 0 deletions src/choices/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { DropdownChoice } from '@companion-module/base'
import { getIdLabelPair } from './utils.js'

export function getMonitorOptions(): DropdownChoice[] {
return [getIdLabelPair('1', 'Monitor 1'), getIdLabelPair('2', 'Monitor 2')]
}

export function getTalkbackOptions(): DropdownChoice[] {
return [getIdLabelPair('A', 'Talkback A'), getIdLabelPair('B', 'Talkback B')]
}
Expand Down