Skip to content

Commit

Permalink
fix: OSC protocol - All faders follows when changed on mixer
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Sep 3, 2019
1 parent 0fd1bd5 commit b5d9515
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/utils/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,18 @@ export class OscMixerConnection {
level: message.args[0]
});


if (this.store.faders[0].fader[assignedFader - 1].pgmOn)
{
this.store.channels[0].channel.map((channel: any, index: number) => {
if (channel.assignedFader === assignedFader - 1)
this.updateOutLevel(index);
if (channel.assignedFader === assignedFader - 1) {
window.storeRedux.dispatch({
type:'SET_OUTPUT_LEVEL',
channel: index,
level: message.args[0]
});
this.updateFadeIOLevel(index, this.store.faders[0].fader[assignedFader - 1].faderLevel);
}
})
}

Expand Down Expand Up @@ -218,11 +225,10 @@ export class OscMixerConnection {
updateOutLevel(channelIndex: number) {
let channelType = this.store.channels[0].channel[channelIndex].channelType;
let channelTypeIndex = this.store.channels[0].channel[channelIndex].channelTypeIndex;
let faderIndex = this.store.channels[0].channel[channelIndex].assignedFader;
this.sendOutMessage(
this.mixerProtocol.channelTypes[channelType].toMixer.CHANNEL_OUT_GAIN[0].mixerMessage,
channelTypeIndex+1,
this.store.faders[0].fader[faderIndex].faderLevel,
this.store.channels[0].channel[channelIndex].outputLevel,
"f"
);
}
Expand Down

0 comments on commit b5d9515

Please sign in to comment.