Skip to content

Commit

Permalink
chore: rename enum: EgLowGain to EqGain01 etc. for easier handling sc…
Browse files Browse the repository at this point in the history
…aling and loops
  • Loading branch information
olzzon authored and olzzon committed Oct 26, 2020
1 parent b746112 commit f5dae71
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 69 deletions.
5 changes: 5 additions & 0 deletions client/assets/css/ChanStripFull.css
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,8 @@
#3a3a3a 100%
);
}

.eq-group > .dot {
font-size: 40px;
height: 40px;
}
24 changes: 12 additions & 12 deletions client/components/ChanStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -533,38 +533,38 @@ class ChanStrip extends React.PureComponent<
<div className="content">
<div className="eq-group">
{window.mixerProtocol
.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqLowGain] ? (
.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain01] ? (
<React.Fragment>
{this.eqGain(fxParamsList.EqLowGain)}
{this.eqGain(fxParamsList.EqGain01)}
<p className="zero-eq">
_______
</p>
</React.Fragment>
) : null}
{window.mixerProtocol
.channelTypes[0].toMixer
.FX_PARAMS?.[fxParamsList.EqLowMidGain] ? (
.FX_PARAMS?.[fxParamsList.EqGain02] ? (
<React.Fragment>
{this.eqGain(fxParamsList.EqLowMidGain)}
{this.eqGain(fxParamsList.EqGain02)}
<p className="zero-eq">
_______
</p>
</React.Fragment>
) : null}
{window.mixerProtocol
.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqMidGain] ? (
.channelTypes[0].toMixer.FX_PARAMS?.[fxParamsList.EqGain03] ? (
<React.Fragment>
{this.eqGain(fxParamsList.EqMidGain)}
{this.eqGain(fxParamsList.EqGain03)}
<p className="zero-eq">
_______
</p>
</React.Fragment>
) : null}
{window.mixerProtocol
.channelTypes[0].toMixer
.FX_PARAMS?.[fxParamsList.EqHighGain] ? (
.FX_PARAMS?.[fxParamsList.EqGain04] ? (
<React.Fragment>
{this.eqGain(fxParamsList.EqHighGain)}
{this.eqGain(fxParamsList.EqGain04)}
<p className="zero-eq">
_______
</p>
Expand Down
21 changes: 16 additions & 5 deletions client/components/ChanStripFull.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,18 @@ class ChanStripFull extends React.PureComponent<
<div className="eq-group">
{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 (
<React.Fragment>
<div className="dot" draggable={true}>O</div>
</React.Fragment>
)
})}
{window.mixerProtocol.channelTypes[0].toMixer.FX_PARAMS?.filter(
(param) => {
return fxParamsList[param.key].includes('Eq') && fxParamsList[param.key].includes('Gain')
}
).map((param: IFxProtocol) => {
return (
Expand Down Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions server/constants/MixerProtocolInterface.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 8 additions & 8 deletions server/constants/mixerProtocols/behringerXrMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
FX_PARAMS: [
{
key: fxParamsList.EqLowGain,
key: fxParamsList.EqGain01,
params: [
{
mixerMessage: '/ch/{channel}/eq/1/g',
Expand All @@ -116,7 +116,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
},
{
key: fxParamsList.EqLowMidGain,
key: fxParamsList.EqGain02,
params: [
{
mixerMessage: '/ch/{channel}/eq/2/g',
Expand All @@ -126,7 +126,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
},
{
key: fxParamsList.EqMidGain,
key: fxParamsList.EqGain03,
params: [
{
mixerMessage: '/ch/{channel}/eq/3/g',
Expand All @@ -136,7 +136,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
},
{
key: fxParamsList.EqHighGain,
key: fxParamsList.EqGain04,
params: [
{
mixerMessage: '/ch/{channel}/eq/4/g',
Expand Down Expand Up @@ -190,7 +190,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
FX_PARAMS: [
{
key: fxParamsList.EqLowGain,
key: fxParamsList.EqGain01,
params: [
{
mixerMessage: '/ch/{channel}/eq/1/g',
Expand All @@ -200,7 +200,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
},
{
key: fxParamsList.EqLowMidGain,
key: fxParamsList.EqGain02,
params: [
{
mixerMessage: '/ch/{channel}/eq/2/g',
Expand All @@ -210,7 +210,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
},
{
key: fxParamsList.EqMidGain,
key: fxParamsList.EqGain03,
params: [
{
mixerMessage: '/ch/{channel}/eq/3/g',
Expand All @@ -220,7 +220,7 @@ export const BehringerXrMaster: IMixerProtocol = {
],
},
{
key: fxParamsList.EqHighGain,
key: fxParamsList.EqGain04,
params: [
{
mixerMessage: '/ch/{channel}/eq/4/g',
Expand Down
Loading

0 comments on commit f5dae71

Please sign in to comment.