X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=_MIDI.pde;h=5f25ddad62327f0f10ce797447b8371ae9ba5170;hb=e0794d3a20f8c2c301f6c7541925f3d403277fab;hp=9a27f8ca79f18981eedc0e8958f4db522b896df2;hpb=677670a68d3c3a57f3442fa40a1c3595c0c43789;p=SugarCubes.git diff --git a/_MIDI.pde b/_MIDI.pde index 9a27f8c..5f25dda 100644 --- a/_MIDI.pde +++ b/_MIDI.pde @@ -348,7 +348,6 @@ public class APC40MidiInput extends GenericDeviceMidiInput { int pitch = note.getPitch(); if (channel < 8) { if (pitch >= 53 && pitch <=57) return new GridPosition(pitch-53, channel); - else if (pitch == 52) return new GridPosition(5, channel); } return null; } @@ -453,6 +452,16 @@ public class APC40MidiInput extends GenericDeviceMidiInput { } break; + case 52: // CLIP STOP + if (nChan < PresetManager.NUM_PRESETS) { + if (shiftOn) { + presetManager.store(nChan); + } else { + presetManager.select(nChan); + } + } + break; + case 82: // scene 1 EFF_boom.trigger(); break; @@ -733,9 +742,8 @@ class APC40MidiOutput implements LXParameter.Listener, GridOutput { } public void setGridState(int row, int col, int state) { - if (col < 8) { - if (row < 5) output.sendNoteOn(col, 53+row, state); - else if (row == 6) output.sendNoteOn(col, 52, state); + if (col < 8 && row < 5) { + output.sendNoteOn(col, 53+row, state); } } }