@joergmittaglawo/dmvconfig
Version:
DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.
125 lines (113 loc) • 2.85 kB
JavaScript
/**
* @file The Heads for the RTVE DMV Cluster
*
* @version 0.0.0-alpha.0
* @date 2020-10-13
* @author Mittag, Jörg (Lawo) <joerg.mittag@lawo.com>
*
* @changelog 2020-10-13 JMi Add tally rules
* @changelog 2020-10-07 JMi Reduce number of heads to 19*3
*/
/**
* The number of Heads for the RTVE DMV Cluster
*
* @readonly
* @constant {number}
*/
const NUMBER_OF_HEADS = 19 * 3;
const COLOR = {
RED: {
hue: 0, saturation: 100, lightness: 50, opacity: 100,
},
GREEN: {
hue: 120, saturation: 100, lightness: 50, opacity: 100,
},
YELLOW: {
hue: 60, saturation: 100, lightness: 50, opacity: 100,
},
};
/**
* The Heads for the RTVE DMV Cluster
*
* @private
* @readonly
* @constant {object}
*/
const HEADS = Array.from(
{ length: NUMBER_OF_HEADS },
() => (
{
standard: 'HD1080p50',
streaming: 'ST2110_GPM',
pips: 25,
clocks: {
digital: 2,
analog: 2,
},
textboxes: 2,
tallyRules: [
{
priority: 2,
color: COLOR.RED,
},
{
priority: 0,
color: COLOR.GREEN,
},
{
level: 14,
priority: 1,
color: COLOR.YELLOW,
},
],
}
),
);
const HEAD_INDICES = {
STUDIO1: [0, 1, 2, 3, 4, 5, 6, 7, 38, 40, 41, 42],
STUDIO2: [19, 20, 21, 22, 23, 24, 25, 26, 39, 43, 44, 45],
STUDIO3: [8, 9, 10, 11, 12, 13, 14, 15, 16, 46, 47, 48],
STUDIO4: [27, 28, 29, 30, 31, 32, 33, 34, 35, 49, 50, 51],
CONTROL: [17, 18, 36, 37, 52, 53, 54, 55, 56],
};
// Tally rules for studio 1
for (const headIndex of HEAD_INDICES.STUDIO1) {
HEADS[headIndex].tallyRules.slice(0, -1).forEach(
(tallyRule, level) =>
tallyRule.level = level,
);
}
// Tally rules for studio 2
for (const headIndex of HEAD_INDICES.STUDIO2) {
HEADS[headIndex].tallyRules.slice(0, -1).forEach(
(tallyRule, level) =>
tallyRule.level = level + 2,
);
}
// Tally rules for studio 3
for (const headIndex of HEAD_INDICES.STUDIO3) {
HEADS[headIndex].tallyRules.slice(0, -1).forEach(
(tallyRule, level) =>
tallyRule.level = level + 4,
);
}
// Tally rules for studio 4
for (const headIndex of HEAD_INDICES.STUDIO4) {
HEADS[headIndex].tallyRules.slice(0, -1).forEach(
(tallyRule, level) =>
tallyRule.level = level + 6,
);
}
// Tally rules for central control
for (const headIndex of HEAD_INDICES.CONTROL) {
HEADS[headIndex].tallyRules = [
// We "steal" the rule for RED tally from each studio
HEADS[HEAD_INDICES.STUDIO1[0]].tallyRules[0],
HEADS[HEAD_INDICES.STUDIO2[0]].tallyRules[0],
HEADS[HEAD_INDICES.STUDIO3[0]].tallyRules[0],
HEADS[HEAD_INDICES.STUDIO4[0]].tallyRules[0],
// Yellow tally is the same for all studios
HEADS[HEAD_INDICES.STUDIO1[0]].tallyRules[2],
];
}
module.exports = HEADS;