case 52: // CLIP STOP
if (nChan < PresetManager.NUM_PRESETS) {
if (shiftOn) {
- presetManager.store(nChan);
+ presetManager.store(getTargetDeck(), nChan);
} else {
- presetManager.select(nChan);
+ presetManager.select(getTargetDeck(), nChan);
}
}
break;
}
}
- public void select(int index) {
- presets[index].select();
+ public void select(Engine.Deck deck, int index) {
+ presets[index].select(deck);
}
- public void store(int index) {
+ public void store(Engine.Deck deck, int index) {
presets[index].store(midiEngine.getFocusedPattern());
for (PresetListener listener : listeners) {
listener.onPresetStored(presets[index]);
}
- select(index);
+ select(deck, index);
}
public void onPresetLoaded(Preset preset, LXPattern pattern) {
manager.write();
}
- public void select() {
- Engine.Deck deck = midiEngine.getFocusedDeck();
+ public void select(Engine.Deck deck) {
for (LXPattern pattern : deck.getPatterns()) {
if (pattern.getClass().getName().equals(className)) {
for (String pLabel : parameters.keySet()) {