Skip to content

Commit

Permalink
feat: Set channel label on mixer from Sisyfos and from Automation
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jun 29, 2019
1 parent 5b83282 commit 35fbc34
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/AutomationConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class AutomationConnection {
channel: ch -1,
label: message.args[0]
});
window.mixerGenericConnection.updateChannelName(ch-1);
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.X_MIX)) {
window.storeRedux.dispatch({
Expand Down
4 changes: 4 additions & 0 deletions src/utils/CasparCGConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,9 @@ export class CasparCGConnection {
}
}
}

updateChannelName(channelIndex: number) {
//CasparCG does not need Labels.
}
}

11 changes: 11 additions & 0 deletions src/utils/EmberMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,16 @@ export class EmberMixerConnection {
);
}

updateChannelName(channelIndex: number) {
let channelType = this.store.channels[0].channel[channelIndex].channelType;
let channelTypeIndex = this.store.channels[0].channel[channelIndex].channelTypeIndex;
let channelName = this.store.channels[0].channel[channelIndex].label;
this.sendOutMessage(
this.mixerProtocol.channelTypes[channelType].toMixer.CHANNEL_NAME[0].mixerMessage,
channelTypeIndex+1,
channelName,
"string"
);
}
}

10 changes: 10 additions & 0 deletions src/utils/MidiMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,15 @@ return true;
);
}


updateChannelName(channelIndex: number) {
let channelName = this.store.channels[0].channel[channelIndex].label;
this.sendOutMessage(
this.mixerProtocol.channelTypes[0].toMixer.CHANNEL_NAME[0].mixerMessage,
channelIndex+1,
channelName
);
}

}

4 changes: 4 additions & 0 deletions src/utils/MixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export class MixerGenericConnection {
this.mixerConnection.updatePflState(channelIndex);
}

updateChannelName(channelIndex: number) {
this.mixerConnection.updateChannelName(channelIndex);
}

fadeInOut (channelIndex: number, fadeTime: number){
//Clear Old timer or set Fade to active:
if (this.store.channels[0].channel[channelIndex].fadeActive) {
Expand Down
12 changes: 12 additions & 0 deletions src/utils/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,17 @@ export class OscMixerConnection {
"f"
);
}

updateChannelName(channelIndex: number) {
let channelType = this.store.channels[0].channel[channelIndex].channelType;
let channelTypeIndex = this.store.channels[0].channel[channelIndex].channelTypeIndex;
let channelName = this.store.channels[0].channel[channelIndex].label;
this.sendOutMessage(
this.mixerProtocol.channelTypes[channelType].toMixer.CHANNEL_NAME[0].mixerMessage,
channelTypeIndex+1,
channelName,
"s"
);
}
}

0 comments on commit 35fbc34

Please sign in to comment.