Skip to content

Commit da49233

Browse files
pi43rSwiftb0y
authored andcommitted
feat: implement fxknob
1 parent 6543c80 commit da49233

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

res/controllers/Korg-KAOSS-DJ-scripts.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,34 @@ KAOSSDJ.scratchMode = function(channel, _control, value, _status, _group) {
181181
};
182182

183183
KAOSSDJ.fxToggleButton = function(channel, _control, value, _status, _group) {
184-
KAOSSDJ.updateDeckByChannel(channel, "fx", value === MIDI_ON);
184+
KAOSSDJ.updateDeckByChannel(channel, "isFx", value === MIDI_ON);
185185
};
186186

187-
KAOSSDJ.fxKnob = function(_channel, _control, _value, _status) {
188-
// TODO
187+
KAOSSDJ.fxKnob = function(_channel, _control, value, _status, _group) {
188+
if (KAOSSDJ.shiftLeftPressed) {
189+
// If Left Shift is pressed, cycle the effects chains on EffectUnit1
190+
if (value === MIDI_UP) {
191+
engine.setValue("[EffectRack1_EffectUnit1]", "next_chain", 1);
192+
} else if (value === MIDI_DOWN) {
193+
engine.setValue("[EffectRack1_EffectUnit1]", "prev_chain", 1);
194+
}
195+
} else if (KAOSSDJ.shiftRightPressed) {
196+
// If Right Shift is not pressed, cycle the effects chains on EffectUnit2
197+
if (value === MIDI_UP) {
198+
engine.setValue("[EffectRack1_EffectUnit2]", "next_chain", 1);
199+
} else if (value === MIDI_DOWN) {
200+
engine.setValue("[EffectRack1_EffectUnit2]", "prev_chain", 1);
201+
}
202+
} else {
203+
// If no shift is pressed, cycle through both QuickEffectRack filters
204+
if (value === MIDI_UP) {
205+
engine.setValue("[QuickEffectRack1_[Channel1]]", "next_chain", 1);
206+
engine.setValue("[QuickEffectRack1_[Channel2]]", "next_chain", 1);
207+
} else if (value === MIDI_DOWN) {
208+
engine.setValue("[QuickEffectRack1_[Channel1]]", "prev_chain", 1);
209+
engine.setValue("[QuickEffectRack1_[Channel2]]", "prev_chain", 1);
210+
}
211+
}
189212
};
190213

191214
KAOSSDJ.fxTouchMoveVertical = function(_channel, _control, value, _status, _group) {

res/controllers/Korg-KAOSS-DJ.midi.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@
625625
<status>0xB6</status>
626626
<midino>0x1F</midino>
627627
<options>
628-
<normal/>
628+
<script-binding/>
629629
</options>
630630
</control>
631631
<control>

0 commit comments

Comments
 (0)