Skip to content

Commit

Permalink
feat: Midas - GUI Ratio on compressor is now from a list of values
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Nov 9, 2021
1 parent 9a1d691 commit cb48a27
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 941 deletions.
21 changes: 15 additions & 6 deletions client/components/ChanStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,20 @@ class ChanStrip extends React.PureComponent<
}
renderThumb={(props: any, state: any) => (
<div {...props}>
{Math.round(
(maxLabel - minLabel) *
parseFloat(state.valueNow) +
minLabel
)}
{!window.mixerProtocol.channelTypes[0].fromMixer[
fxParam
]?.[0].valueAsLabels
? Math.round(
(maxLabel - minLabel) *
parseFloat(state.valueNow) +
minLabel
)
: window.mixerProtocol.channelTypes[0]
.fromMixer[fxParam]?.[0].valueAsLabels[
Math.round(
parseFloat(state.valueNow) * 10
)
]}
{valueLabel}
</div>
)}
Expand Down Expand Up @@ -356,7 +365,7 @@ class ChanStrip extends React.PureComponent<
</div>
</React.Fragment>
)}
{hasGainTrim && (
{hasGainTrim && (
<React.Fragment>
<div className="item">
<div className="title">INPUT</div>
Expand Down
27 changes: 16 additions & 11 deletions client/components/ChanStripFull.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,20 @@ class ChanStripFull extends React.PureComponent<
}
renderThumb={(props: any, state: any) => (
<div {...props}>
{Math.round(
(maxLabel - minLabel) *
parseFloat(state.valueNow) +
minLabel
)}
{!window.mixerProtocol.channelTypes[0].fromMixer[
fxParam
]?.[0].valueAsLabels
? Math.round(
(maxLabel - minLabel) *
parseFloat(state.valueNow) +
minLabel
)
: window.mixerProtocol.channelTypes[0]
.fromMixer[fxParam]?.[0].valueAsLabels[
Math.round(
parseFloat(state.valueNow) * 10
)
]}
{valueLabel}
</div>
)}
Expand Down Expand Up @@ -793,19 +802,15 @@ class ChanStripFull extends React.PureComponent<
>
X
</button>
{window.location.search.includes(
'settings=1'
) ? (
{window.location.search.includes('settings=1') ? (
<button
className="button half"
onClick={() => this.handleShowRoutingOptions()}
>
Channel-Fader Routing
</button>
) : null}
{window.location.search.includes(
'settings=1'
) ? (
{window.location.search.includes('settings=1') ? (
<button
className="button half"
onClick={() => this.handleShowMonitorOptions()}
Expand Down
1 change: 1 addition & 0 deletions server/constants/MixerProtocolInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ interface IMixerMessageProtocol {
max?: number
zero?: number
label?: string
valueAsLabels?: Array<string>
valueLabel?: string
minLabel?: number
maxLabel?: number
Expand Down
13 changes: 13 additions & 0 deletions server/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@ export const MidasMaster: IMixerProtocol = {
minLabel: 1,
maxLabel: 10,
label: 'Ratio',
valueAsLabels: [
'1.1',
'1.5',
'2.0',
'2.5',
'3.0',
'4.0',
'5.0',
'7.0',
'10',
'20',
'100',
],
valueLabel: ' :1',
},
],
Expand Down
Loading

0 comments on commit cb48a27

Please sign in to comment.