Skip to content

Commit

Permalink
Merge pull request #160 from TimPietrusky/2.0
Browse files Browse the repository at this point in the history
fix(midi): Button released for CC
  • Loading branch information
2xAA committed Jun 2, 2018
2 parents 5a8828d + ecfb3b9 commit d9d86fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extra/midi-assignment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ const midiAssignment = {
* 1. Controlchange
* - 176 = This is a Controlchange event
* - 63 = Only listen for "button pressed", because this is the velocity
* - 0 = If the velocity is zero, it's a "button released"
*
* 2. NoteOn
* - 144 = This is a NoteOn event
*/
if ((midiEvent.data[0] === 176 && midiEvent.data[2] > 63) || midiEvent.data[0] === 144) {
if ((midiEvent.data[0] === 176 && (midiEvent.data[2] > 63 || midiEvent.data[2] === 0))
|| midiEvent.data[0] === 144) {
const module = store.getters['modVModules/getActiveModule'](moduleName);
const enabled = module.info.enabled;

Expand Down

0 comments on commit d9d86fd

Please sign in to comment.