Skip to content

Commit

Permalink
fix: Recived Midas Ratio has value from 0 to 11 and not 0 to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jan 23, 2020
1 parent 974bec2 commit 40afcc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const MidasMaster: IMixerProtocol = {
PFL: [emptyMixerMessage()],
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [{ mixerMessage: '/ch/{channel}/dyn/thr', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
RATIO: [{ mixerMessage: '/ch/{channel}/dyn/ratio', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
RATIO: [{ mixerMessage: '/ch/{channel}/dyn/ratio', value: 0, type: 'f', min: 0, max: 11, zero: 0}],
LOW: [{ mixerMessage: '/ch/{channel}/eq/1/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
LO_MID: [{ mixerMessage: '/ch/{channel}/eq/2/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
MID: [{ mixerMessage: '/ch/{channel}/eq/3/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
Expand Down
8 changes: 5 additions & 3 deletions server/utils/mixerConnections/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,14 @@ export class OscMixerConnection {
global.mainThreadHandler.updatePartialStore(state.channels[0].channel[ch - 1].assignedFader)
} else if (this.checkOscCommand(message.address, this.mixerProtocol.channelTypes[0].fromMixer
.RATIO[0].mixerMessage)) {
let ch = message.address.split("/")[this.cmdChannelIndex];
let ch = message.address.split("/")[this.cmdChannelIndex]
let ratio = this.mixerProtocol.channelTypes[0].fromMixer.RATIO[0]
let level = message.args[0] / ((ratio.max-ratio.min) + ratio.min)
store.dispatch({
type: SET_FADER_RATIO,
channel: state.channels[0].channel[ch - 1].assignedFader,
level: message.args[0]
});
level: level
})
global.mainThreadHandler.updatePartialStore(state.channels[0].channel[ch - 1].assignedFader)
} else if (this.checkOscCommand(message.address, this.mixerProtocol.channelTypes[0].fromMixer
.LOW[0].mixerMessage)) {
Expand Down

0 comments on commit 40afcc5

Please sign in to comment.