Skip to content

Commit

Permalink
fix: only allow 9 aux sends pr monitor output - update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed May 7, 2020
1 parent 24817b6 commit 316501c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 41 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ As NEXT has been implemented, and PFL usually only work on on channel at a time,
## Skaarhoj panels:

Skaarhoj in RAW panel mode is supported for rotary buttons including labels.
HWC#1-xx = fader level on Sisyfos
HWC#81-89 = enabled Monitor sends for Aux mix% on fader 1
HWC#91-99 = enabled Monitor sends for Aux mix% on fader 2
HWC#91-99 = enabled Monitor sends for Aux mix% on fader 3

- HWC#1-xx = fader level on Sisyfos
- HWC#81-89 = enabled Monitor sends for Aux mix% on fader 1
- HWC#91-99 = enabled Monitor sends for Aux mix% on fader 2
- HWC#101-109 = enabled Monitor sends for Aux mix% on fader 3

The monitor sends are the same as those on the Channel Strip.

## Automation Support:
Expand Down
46 changes: 9 additions & 37 deletions server/utils/remoteConnections/SkaarhojRemoteConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ export class SkaarhojRemoteConnection {
handleAuxLevelCommand(command: string, btnNumber: number) {
let auxBtnNumber =
btnNumber - parseInt((btnNumber / 10).toFixed(0)) * 10
if (auxBtnNumber > 9) {
return
}
let panelNumber = (btnNumber - auxBtnNumber - 70) / 10
let faderIndex = panelNumber - 1
let auxSendIndex = state.faders[0].fader[faderIndex].monitor - 1
Expand Down Expand Up @@ -201,14 +204,6 @@ export class SkaarhojRemoteConnection {
}

updateRemoteFaderState(channelIndex: number, outputLevel: number) {
console.log(
'Send fader update - ',
'Channel index : ',
channelIndex,
'OutputLevel : ',
outputLevel
)

let formatLevel = (outputLevel * 100).toFixed()
let formatLabel =
state.faders[0].fader[channelIndex].label ||
Expand All @@ -222,7 +217,7 @@ export class SkaarhojRemoteConnection {
formatLabel +
'\n'
// 32767|||||label
console.log('Sending command to Skaarhoj :', formattetString)
logger.verbose('Sending command to Skaarhoj :' + formattetString)
this.clientList.forEach((client) => {
client.write(formattetString)
})
Expand All @@ -235,21 +230,17 @@ export class SkaarhojRemoteConnection {
}

updateRemoteAuxPanel(panelNumber: number) {
console.log(
'Updating Aux Panel number ' +
panelNumber +
' (hwc#' +
String(panelNumber + 80) +
'-x8'
)
let faderIndex = panelNumber - 1
let auxSendIndex = state.faders[0].fader[faderIndex].monitor - 1
if (auxSendIndex < 0) {
return
}
let hwButton = panelNumber * 10 + 70 + 1
state.channels[0].channel.forEach((ch: any, index: number) => {
if (ch.auxLevel[auxSendIndex] >= 0) {
if (
ch.auxLevel[auxSendIndex] >= 0 &&
hwButton <= panelNumber * 10 + 70 + 9
) {
let formatLevel = (ch.auxLevel[auxSendIndex] * 100).toFixed()
let formatLabel =
state.faders[0].fader[ch.assignedFader].label ||
Expand All @@ -271,25 +262,6 @@ export class SkaarhojRemoteConnection {
}

updateRemotePgmPstPfl(channelIndex: number) {
/*
if (!this.rawOutput) {
return
}
//Update SELECT button:
this.rawOutput.sendControlChange(12, channelIndex, 1)
this.rawOutput.sendControlChange(
44,
1 + 64 * (state.faders[0].fader[channelIndex].pgmOn ? 1 : 0),
1
)
//Update SOLO button:
this.rawOutput.sendControlChange(12, channelIndex, 1)
this.rawOutput.sendControlChange(
44,
3 + 64 * (state.faders[0].fader[channelIndex].pflOn ? 1 : 0),
1
)
*/
return
}
}

0 comments on commit 316501c

Please sign in to comment.