moba wrote:I map all the controls but the delay, the depth and the lfo knob are harder.
The SC2000 only send two values for the effect knobs : increment and decrement.
How could I script these knobs ?
You would have to get the max & min values for the MixxxControls from
http://mixxx.org/wiki/doku.php/midi_con ... _and_names . Then decide how much you want each "tick" of the knob to adjust the value for each MixxxControl, then just add or subtract that value depending on whether the function gets an increment or decrement message. You will need to bounds-check it as well.
So something like:
- Code: Select all
DenonSC2000.lfoPeriodKnob(...) {
var interval = 81250; // Assuming a 24 tick range:
var min = 50000; // From the UI Controls Wiki page
var max = 2000000; // From the UI Controls Wiki page
var newVal = 0;
if (<increment>) {
var curVal = engine.getValue("[Flanger]","lfoPeriod");
newVal = curVal + interval;
// Bound check
if (newVal > max) newVal = max;
}
else { // Decrement
<similar to above>
}
engine.setValue("[Flanger]","lfoPeriod",newVal);
}
As for scratching, have you looked at the engine.scratch() functions on the MIDI scripting Wiki page? If your controller sends relative (inc/dec) messages for the scratch wheel, and it's touch-sensitive, it works quite nicely.