Skip to content

Commit

Permalink
feat: Channel labels - protocol now support setting labels on mixer
Browse files Browse the repository at this point in the history
ToDo: implement - set Mixer label from automation (and not only Sisyfos)
  • Loading branch information
olzzon committed Jun 29, 2019
1 parent ea054e3 commit 751b812
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/constants/MixerProtocolPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ export interface IChannelTypes {
CHANNEL_FADER_LEVEL: Array<IMixerMessageProtocol>,
CHANNEL_OUT_GAIN: Array<IMixerMessageProtocol>,
CHANNEL_VU: Array<IMixerMessageProtocol>,
CHANNEL_NAME: string,
CHANNEL_NAME: Array<IMixerMessageProtocol>,
PFL: Array<IMixerMessageProtocol>
AUX_SEND: Array<IMixerMessageProtocol>
},
toMixer: {
CHANNEL_FADER_LEVEL: Array<IMixerMessageProtocol>,
CHANNEL_OUT_GAIN: Array<IMixerMessageProtocol>,
CHANNEL_NAME: Array<IMixerMessageProtocol>,
PFL_ON: Array<IMixerMessageProtocol>,
PFL_OFF: Array<IMixerMessageProtocol>
AUX_SEND: Array<IMixerMessageProtocol>
Expand Down
6 changes: 4 additions & 2 deletions src/constants/mixerProtocols/EmberLawo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const LawoClient: IMixerProtocol = {
}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: 'none',
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
Expand All @@ -66,6 +66,7 @@ export const LawoClient: IMixerProtocol = {
zero: 0

}],
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/track/{channel}/solo",
value: 1,
Expand All @@ -92,13 +93,14 @@ export const LawoClient: IMixerProtocol = {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/track/{channel}/vu', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/track/{channel}/name',
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Gain', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/track/{channel}/solo",
value: 1,
Expand Down
3 changes: 2 additions & 1 deletion src/constants/mixerProtocols/ardourMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ export const ArdourMaster: IMixerProtocol = {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //'none' ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: '/strip/fader/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/strip/meter/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/strip/name/{channel}',
CHANNEL_NAME: [{ mixerMessage: '/strip/name/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/strip/fader/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: [{ mixerMessage: '/strip/name/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/not_in_use", value: 0, type: "f", min: 0, max: 1, zero: 0.75
}],
Expand Down
3 changes: 2 additions & 1 deletion src/constants/mixerProtocols/behringerXrMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ export const BehringerXrMaster: IMixerProtocol = {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //'none' ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/meters/1', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/ch/{channel}/config/name',
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer : {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/not_in_use",
value: 0,
Expand Down
3 changes: 2 additions & 1 deletion src/constants/mixerProtocols/casparCGMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ if (geometry) {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1.5, zero: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1.5, zero: 1}],
CHANNEL_VU: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: 'none',
CHANNEL_NAME: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1.5, zero: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1.5, zero: 1}],
CHANNEL_NAME: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{ mixerMessage: "none", value: 1, type: "i", min: 0, max: 1, zero: 0.75 }],
PFL_OFF: [{ mixerMessage: "none", value: 0, type: "i", min: 0, max: 1, zero: 0.75 }],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
Expand Down
3 changes: 2 additions & 1 deletion src/constants/mixerProtocols/genericMidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ export const GenericMidi: IMixerProtocol = {
CHANNEL_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //PgmChange 0 - ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //PgmChange 0 - ignores this command
CHANNEL_VU: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //PgmChange 0 - ignores this command
CHANNEL_NAME: 'some sysex not yet build',
CHANNEL_NAME: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: "38", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/not_in_use",
value: 0,
Expand Down
3 changes: 2 additions & 1 deletion src/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ export const MidasMaster: IMixerProtocol = {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //'none' ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/meters/1', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/ch/{channel}/config/name',
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: [{ mixerMessage: '/ch/{channel}/config/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/not_in_use",
value: 0,
Expand Down
3 changes: 2 additions & 1 deletion src/constants/mixerProtocols/reaper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ export const Reaper: IMixerProtocol = {
CHANNEL_FADER_LEVEL: [{ mixerMessage: '/track/{channel}/volume', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/track/{channel}/fx/1/fxparam/1/value', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/track/{channel}/vu', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/track/{channel}/name',
CHANNEL_NAME: [{ mixerMessage: '/track/{channel}/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: '/track/{channel}/volume', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/track/{channel}/fx/1/fxparam/1/value', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: [{ mixerMessage: '/track/{channel}/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/track/{channel}/solo",
value: 1,
Expand Down
6 changes: 4 additions & 2 deletions src/constants/mixerProtocols/reaperMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ export const ReaperMaster: IMixerProtocol = {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/track/{channel}/volume', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
CHANNEL_VU: [{ mixerMessage: '/track/{channel}/vu', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
CHANNEL_NAME: '/track/{channel}/name',
CHANNEL_NAME: [{ mixerMessage: '/track/{channel}/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/track/{channel}/volume', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
CHANNEL_NAME: [{ mixerMessage: '/track/{channel}/name', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/track/{channel}/solo",
value: 1,
Expand Down Expand Up @@ -70,13 +71,14 @@ export const ReaperMaster: IMixerProtocol = {
{ mixerMessage: '/master/vu/L', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 },
{ mixerMessage: '/master/vu/R', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }
],
CHANNEL_NAME: '',
CHANNEL_NAME: [{ mixerMessage: '', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/master/volume', value: 0, type: 'f', min: 0, max: 1, zero: 0.75 }],
CHANNEL_NAME: [{ mixerMessage: '', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "",
value: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class OscMixerConnection {

}
} else if (this.checkOscCommand(message.address, this.mixerProtocol.channelTypes[0].fromMixer
.CHANNEL_NAME)) {
.CHANNEL_NAME[0].mixerMessage)) {
let ch = message.address.split("/")[this.cmdChannelIndex];
window.storeRedux.dispatch({
type:'SET_CHANNEL_LABEL',
Expand Down

0 comments on commit 751b812

Please sign in to comment.