Pitch slider modification
Arduino sends now LSB / MSB to have 14 bit resolution for the pitch slider. Mapping modified. We have now tempo increments of 0,01%.
This commit is contained in:
+30
-2
@@ -324,8 +324,8 @@ XDJ100SX.cue = function (channel, control, value, status, group){
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Pitch Slider
|
||||
/*
|
||||
//Pitch Slider old
|
||||
|
||||
XDJ100SX.pitchLast = 0;
|
||||
|
||||
@@ -350,6 +350,34 @@ XDJ100SX.pitch = function (channel, control, value, status, group) {
|
||||
engine.setValue(group, "rate", normalized);
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// Pitch slider new
|
||||
|
||||
|
||||
XDJ100SX.pitchMSB = 0;
|
||||
XDJ100SX.pitchLSB = 0;
|
||||
|
||||
XDJ100SX.pitch = function (channel, control, value, status, group) {
|
||||
|
||||
if (control === 0) { // MSB
|
||||
XDJ100SX.pitchMSB = value;
|
||||
} else if (control === 32) { // LSB
|
||||
XDJ100SX.pitchLSB = value;
|
||||
}
|
||||
|
||||
// Combinar MSB + LSB
|
||||
var full = (XDJ100SX.pitchMSB << 7) | XDJ100SX.pitchLSB; // 0–16383
|
||||
|
||||
// Convertir a rang de Mixxx (-1.0 .. +1.0)
|
||||
var normalized = - (full - 8192) / 8192;
|
||||
|
||||
engine.setValue(group, "rate", normalized);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//Browse Encoder (scroll + canviar vista)
|
||||
|
||||
@@ -9,16 +9,29 @@
|
||||
</scriptfiles>
|
||||
<controls>
|
||||
|
||||
<control>
|
||||
<control>
|
||||
<description>PITCH MSB</description>
|
||||
<group>[Channel1]</group>
|
||||
<key>XDJ100SX.pitch</key>
|
||||
<description>PITCH</description>
|
||||
<status>0xB2</status>
|
||||
<midino>0x07</midino>
|
||||
<status>0xB0</status>
|
||||
<midino>0x00</midino>
|
||||
<options>
|
||||
<script-binding/>
|
||||
<script-binding/>
|
||||
</options>
|
||||
</control>
|
||||
<control>
|
||||
<group>[Channel1]</group>
|
||||
<key>XDJ100SX.pitch</key>
|
||||
<description>PITCH LSB</description>
|
||||
<status>0xB0</status>
|
||||
<midino>0x20</midino>
|
||||
<options>
|
||||
<script-binding/>
|
||||
</options>
|
||||
</control>
|
||||
|
||||
|
||||
|
||||
<control>
|
||||
<group>[Channel1]</group>
|
||||
<key>play</key>
|
||||
|
||||
Reference in New Issue
Block a user