Skip to content

Commit

Permalink
feat: yamaha QL - gain out command moved to protocol instead of hardw…
Browse files Browse the repository at this point in the history
…ired in qlclconnection.ts
  • Loading branch information
olzzon committed Jan 29, 2020
1 parent fe9dddc commit e96f902
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/constants/mixerProtocols/yamahaQLCL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const YamahaQLCL: IMixerProtocol = {
},
toMixer: {
CHANNEL_FADER_LEVEL: [emptyMixerMessage()],
CHANNEL_OUT_GAIN: [{ mixerMessage: "set MIXER:Current/InCh/Fader/Level", value: 0, type: '', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'f0 43 10 3e 19 01 00 37 00 00 00 {channel} 00 00 00 {level} f7', value: 0, type: '', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: [emptyMixerMessage()],
PFL_ON: [emptyMixerMessage()],
PFL_OFF: [emptyMixerMessage()],
Expand Down
7 changes: 2 additions & 5 deletions server/utils/mixerConnections/QlClMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { huiRemoteConnection } from '../../mainClasses'

//Utils:
import { IMixerProtocol } from '../../constants/MixerProtocolInterface'
import { IStore } from '../../reducers/indexReducer'
import { SET_OUTPUT_LEVEL } from '../../reducers/channelActions'
import {
SET_VU_LEVEL,
Expand Down Expand Up @@ -148,7 +147,7 @@ export class QlClMixerConnection {
return false;
}

sendOutMessage(oscMessage: string, channelIndex: number, value: string | number, type: string) {
sendOutMessage(message: string, channelIndex: number, value: string | number, type: string) {
let valueNumber: number
if (typeof value === 'string') {
value = parseFloat(value)
Expand All @@ -160,9 +159,7 @@ export class QlClMixerConnection {
(valueNumber & 0x00ff),
])

//f0 43 10 3e 19 01 00 37 00 00 00 00 00 00 00 07 0e f7
let command = 'f0 43 10 3e 19 01 00 37 00 00 00 {channel} 00 00 00 {level} f7'
command = command.replace('{channel}', channelIndex.toString(16))
let command = message.replace('{channel}', channelIndex.toString(16))
command = command.replace('{level}', valueByte[0].toString(16) + ' ' + valueByte[1].toString(16))
let a = command.split(' ')
let buf = new Buffer(a.map((val:string) => { return parseInt(val, 16) }))
Expand Down

0 comments on commit e96f902

Please sign in to comment.