Skip to content

Commit

Permalink
fix: Studer Vista - better logarithmic support
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Apr 27, 2020
1 parent 9da7cdf commit d2fa070
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions server/utils/mixerConnections/StuderVistaMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class StuderVistaMixerConnection {

updateOutLevel(channelIndex: number) {
let outputlevel = state.channels[0].channel[channelIndex].outputLevel
let level = 20 * Math.log((1.3 * outputlevel) / 0.775)
let level = 40 * Math.log((1.14 * outputlevel) / 0.88)
if (level < -90) {
level = -90
}
Expand All @@ -193,7 +193,7 @@ export class StuderVistaMixerConnection {
}

updateFadeIOLevel(channelIndex: number, outputLevel: number) {
let level = 20 * Math.log((1.3 * outputLevel) / 0.775)
let level = 40 * Math.log((1.14 * outputLevel) / 0.88)
if (level < -90) {
level = -90
}
Expand Down Expand Up @@ -272,7 +272,12 @@ export class StuderVistaMixerConnection {
('0' + auxByte[0].toString(16)).slice(-2)
)

level = level * (auxSendCmd.max - auxSendCmd.min) + auxSendCmd.min
level = 40 * Math.log((1.14 * level) / 0.88)
if (level < -80) {
level = -90
}
//level = level * (auxSendCmd.max - auxSendCmd.min) + auxSendCmd.min

this.sendOutMessage(message, channel, level)
}

Expand Down

0 comments on commit d2fa070

Please sign in to comment.