summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-11-19 23:01:19 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2014-11-19 23:01:19 (GMT)
commitc11c3a682a89305353111f451e4c21d521f908a6 (patch)
tree1f66ff5cecf817518b4d8d587b862065398fa997
parentb7f07c9dc9eb9aef378cd1bd75ba0eeabb504534 (diff)
get num_decks and num_samplers from engine
-rw-r--r--Midi_Interface/RHMixxx-scripts.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/Midi_Interface/RHMixxx-scripts.js b/Midi_Interface/RHMixxx-scripts.js
index 4e4aff3..0d7114f 100644
--- a/Midi_Interface/RHMixxx-scripts.js
+++ b/Midi_Interface/RHMixxx-scripts.js
@@ -7,9 +7,6 @@
function RHMixxx() {}
-RHMixxx.num_decks = 2;
-RHMixxx.num_sampler = 12;
-
RHMixxx.groupNotes = {
"[Channel1]": { play: 0x01, stop: 0x00 },
"[Channel2]": { play: 0x03, stop: 0x02 },
@@ -30,14 +27,17 @@ RHMixxx.groupNotes = {
// *********** Init/De-Init ***********
RHMixxx.init = function (id, debug) {
+ var num_decks = engine.getValue("[Master]", "num_decks");
+ var num_sampler = engine.getValue("[Master]", "num_samplers");
+
if(debug)
print("RHMixxx initializing for controller '" + id +
- "' (" + RHMixxx.num_decks + " Decks, " + RHMixxx.num_sampler + " Sampler)");
+ "' (" + num_decks + " Decks, " + num_sampler + " Sampler)");
var i;
- for (i = 1; i <= RHMixxx.num_decks; i++)
+ for (i = 1; i <= num_decks; i++)
RHMixxx.initDeck(i, debug);
- for (i = 1; i <= RHMixxx.num_sampler; i++)
+ for (i = 1; i <= num_sampler; i++)
RHMixxx.initSampler(i, debug);
midi.sendShortMsg(0x80, 0x1F, 0x00);