Skip to content

Commit

Permalink
fix: PFL pass complete OSC command for turning on and of PFL
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed May 30, 2019
1 parent 70e2437 commit acb3108
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/constants/MixerProtocolPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export interface IMixerProtocol {
CHANNEL_FADER_LEVEL: string,
CHANNEL_OUT_GAIN: string,
GRP_OUT_GAIN: string,
PFL_ON: string,
PFL_OFF: string
PFL_ON: IMessageProtocol,
PFL_OFF: IMessageProtocol
},
fader: {
min: number,
Expand Down
12 changes: 10 additions & 2 deletions src/constants/protocols/ardourMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ export const ArdourMaster: IMixerProtocol = {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/strip/fader/{channel}',
GRP_OUT_GAIN: 'todo',
PFL_ON: 'todo',
PFL_OFF: 'todo'
PFL_ON: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
}
},
fader: {
min: 0,
Expand Down
12 changes: 10 additions & 2 deletions src/constants/protocols/behringerXrClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,16 @@ export const BehringerXrClient: IMixerProtocol = {
CHANNEL_FADER_LEVEL: '/ch/{channel}/mix/fader',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/01/level',
GRP_OUT_GAIN: '/dca/{channel}/fader',
PFL_ON: 'todo',
PFL_OFF: 'todo'
PFL_ON: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
}
},
fader: {
min: 0,
Expand Down
16 changes: 12 additions & 4 deletions src/constants/protocols/behringerXrMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ export const BehringerXrMaster: IMixerProtocol = {
GRP_NAME: '/dca/{channel}/config/name',
PFL: 'todo'
},
toMixer: {
toMixer : {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
GRP_OUT_GAIN: '/dca/{channel}/fader',
PFL_ON: 'todo',
PFL_OFF: 'todo'
PFL_ON: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
}
},
fader: {
min: 0,
Expand All @@ -60,5 +68,5 @@ export const BehringerXrMaster: IMixerProtocol = {
max: 1,
zero: 0.75,
test: 0.6,
},
}
}
12 changes: 10 additions & 2 deletions src/constants/protocols/genericMidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ export const GenericMidi: IMixerProtocol = {
CHANNEL_FADER_LEVEL: "39",
CHANNEL_OUT_GAIN: "38",
GRP_OUT_GAIN: 'none',
PFL_ON: 'todo',
PFL_OFF: 'todo'
PFL_ON: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
}
},
fader: {
min: 0,
Expand Down
12 changes: 10 additions & 2 deletions src/constants/protocols/midasClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,16 @@ export const MidasClient: IMixerProtocol = {
CHANNEL_FADER_LEVEL: '/ch/{channel}/mix/fader',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/01/level',
GRP_OUT_GAIN: '/dca/{channel}/mix/01/level',
PFL_ON: 'todo',
PFL_OFF: 'todo'
PFL_ON: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
}
},
fader: {
min: 0,
Expand Down
12 changes: 10 additions & 2 deletions src/constants/protocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,16 @@ export const MidasMaster: IMixerProtocol = {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
GRP_OUT_GAIN: '/dca/{channel}/fader',
PFL_ON: 'todo',
PFL_OFF: 'todo'
PFL_ON: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
}
},
fader: {
min: 0,
Expand Down
12 changes: 10 additions & 2 deletions src/constants/protocols/reaper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ export const Reaper: IMixerProtocol = {
CHANNEL_FADER_LEVEL: '/track/{channel}/volume',
CHANNEL_OUT_GAIN: '/track/{channel}/fx/1/fxparam/1/value',
GRP_OUT_GAIN: '/dca/{channel}/fader',
PFL_ON: 'todo',
PFL_OFF: 'todo'
PFL_ON: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
oscMessage: "/not_in_use",
value: 0,
type: "f"
}
},
fader: {
min: 0,
Expand Down
8 changes: 4 additions & 4 deletions src/utils/MidiMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ return true;

if (this.store.channels[0].channel[channelIndex].pflOn = true) {
this.sendOutMessage(
this.mixerProtocol.toMixer.PFL_ON,
this.mixerProtocol.toMixer.PFL_ON.oscMessage,
channelIndex+1,
this.store.channels[0].channel[channelIndex].outputLevel
this.mixerProtocol.toMixer.PFL_ON.value
);
} else {
this.sendOutMessage(
this.mixerProtocol.toMixer.PFL_OFF,
this.mixerProtocol.toMixer.PFL_OFF.oscMessage,
channelIndex+1,
this.store.channels[0].channel[channelIndex].outputLevel
this.mixerProtocol.toMixer.PFL_OFF.value
);
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/utils/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,17 +270,17 @@ export class OscMixerConnection {
updatePflState(channelIndex: number) {
if (this.store.channels[0].channel[channelIndex].pflOn = true) {
this.sendOutMessage(
this.mixerProtocol.toMixer.PFL_ON,
this.mixerProtocol.toMixer.PFL_ON.oscMessage,
channelIndex+1,
this.store.channels[0].channel[channelIndex].pflOn,
"f"
this.mixerProtocol.toMixer.PFL_ON.value,
this.mixerProtocol.toMixer.PFL_ON.type
);
} else {
this.sendOutMessage(
this.mixerProtocol.toMixer.PFL_OFF,
this.mixerProtocol.toMixer.PFL_OFF.oscMessage,
channelIndex+1,
this.store.channels[0].channel[channelIndex].pflOn,
"f"
this.mixerProtocol.toMixer.PFL_OFF.value,
this.mixerProtocol.toMixer.PFL_OFF.type
);
}
}
Expand Down

0 comments on commit acb3108

Please sign in to comment.