all repos — mixxx-midi-hercules-dj_control_mp3 @ 0e1c677e07ba2d3416419a5e414f9f117856ace0

v0.4
Peter Molnar hello@petermolnar.eu
Thu, 23 Aug 2012 10:07:31 +0200
commit

0e1c677e07ba2d3416419a5e414f9f117856ace0

parent

d823baabf39a854f54c3e8d0add3f5c094e5e01d

2 files changed, 42 insertions(+), 0 deletions(-)

jump to
M Hercules DJ Control MP3.midi.xmlHercules DJ Control MP3.midi.xml

@@ -381,6 +381,17 @@ <options>

<Script-Binding/> </options> </control> + + <control> + <status>0xb0</status> + <midino>0x39</midino> + <group>[Playlist]</group> + <key>HerculesMP3.playlist</key> + <options> + <script-binding/> + </options> + </control> + </controls> <outputs>
M Hercules-DJ-Control-MP3-scripts.jsHercules-DJ-Control-MP3-scripts.js

@@ -584,3 +584,34 @@ }

} } }; + + +HerculesMP3.playlist = function (group, control, value, status) { + if (HerculesMP3.debug) print ("[Debug] HerculesMP3.playlist (" + group +", "+ control +", "+value +", "+status +")" ); + print ("[Debug] HerculesMP3.playlist (" + group +", "+ control +", "+value +", "+status +")" ); + // 7F > 40: CCW Slow > Fast - 127 > 64 + // 01 > 3F: CW Slow > Fast - 0 > 63 + + //knobValue = value >=0x40 ? value - 0x80 : value; // -64 to +63, - = CCW, + = CW + //if (value >=0x40 ) + if (value ==127 ) + engine.setValue("[Playlist]","SelectNextTrack", 1); + else if (value ==5 ) + engine.setValue("[Playlist]","SelectPrevTrack", 1); + + //engine.setValue([Playlist],"scratch", (engine.getValue(group,"scratch") + (jogValue/64)).toFixed(2)); + + // do some scratching + //if (HerculesMP3.scratchMode) + //{ + // if (HerculesMP3.debug) print("Do scratching value:" + value + " jogValue: " + jogValue ); + // engine.setValue(group,"scratch", (engine.getValue(group,"scratch") + (jogValue/64)).toFixed(2)); + //} + //// do pitch adjustment + //else + //{ + // newValue = jogValue; + // if (HerculesMP3.debug) print("do pitching adjust " + jogValue + " new Value: " + newValue); + // engine.setValue(group,"jog", newValue); + //} +};