User Tools

Site Tools


midi_scripting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
midi_scripting [2020/03/25 15:42]
be.ing [Color API]
midi_scripting [2020/03/25 15:47] (current)
be.ing [Color API]
Line 481: Line 481:
 <​code=javascript>​ <​code=javascript>​
 var hotcueLEDcallback = engine.makeConnection('​[Channel1]',​ '​hotcue_2_color',​ function (value, group, control) { var hotcueLEDcallback = engine.makeConnection('​[Channel1]',​ '​hotcue_2_color',​ function (value, group, control) {
-  if (value != -1) { // hotcue is set+  if (value !== -1) { // hotcue is set
     midi.sendShortMsg(0x90,​ 0x60, myControllerColorMapper.getNearestColor(value));​     midi.sendShortMsg(0x90,​ 0x60, myControllerColorMapper.getNearestColor(value));​
   } else { // hotcue is unset, turn off LED   } else { // hotcue is unset, turn off LED
midi_scripting.txt ยท Last modified: 2020/03/25 15:47 by be.ing