Skip to content

Commit

Permalink
feat: MidiMixerConnection - using type from protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Aug 16, 2019
1 parent 497db09 commit 96576f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/constants/mixerProtocols/yamahaQL1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ export const YamahaQL1: IMixerProtocol = {
channelTypeName: 'CH',
channelTypeColor: '#2f2f2f',
fromMixer: {
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_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'controlchange', min: 0, max: 127, zero: 100}], //PgmChange 0 - ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 127, zero: 100}], //PgmChange 0 - ignores this command
CHANNEL_VU: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 127, zero: 100}], //PgmChange 0 - ignores this command
CHANNEL_NAME: [emptyMixerMessage()],
PFL: [emptyMixerMessage()],
AUX_SEND: [emptyMixerMessage()],
},
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_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'controlchange', min: 0, max: 127, zero: 100}],
CHANNEL_OUT_GAIN: [{ mixerMessage: "38", value: 0, type: 'controlchange', min: 0, max: 127, zero: 100}],
CHANNEL_NAME: [emptyMixerMessage()],
PFL_ON: [emptyMixerMessage()],
PFL_OFF: [emptyMixerMessage()],
Expand Down
2 changes: 1 addition & 1 deletion src/utils/MidiMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class MidiMixerConnection {
}

setupMixerConnection() {
this.midiInput.addListener('controlchange', this.mixerProtocol.channelTypes[0].fromMixer.CHANNEL_FADER_LEVEL,
this.midiInput.addListener(this.mixerProtocol.channelTypes[0].fromMixer.CHANNEL_FADER_LEVEL[0].type, this.mixerProtocol.channelTypes[0].fromMixer.CHANNEL_FADER_LEVEL[0].mixerMessage,
(error: any) => {
console.log("Received 'controlchange' message (" + error.data + ").");
window.storeRedux.dispatch({
Expand Down

0 comments on commit 96576f4

Please sign in to comment.