Skip to content

Commit

Permalink
fix: Midas/X32 - Q-param in Eq was reverted and non exponential
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Feb 24, 2021
1 parent 18ac6c0 commit 41e3809
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
34 changes: 22 additions & 12 deletions client/components/ChanStripFull.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import ReductionMeter from './ReductionMeter'
import ClassNames from 'classnames'
import { fxParamsList } from '../../server/constants/MixerProtocolInterface'
import { IChannel } from '../../server/reducers/channelsReducer'
import { storeFaderFx } from '../../server/reducers/faderActions'

interface IChanStripFullInjectProps {
label: string
Expand Down Expand Up @@ -527,12 +526,18 @@ class ChanStripFull extends React.PureComponent<
<div className="parameter-text">
<div className="parameter-mini-text">
{Math.round(
(maxLabel - minLabel) *
this.props.fader[this.props.faderIndex][
fxParam
]?.[0] +
minLabel
)}
((maxLabel - minLabel) *
(1 -
Math.pow(
1 -
this.props.fader[this.props.faderIndex][
fxParam
]?.[0],
3
)) +
minLabel) *
10
) / 10}
{valueLabel}
</div>
<ReactSlider
Expand All @@ -541,17 +546,23 @@ class ChanStripFull extends React.PureComponent<
orientation="horisontal"
min={0}
max={1}
invert="true"
step={0.01}
value={
this.props.fader[this.props.faderIndex][fxParam]?.[0]
}
renderThumb={(props: any, state: any) => (
<div {...props}>
{Math.round(
(maxLabel - minLabel) *
parseFloat(state.valueNow) +
minLabel
)}
((maxLabel - minLabel) *
(1 -
Math.pow(
1 - parseFloat(state.valueNow),
3
)) +
minLabel) *
10
) / 10}
{valueLabel}
</div>
)}
Expand Down Expand Up @@ -590,7 +601,6 @@ class ChanStripFull extends React.PureComponent<
className="chan-strip-full-fader"
thumbClassName="chan-strip-full-thumb"
orientation="vertical"
invert
min={0}
max={1}
step={0.01}
Expand Down
16 changes: 8 additions & 8 deletions server/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,35 +289,35 @@ export const MidasMaster: IMixerProtocol = {
[fxParamsList.EqQ01]: [
{
mixerMessage: '/ch/{channel}/eq/1/q',
minLabel: 0.3,
maxLabel: 10,
minLabel: 10,
maxLabel: 0.3,
label: 'Low Q',
valueLabel: ' Q',
},
],
[fxParamsList.EqQ02]: [
{
mixerMessage: '/ch/{channel}/eq/2/q',
minLabel: 0.3,
maxLabel: 10,
minLabel: 10,
maxLabel: 0.3,
label: 'LoMid Q',
valueLabel: ' Q',
},
],
[fxParamsList.EqQ03]: [
{
mixerMessage: '/ch/{channel}/eq/3/q',
minLabel: 0.3,
maxLabel: 10,
minLabel: 10,
maxLabel: 0.3,
label: 'HiMid Q',
valueLabel: ' Q',
},
],
[fxParamsList.EqQ04]: [
{
mixerMessage: '/ch/{channel}/eq/4/q',
minLabel: 0.3,
maxLabel: 10,
minLabel: 10,
maxLabel: 0.3,
label: 'High Q',
valueLabel: ' Q',
},
Expand Down

0 comments on commit 41e3809

Please sign in to comment.