home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Aplikacje_64-bitowe / Mixxx / mixxx-1.9.0-win64.exe / midi / Pioneer-CDJ-350-scripts.js < prev    next >
Text File  |  2010-12-04  |  1KB  |  45 lines

  1. function PioneerCDJ350() {}
  2.  
  3. PioneerCDJ350.init = function(id) {}
  4. PioneerCDJ350.shutdown = function(id) {}
  5.  
  6. PioneerCDJ350.jog_wheel = function(channel, control, value, status, group)
  7. {
  8.     // CCW:  00 -> 3f = [x0.5, x1)
  9.     // STOP: 40       = [x1]
  10.     // CW:   41 -> 7f = (x1, x4]
  11.     
  12.     newValue = (value - 0x40) / 5.0; // was too sensitive
  13.     engine.setValue(group, "jog", newValue);
  14. };
  15.  
  16. PioneerCDJ350.tempo_btn = function(channel, control, value, status, group)
  17. {
  18.     if (value == 0x00)
  19.     {
  20.         return;
  21.     }
  22.     
  23.     oldValue = engine.getValue(group, "rateRange");
  24.     newValue = 0.06;
  25.     
  26.     if (oldValue > 0.11)
  27.     {
  28.         newValue = 0.03;
  29.     }
  30.     else if (oldValue > 0.05)
  31.     {
  32.         newValue = 0.12;
  33.     }
  34.     
  35.     engine.setValue(group, "rateRange", newValue);
  36. };
  37.  
  38. PioneerCDJ350.loop_end_minus = function(channel, control, value, status, group)
  39. {
  40.     engine.setValue(group, "loop_end_position", engine.getValue(group, "loop_end_position") - 255);
  41. };
  42. PioneerCDJ350.loop_end_plus = function(channel, control, value, status, group)
  43. {
  44.     engine.setValue(group, "loop_end_position", engine.getValue(group, "loop_end_position") + 255);
  45. };