-
Notifications
You must be signed in to change notification settings - Fork 1
/
SLMkII.control.js
46 lines (37 loc) · 1004 Bytes
/
SLMkII.control.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Written by Jürgen Moßgraber - mossgrabers.de
// (c) 2014
// Licensed under GPLv3 - http://www.gnu.org/licenses/gpl.html
loadAPI (1);
load ("Config.js");
load ("framework/ClassLoader.js");
load ("mkii/ClassLoader.js");
load ("view/ClassLoader.js");
load ("mode/ClassLoader.js");
load ("Controller.js");
// This is the only global variable, do not use it.
var controller = null;
host.defineController ("Novation", "SLMkII", "1.0", "D1CEE920-1E51-11E4-8C21-0800200C9A66");
host.defineMidiPorts (2, 1);
if(host.platformIsLinux())
{
host.addDeviceNameBasedDiscoveryPair (["SL MkII MIDI 2", "SL MkII MIDI 1"], ["SL MkII MIDI 2"]);
}
if(host.platformIsWindows())
{
host.addDeviceNameBasedDiscoveryPair (["MIDIIN2 (SL MkII)", "SL MkII"], ["MIDIOUT2 (SL MkII)"]);
}
function init ()
{
controller = new Controller ();
println ("Initialized.");
}
function exit ()
{
if (controller)
controller.shutdown ();
}
function flush ()
{
if (controller)
controller.flush ();
}