Name matrix inputs, fix the meter scale, add output meters
Found on the live S31 (read-only, plus meter subscriptions):
- Matrix inputs are named at /Matrix_Inputs/N/Channel_Input/name (an
address missing from DiGiCo's 2014 list). Their names now appear in
every matrix-send dropdown, preset and the new matrix_in_N_name
variables, falling back to "Matrix In N" when empty. Matrix inputs also
get trim and phase.
- Console names are space-padded where the surface wraps them; every name
is now trimmed and its whitespace runs collapsed ("LEAD V RESI").
- Meter values are inverted: 127 is silence and lower is louder, about
1 dB per step below full scale (silent channels read 127, the room mic
36-48). The module treated 127 as peak. Level meters now read dBFS
(approximate), gauges span -60..0 dBFS, signal and peak thresholds are
in dBFS; gain reduction reads dB of reduction, 127 meaning none.
- Bus and matrix outputs have meters (/Aux_Outputs, /Group_Outputs and
/Matrix_Outputs/N/Output/meter): new signal, peak, value and gauge
feedbacks and "Buss meters" / "Matrix meters" presets.
3002 presets, 2.7 MB. npm test: 425 checks pass on Node 25 and on
Companion's Node 22. Deployed and checked on the booth Companion 5.1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,12 @@ const ENTITY_VARS = {
|
||||
buss: ['name', 'mode', 'stereo', 'fader', 'mute'],
|
||||
matrix: ['name', 'fader', 'mute'],
|
||||
cg: ['name', 'fader', 'mute'],
|
||||
minput: ['name'],
|
||||
}
|
||||
|
||||
/** Variable id prefix per entity kind (matrix inputs are matrix_in_N_...). */
|
||||
export const VAR_PREFIX = { input: 'input', buss: 'buss', matrix: 'matrix', cg: 'cg', minput: 'matrix_in' }
|
||||
|
||||
const VAR_LABEL = {
|
||||
name: 'name',
|
||||
fader: 'fader level (dB)',
|
||||
@@ -16,7 +20,7 @@ const VAR_LABEL = {
|
||||
stereo: 'Stereo/Mono',
|
||||
}
|
||||
|
||||
const ENT_LABEL = { input: 'Input', buss: 'Buss', matrix: 'Matrix output', cg: 'Control group' }
|
||||
const ENT_LABEL = { input: 'Input', buss: 'Buss', matrix: 'Matrix output', cg: 'Control group', minput: 'Matrix input' }
|
||||
|
||||
/** Variables exist only for entities the console reported (all possible ones until the first load finishes). */
|
||||
export function getVariableDefinitions(inst) {
|
||||
@@ -34,7 +38,7 @@ export function getVariableDefinitions(inst) {
|
||||
}
|
||||
for (const ent of Object.keys(ENTITY_VARS)) {
|
||||
for (const n of inst.state.numbers(ent)) {
|
||||
for (const field of ENTITY_VARS[ent]) defs[`${ent}_${n}_${field}`] = { name: `${ENT_LABEL[ent]} ${n} ${VAR_LABEL[field]}` }
|
||||
for (const field of ENTITY_VARS[ent]) defs[`${VAR_PREFIX[ent]}_${n}_${field}`] = { name: `${ENT_LABEL[ent]} ${n} ${VAR_LABEL[field]}` }
|
||||
}
|
||||
}
|
||||
return defs
|
||||
@@ -45,7 +49,8 @@ const muteText = (m) => (m === undefined ? '' : m ? 'Muted' : 'Unmuted')
|
||||
/** All current values of one entity, keyed by variable id. */
|
||||
export function entityVariableValues(inst, ent, n) {
|
||||
const s = inst.state
|
||||
const p = `${ent}_${n}_`
|
||||
const p = `${VAR_PREFIX[ent]}_${n}_`
|
||||
if (ent === 'minput') return { [`${p}name`]: s.displayName(ent, n) }
|
||||
const out = { [`${p}name`]: s.displayName(ent, n), [`${p}fader`]: fmtDb(s.getFader(ent, n)), [`${p}mute`]: muteText(s.getMute(ent, n)) }
|
||||
if (ent === 'input') out[`${p}pan`] = fmtPan(s.getPan(n))
|
||||
if (ent === 'buss') {
|
||||
|
||||
Reference in New Issue
Block a user