Skip to content

Commit

Permalink
feat: Midas - Comp On/Off functionality implemented - ToDo GUI - CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Nov 12, 2021
1 parent dbb3160 commit d3f816a
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
34 changes: 33 additions & 1 deletion client/components/ChanStripFull.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,33 @@ class ChanStripFull extends React.PureComponent<
)
}

fxParamButton(fxParam: fxParamsList) {
if (!this.doesParamExists(fxParam)) {
return
}
let value = this.props.fader[this.props.faderIndex][fxParam]?.[0]
return (
<div className="parameter-text">
{window.mixerProtocol.channelTypes[0].fromMixer[fxParam][0]
.label ?? ''}
<button
onClick={(event: any) => {
this.handleFx(
fxParam,
this.props.fader[this.props.faderIndex][
fxParam
]?.[0]
? 0
: 1
)
}}
>
{value ? 'ON' : 'OFF'}
</button>
</div>
)
}

monitor(channelIndex: number) {
let faderIndex = this.props.channel[channelIndex].assignedFader
if (faderIndex === -1) return null
Expand Down Expand Up @@ -714,6 +741,9 @@ class ChanStripFull extends React.PureComponent<
<div className="item">
<div className="title">COMPRESSOR</div>
<div className="content">
{this.fxParamButton(
fxParamsList.CompOnOff
)}
{this.fxParamFader(
fxParamsList.CompThrs
)}
Expand All @@ -724,7 +754,9 @@ class ChanStripFull extends React.PureComponent<
<p className="zero-comp">______</p>
{this.gainReduction()}
<p className="reduction-6db">___6dB</p>
<p className="reduction-12db">___12dB</p>
<p className="reduction-12db">
___12dB
</p>
{this.fxParamFader(
fxParamsList.CompMakeUp
)}
Expand Down
1 change: 1 addition & 0 deletions server/constants/MixerProtocolInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export enum fxParamsList {
CompAttack,
CompHold,
CompRelease,
CompOnOff,
}
export enum VuLabelConversionType {
Linear = 'linear',
Expand Down
19 changes: 19 additions & 0 deletions server/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export const MidasMaster: IMixerProtocol = {
{
mixerMessage: '/ch/{channel}/dyn/ratio',
},
{
mixerMessage: '/ch/{channel}/dyn/on',
},
{
mixerMessage: '/ch/{channel}/delay/time',
},
Expand Down Expand Up @@ -135,6 +138,14 @@ export const MidasMaster: IMixerProtocol = {
valueLabel: ' dB',
},
],
[fxParamsList.CompOnOff]: [
{
mixerMessage: '/ch/{channel}/dyn/on',
minLabel: 0,
maxLabel: 1,
label: 'Comp On/Off',
},
],
[fxParamsList.CompThrs]: [
{
mixerMessage: '/ch/{channel}/dyn/thr',
Expand Down Expand Up @@ -355,6 +366,14 @@ export const MidasMaster: IMixerProtocol = {
valueLabel: ' dB',
},
],
[fxParamsList.CompOnOff]: [
{
mixerMessage: '/ch/{channel}/dyn/on',
minLabel: 0,
maxLabel: 1,
label: 'Comp On/Off',
},
],
[fxParamsList.CompThrs]: [
{
mixerMessage: '/ch/{channel}/dyn/thr',
Expand Down

0 comments on commit d3f816a

Please sign in to comment.