Skip to content

Commit

Permalink
feat: Midas receive delayTime state
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jan 31, 2020
1 parent e535722 commit de94606
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions server/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export const MidasMaster: IMixerProtocol = {
max: 1,
zero: 0.75
},
{
mixerMessage: '/ch/{channel}/delay/time',
value: "",
type: "s",
min: 0,
max: 1,
zero: 0.75
},
{
mixerMessage: '/ch/{channel}/eq/1/g',
value: "",
Expand Down
14 changes: 13 additions & 1 deletion server/utils/mixerConnections/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
SET_FADER_LO_MID,
SET_FADER_MID,
SET_FADER_HIGH,
SET_FADER_LOW
SET_FADER_LOW,
SET_FADER_DELAY_TIME
} from '../../reducers/faderActions'
import { SET_MIXER_ONLINE } from '../../reducers/settingsActions';
import { SOCKET_SET_VU } from '../../constants/SOCKET_IO_DISPATCHERS';
Expand Down Expand Up @@ -203,6 +204,17 @@ export class OscMixerConnection {
level: level
})
global.mainThreadHandler.updatePartialStore(state.channels[0].channel[ch - 1].assignedFader)
} else if (this.checkOscCommand(message.address, this.mixerProtocol.channelTypes[0].fromMixer
.DELAY_TIME[0].mixerMessage)) {
let ch = message.address.split("/")[this.cmdChannelIndex]
let delay = this.mixerProtocol.channelTypes[0].fromMixer.DELAY_TIME[0]
let delayTime = message.args[0] / ((delay.max-delay.min) + delay.min)
store.dispatch({
type: SET_FADER_DELAY_TIME,
channel: state.channels[0].channel[ch - 1].assignedFader,
delayTime: delayTime
})
global.mainThreadHandler.updatePartialStore(state.channels[0].channel[ch - 1].assignedFader)
} else if (this.checkOscCommand(message.address, this.mixerProtocol.channelTypes[0].fromMixer
.LOW[0].mixerMessage)) {
let ch = message.address.split("/")[this.cmdChannelIndex];
Expand Down

0 comments on commit de94606

Please sign in to comment.