From f5dae712e32e78cfa9fa62e7bb3ad9058c18e26b Mon Sep 17 00:00:00 2001 From: olzzon Date: Mon, 26 Oct 2020 08:25:16 +0100 Subject: [PATCH] chore: rename enum: EgLowGain to EqGain01 etc. for easier handling scaling and loops --- client/assets/css/ChanStripFull.css | 5 ++ client/components/ChanStrip.tsx | 24 +++++----- client/components/ChanStripFull.tsx | 21 ++++++-- server/constants/MixerProtocolInterface.ts | 24 +++++----- .../mixerProtocols/behringerXrMaster.ts | 16 +++---- .../constants/mixerProtocols/midasMaster.ts | 48 +++++++++---------- .../mixerConnections/OscMixerConnection.ts | 16 +++---- 7 files changed, 85 insertions(+), 69 deletions(-) diff --git a/client/assets/css/ChanStripFull.css b/client/assets/css/ChanStripFull.css index 04face51..afda3b11 100644 --- a/client/assets/css/ChanStripFull.css +++ b/client/assets/css/ChanStripFull.css @@ -255,3 +255,8 @@ #3a3a3a 100% ); } + +.eq-group > .dot { + font-size: 40px; + height: 40px; +} diff --git a/client/components/ChanStrip.tsx b/client/components/ChanStrip.tsx index 2e901085..4cf437a7 100644 --- a/client/components/ChanStrip.tsx +++ b/client/components/ChanStrip.tsx @@ -477,10 +477,10 @@ class ChanStrip extends React.PureComponent< const hasDelay = window.mixerProtocol.channelTypes[0].toMixer.DELAY_TIME const hasEq = - window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqLowGain] || - window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqLowMidGain] || - window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqMidGain] || - window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqHighGain] + window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain01] || + window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain02] || + window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain03] || + window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain04] const hasMonitorSends = this.props.channel.find( (ch: any) => ch.auxLevel[this.props.auxSendIndex] >= 0 ) @@ -533,9 +533,9 @@ class ChanStrip extends React.PureComponent<
{window.mixerProtocol - .channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqLowGain] ? ( + .channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain01] ? ( - {this.eqGain(fxParamsList.EqLowGain)} + {this.eqGain(fxParamsList.EqGain01)}

_______

@@ -543,18 +543,18 @@ class ChanStrip extends React.PureComponent< ) : null} {window.mixerProtocol .channelTypes[0].toMixer - .FX_PARAMS?.[fxParamsList.EqLowMidGain] ? ( + .FX_PARAMS?.[fxParamsList.EqGain02] ? ( - {this.eqGain(fxParamsList.EqLowMidGain)} + {this.eqGain(fxParamsList.EqGain02)}

_______

) : null} {window.mixerProtocol - .channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqMidGain] ? ( + .channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain03] ? ( - {this.eqGain(fxParamsList.EqMidGain)} + {this.eqGain(fxParamsList.EqGain03)}

_______

@@ -562,9 +562,9 @@ class ChanStrip extends React.PureComponent< ) : null} {window.mixerProtocol .channelTypes[0].toMixer - .FX_PARAMS?.[fxParamsList.EqHighGain] ? ( + .FX_PARAMS?.[fxParamsList.EqGain04] ? ( - {this.eqGain(fxParamsList.EqHighGain)} + {this.eqGain(fxParamsList.EqGain04)}

_______

diff --git a/client/components/ChanStripFull.tsx b/client/components/ChanStripFull.tsx index 11b1e5b1..5f3dbcc6 100644 --- a/client/components/ChanStripFull.tsx +++ b/client/components/ChanStripFull.tsx @@ -485,7 +485,18 @@ class ChanStripFull extends React.PureComponent<
{window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.filter( (param) => { - return fxParamsList[param.key].includes('Eq') + return fxParamsList[param.key].includes('Eq') && fxParamsList[param.key].includes('Gain') + } + ).map((param: IFxProtocol) => { + return ( + +
O
+
+ ) + })} + {window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.filter( + (param) => { + return fxParamsList[param.key].includes('Eq') && fxParamsList[param.key].includes('Gain') } ).map((param: IFxProtocol) => { return ( @@ -516,16 +527,16 @@ class ChanStripFull extends React.PureComponent< window.mixerProtocol.channelTypes[0].toMixer.DELAY_TIME const hasEq = window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[ - fxParamsList.EqLowGain + fxParamsList.EqGain01 ] || window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[ - fxParamsList.EqLowMidGain + fxParamsList.EqGain02 ] || window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[ - fxParamsList.EqMidGain + fxParamsList.EqGain03 ] || window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.[ - fxParamsList.EqHighGain + fxParamsList.EqGain04 ] const hasMonitorSends = this.props.channel.find( (ch: any) => ch.auxLevel[this.props.auxSendIndex] >= 0 diff --git a/server/constants/MixerProtocolInterface.ts b/server/constants/MixerProtocolInterface.ts index 0dd23b08..74f3980b 100644 --- a/server/constants/MixerProtocolInterface.ts +++ b/server/constants/MixerProtocolInterface.ts @@ -1,16 +1,16 @@ export enum fxParamsList { - EqLowGain, - EqLowMidGain, - EqMidGain, - EqHighGain, - EqLowFreq, - EqLowMidFreq, - EqMidFreq, - EqHighFreq, - EqLowQ, - EqLowMidQ, - EqMidQ, - EqHighQ, + EqGain01, + EqGain02, + EqGain03, + EqGain04, + EqFreq01, + EqFreq02, + EqFreq03, + EqFreq04, + EqQ01, + EqQ02, + EqQ03, + EqQ04, } export interface IMixerProtocolGeneric { protocol: string diff --git a/server/constants/mixerProtocols/behringerXrMaster.ts b/server/constants/mixerProtocols/behringerXrMaster.ts index 0ab48ca5..9e55f75e 100644 --- a/server/constants/mixerProtocols/behringerXrMaster.ts +++ b/server/constants/mixerProtocols/behringerXrMaster.ts @@ -106,7 +106,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], FX_PARAMS: [ { - key: fxParamsList.EqLowGain, + key: fxParamsList.EqGain01, params: [ { mixerMessage: '/ch/{channel}/eq/1/g', @@ -116,7 +116,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidGain, + key: fxParamsList.EqGain02, params: [ { mixerMessage: '/ch/{channel}/eq/2/g', @@ -126,7 +126,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidGain, + key: fxParamsList.EqGain03, params: [ { mixerMessage: '/ch/{channel}/eq/3/g', @@ -136,7 +136,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighGain, + key: fxParamsList.EqGain04, params: [ { mixerMessage: '/ch/{channel}/eq/4/g', @@ -190,7 +190,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], FX_PARAMS: [ { - key: fxParamsList.EqLowGain, + key: fxParamsList.EqGain01, params: [ { mixerMessage: '/ch/{channel}/eq/1/g', @@ -200,7 +200,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidGain, + key: fxParamsList.EqGain02, params: [ { mixerMessage: '/ch/{channel}/eq/2/g', @@ -210,7 +210,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidGain, + key: fxParamsList.EqGain03, params: [ { mixerMessage: '/ch/{channel}/eq/3/g', @@ -220,7 +220,7 @@ export const BehringerXrMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighGain, + key: fxParamsList.EqGain04, params: [ { mixerMessage: '/ch/{channel}/eq/4/g', diff --git a/server/constants/mixerProtocols/midasMaster.ts b/server/constants/mixerProtocols/midasMaster.ts index 50fbdf33..c6e7c254 100644 --- a/server/constants/mixerProtocols/midasMaster.ts +++ b/server/constants/mixerProtocols/midasMaster.ts @@ -102,7 +102,7 @@ export const MidasMaster: IMixerProtocol = { ], FX_PARAMS: [ { - key: fxParamsList.EqLowGain, + key: fxParamsList.EqGain01, params: [ { mixerMessage: '/ch/{channel}/eq/1/g', @@ -113,7 +113,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidGain, + key: fxParamsList.EqGain02, params: [ { mixerMessage: '/ch/{channel}/eq/2/g', @@ -124,7 +124,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidGain, + key: fxParamsList.EqGain03, params: [ { mixerMessage: '/ch/{channel}/eq/3/g', @@ -135,7 +135,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighGain, + key: fxParamsList.EqGain04, params: [ { mixerMessage: '/ch/{channel}/eq/4/g', @@ -146,7 +146,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowFreq, + key: fxParamsList.EqFreq01, params: [ { mixerMessage: '/ch/{channel}/eq/1/f', @@ -157,7 +157,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidFreq, + key: fxParamsList.EqFreq02, params: [ { mixerMessage: '/ch/{channel}/eq/2/f', @@ -168,7 +168,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidFreq, + key: fxParamsList.EqFreq03, params: [ { mixerMessage: '/ch/{channel}/eq/3/f', @@ -179,7 +179,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighFreq, + key: fxParamsList.EqFreq04, params: [ { mixerMessage: '/ch/{channel}/eq/4/f', @@ -190,7 +190,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowQ, + key: fxParamsList.EqQ01, params: [ { mixerMessage: '/ch/{channel}/eq/1/q', @@ -201,7 +201,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidQ, + key: fxParamsList.EqQ02, params: [ { mixerMessage: '/ch/{channel}/eq/2/q', @@ -212,7 +212,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidQ, + key: fxParamsList.EqQ03, params: [ { mixerMessage: '/ch/{channel}/eq/3/q', @@ -223,7 +223,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighQ, + key: fxParamsList.EqQ04, params: [ { mixerMessage: '/ch/{channel}/eq/4/q', @@ -274,7 +274,7 @@ export const MidasMaster: IMixerProtocol = { ], FX_PARAMS: [ { - key: fxParamsList.EqLowGain, + key: fxParamsList.EqGain01, params: [ { mixerMessage: '/ch/{channel}/eq/1/g', @@ -282,7 +282,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidGain, + key: fxParamsList.EqGain02, params: [ { mixerMessage: '/ch/{channel}/eq/2/g', @@ -290,7 +290,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidGain, + key: fxParamsList.EqGain03, params: [ { mixerMessage: '/ch/{channel}/eq/3/g', @@ -298,7 +298,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighGain, + key: fxParamsList.EqGain04, params: [ { mixerMessage: '/ch/{channel}/eq/4/g', @@ -306,7 +306,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowFreq, + key: fxParamsList.EqFreq01, params: [ { mixerMessage: '/ch/{channel}/eq/1/f', @@ -314,7 +314,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidFreq, + key: fxParamsList.EqFreq02, params: [ { mixerMessage: '/ch/{channel}/eq/2/f', @@ -322,7 +322,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidFreq, + key: fxParamsList.EqFreq03, params: [ { mixerMessage: '/ch/{channel}/eq/3/f', @@ -330,7 +330,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighFreq, + key: fxParamsList.EqFreq04, params: [ { mixerMessage: '/ch/{channel}/eq/4/f', @@ -338,7 +338,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowQ, + key: fxParamsList.EqQ01, params: [ { mixerMessage: '/ch/{channel}/eq/1/q', @@ -346,7 +346,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqLowMidQ, + key: fxParamsList.EqQ02, params: [ { mixerMessage: '/ch/{channel}/eq/2/q', @@ -354,7 +354,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqMidQ, + key: fxParamsList.EqQ03, params: [ { mixerMessage: '/ch/{channel}/eq/3/q', @@ -362,7 +362,7 @@ export const MidasMaster: IMixerProtocol = { ], }, { - key: fxParamsList.EqHighQ, + key: fxParamsList.EqQ04, params: [ { mixerMessage: '/ch/{channel}/eq/4/q', diff --git a/server/utils/mixerConnections/OscMixerConnection.ts b/server/utils/mixerConnections/OscMixerConnection.ts index 32f39d57..0d048514 100644 --- a/server/utils/mixerConnections/OscMixerConnection.ts +++ b/server/utils/mixerConnections/OscMixerConnection.ts @@ -421,14 +421,14 @@ export class OscMixerConnection { this.checkOscCommand( message.address, this.mixerProtocol.channelTypes[0].fromMixer.FX_PARAMS[ - fxParamsList.EqLowGain + fxParamsList.EqGain01 ].params[0].mixerMessage ) ) { let ch = message.address.split('/')[this.cmdChannelIndex] store.dispatch( storeFaderFx( - fxParamsList.EqLowGain, + fxParamsList.EqGain01, state.channels[0].chConnection[this.mixerIndex] .channel[ch - 1].assignedFader, message.args[0] @@ -443,14 +443,14 @@ export class OscMixerConnection { this.checkOscCommand( message.address, this.mixerProtocol.channelTypes[0].fromMixer.FX_PARAMS[ - fxParamsList.EqLowMidGain + fxParamsList.EqGain02 ].params[0].mixerMessage ) ) { let ch = message.address.split('/')[this.cmdChannelIndex] store.dispatch( storeFaderFx( - fxParamsList.EqLowMidGain, + fxParamsList.EqGain02, state.channels[0].chConnection[this.mixerIndex] .channel[ch - 1].assignedFader, message.args[0] @@ -465,14 +465,14 @@ export class OscMixerConnection { this.checkOscCommand( message.address, this.mixerProtocol.channelTypes[0].fromMixer.FX_PARAMS[ - fxParamsList.EqMidGain + fxParamsList.EqGain03 ].params[0].mixerMessage ) ) { let ch = message.address.split('/')[this.cmdChannelIndex] store.dispatch( storeFaderFx( - fxParamsList.EqMidGain, + fxParamsList.EqGain03, state.channels[0].chConnection[this.mixerIndex] .channel[ch - 1].assignedFader, message.args[0] @@ -487,14 +487,14 @@ export class OscMixerConnection { this.checkOscCommand( message.address, this.mixerProtocol.channelTypes[0].fromMixer.FX_PARAMS[ - fxParamsList.EqHighGain + fxParamsList.EqGain04 ].params[0].mixerMessage ) ) { let ch = message.address.split('/')[this.cmdChannelIndex] store.dispatch( storeFaderFx( - fxParamsList.EqHighGain, + fxParamsList.EqGain04, state.channels[0].chConnection[this.mixerIndex] .channel[ch - 1].assignedFader, message.args[0]