Skip to content

Commit

Permalink
Merge pull request #58 from istnv/V3.0
Browse files Browse the repository at this point in the history
Collect list of XAir units on network: #43
Next and Prior Snapshot Name variables: #47 
Improved sync/startup throughput
Bugfix for #59
  • Loading branch information
istnv authored Mar 12, 2023
2 parents 423e7a8 + e79b38f commit 0eaa91b
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 64 deletions.
44 changes: 20 additions & 24 deletions buildStripDefs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
import { defStrip } from './defStrip.js'
import { combineRgb, Regex } from '@companion-module/base'
import { pad0, unSlash, setToggle, fadeTo } from './helpers.js'
Expand All @@ -8,6 +9,7 @@ export function buildStripDefs(self) {
let stat = {}
let muteActions = {}
let procActions = {}
let trimActions = {}
let fadeActions = {}
let storeActions = {}
let sendActions = {}
Expand Down Expand Up @@ -71,8 +73,6 @@ export function buildStripDefs(self) {
defaultLabel = defaultLabel + ' '
}

// console.log(`${chID}${muteSfx}, ${fadeSfx}`);

// additional strip toggles

for (let p of theStrip.proc) {
Expand Down Expand Up @@ -154,7 +154,7 @@ export function buildStripDefs(self) {
const opt = action.options
const nVal = opt.type == '/ch/' ? pad0(opt.num) : opt.num
const cmd =
action.actionId == 'lr' ? opt.type + nVal + '/mix/lr' : opt.type + nval + '/' + action.actionId + '/on'
action.actionId == 'lr' ? opt.type + nVal + '/mix/lr' : opt.type + nVal + '/' + action.actionId + '/on'
const arg = {
type: 'i',
value: setToggle(self.xStat[cmd].isOn, opt.set),
Expand Down Expand Up @@ -382,11 +382,8 @@ export function buildStripDefs(self) {
],
callback: async (action, context) => {
const opt = action.options
let nVal = opt.num
if (opt.type == '/ch/') {
nVal = pad0(nVal)
}
const cmd = opt.type + nVal
let nVal = (opt.type == '/ch/' ? pad0(opt.num) : opt.num)
let cmd = opt.type + nVal
cmd += opt.type == '/dca/' ? '/fader' : '/mix/fader'
let fVal = fadeTo(action.actionId, cmd, opt, self)
const arg = {
Expand Down Expand Up @@ -429,7 +426,7 @@ export function buildStripDefs(self) {
if (opt.type == '/ch/') {
nVal = pad0(nVal)
}
const strip = opt.type + nVal
let strip = opt.type + nVal
strip += opt.type == '/dca/' ? '/fader' : '/mix/fader'
fadeTo(action.actionId, strip, opt, self)
},
Expand Down Expand Up @@ -467,7 +464,7 @@ export function buildStripDefs(self) {
if (opt.type == '/ch/') {
nVal = pad0(nVal)
}
const strip = opt.type + nVal
let strip = opt.type + nVal
strip += opt.type == '/dca/' ? '/fader' : '/mix/fader'
let fVal = fadeTo(action.actionId, strip, opt, self)
const arg = {
Expand Down Expand Up @@ -530,8 +527,8 @@ export function buildStripDefs(self) {

fadeActions[fadeID + '_a'].options.push({
type: 'number',
tooltip: 'Move fader +/- percent.\nFader Percent:\n0 = -oo, 75 = 0db, 100 = +10db',
label: 'Adjust',
tooltip: 'Move fader +/- percent.',
label: 'Adjust By',
id: 'ticks',
min: -100,
max: 100,
Expand Down Expand Up @@ -675,9 +672,8 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
let fVal = fadeTo(action.actionId, strip, opt, self)
self.sendOSC(strip, { type: 'f', value: fVal })
const strip = opt.type + nVal + 'mix/' + bVal + '/level'
fadeTo(action.actionId, strip, opt, self)
},
}

Expand Down Expand Up @@ -715,8 +711,8 @@ export function buildStripDefs(self) {
},
{
type: 'number',
title: 'Move fader +/- percent.\nFader percent:\n0 = -oo, 75 = 0db, 100 = +10db',
label: 'Adjust',
title: 'Move fader +/- percent.',
label: 'Adjust by',
id: 'ticks',
min: -100,
max: 100,
Expand All @@ -732,7 +728,7 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
let strip = opt.type + nVal + 'mix/' + bVal + '/level'
let fVal = fadeTo(action.actionId, strip, opt, self)
self.sendOSC(strip, { type: 'f', value: fVal })
},
Expand All @@ -751,7 +747,7 @@ export function buildStripDefs(self) {
}

storeActions[sendID + '_s'] = {
label: 'Store Send Level',
name: 'Store Send Level',
options: [
{
type: 'dropdown',
Expand Down Expand Up @@ -791,7 +787,7 @@ export function buildStripDefs(self) {
choices: [
{
id: 'me',
label: 'Channel',
label: 'Channel Send',
},
...self.STORE_LOCATION,
],
Expand All @@ -806,13 +802,13 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
const strip = opt.type + nVal + 'mix/' + bVal + '/level'
fadeTo(action.actionId, strip, opt, self)
},
}

storeActions[sendID + '_r'] = {
label: 'Recall Send Level',
name: 'Recall Send Level',
options: [
{
type: 'dropdown',
Expand Down Expand Up @@ -852,7 +848,7 @@ export function buildStripDefs(self) {
choices: [
{
id: 'me',
label: 'Channel',
label: 'Channel Send',
},
...self.STORE_LOCATION,
],
Expand All @@ -867,7 +863,7 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
const strip = opt.type + nVal + 'mix/' + bVal + '/level'
let fVal = fadeTo(action.actionId, strip, opt, self)
self.sendOSC(strip, { type: 'f', value: fVal })
},
Expand Down
8 changes: 8 additions & 0 deletions companion/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ to get additional information about the consoles and their capabilities.
## Configuration
**Target IP:** Enter the IP address of the Mixer

**Scan for XAir Mixers?** Module will scan for XAir mixers on the network

**Select mixer by Name** Choose a mixer from those located on the network

**Note* Once a mixer (name) is chosen, the module will attempt to re-locate it if the IP changes. This feature can be disabled by un-checking the *Scan for Mixers* option

## Supported Actions
Console Function | What it does
-----------------|---------------
Expand Down Expand Up @@ -53,6 +59,8 @@ Variable | Description
**$(INSTANCENAME:m_fw)** | Mixer Firmware
**$(INSTANCENAME:s_name)** | Current Snapshot Name
**$(INSTANCENAME:s_index)** | Current Snapshot Number
**$(INSTANCENAME:s_name_n)** | Next Snapshot Name
**$(INSTANCENAME:s_name_p)** | Prior Snapshot Name
**$(INSTANCENAME:s_name_{num})** | Name of Snapshot {num} **see notes*
**$(INSTANCENAME:l_lr)** | Label on LR/Main
**$(INSTANCENAME:l_rtn_aux)** | Label on USB/Aux return
Expand Down
11 changes: 11 additions & 0 deletions defStrip.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ export const defStrip = [
'fadeID': 'fad',
'hasLevel': true,
'hasMix': true,
'trim': ['preamp','headamp'],
'proc': ['gate', 'insert', 'eq', 'dyn', 'lr'],
'procPfx': '',
'hasOn': true,
'hasPan': true,
},
{
'id': 'rtn',
Expand All @@ -25,9 +27,11 @@ export const defStrip = [
'fadeID': 'fad',
'hasLevel': true,
'hasMix': true,
'trim': ['preamp'],
'proc': ['eq', 'lr'],
'procPfx': '',
'hasOn': true,
'hasPan': false,
},
{
'id': 'fxsend',
Expand All @@ -43,6 +47,7 @@ export const defStrip = [
'proc': [],
'procPfx': '',
'hasOn': true,
'hasPan': false,
},
{
'id': 'bus',
Expand All @@ -58,6 +63,7 @@ export const defStrip = [
'proc': ['insert', 'eq', 'dyn', 'lr'],
'procPfx': '',
'hasOn': true,
'hasPan': true,
},
{
'id': 'dca',
Expand All @@ -72,6 +78,7 @@ export const defStrip = [
'hasMix': false,
'proc': [],
'hasOn': true,
'hasPan': false,
},
{
'id': 'lr',
Expand All @@ -87,6 +94,7 @@ export const defStrip = [
'procPfx': 'm_',
'proc': ['insert', 'eq', 'dyn'],
'hasOn': true,
'hasPan': true,
},
{
'id': 'rtn/aux',
Expand All @@ -99,9 +107,11 @@ export const defStrip = [
'fadeID': 'usbFad',
'hasLevel': true,
'hasMix': true,
'trim': ['preamp','headamp'],
'proc': ['eq'],
'procPfx': 'u_',
'hasOn': true,
'hasPan': true,
},
{
'id': 'config/mute',
Expand All @@ -114,5 +124,6 @@ export const defStrip = [
'hasMix': false,
'proc': [],
'hasOn': false,
'hasPan': false,
},
]
Loading

0 comments on commit 0eaa91b

Please sign in to comment.