-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStealthascope.control.js
119 lines (95 loc) · 2.38 KB
/
Stealthascope.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
loadAPI(1);
/**
* Copyright 2014-2015 Alan Drees
*
* Purpose:
* Stealthascope controller implementation
*
* Requires:
*/
load('bcfr2000/bcfr2000_options.js');
load('bcfr2000/bcfr2000_controller_object.js');
load('bcfr2000/bcf2000_object.js');
load('bcfr2000/bcr2000_object.js');
load('bcfr2000/bc_controls.js');
load('icc/icc_core.js');
load('icc/icc_icc_controller.js');
load('icc/icc_param_object.js');
load('launchpad/launchpad_constants.js');
load('launchpad/launchpad_controller_object.js');
load('launchpad/launchpad_grid.js');
load('launchpad/launchpad_options.js');
load('launchpad/launchpad_page.js');
load('launchpad/launchpad_io.js');
load('launchpad/launchpad_util.js');
load('channel-display/channel_display_group_object.js');
load('channel-display/channel_display_object.js');
load('channel-display/channel_display_options.js');
load('stealthascope_controller_object.js');
load('stealthascope_constants.js');
load('stealthascope_options.js');
host.defineController("Stealthascope", "Stealthascope", "1.0", "C5486FC8-393D-44A2-83CF-F4B7824DB6AD", "Alan Drees");
host.defineMidiPorts(Stlh.options.interfaces[0],
Stlh.options.interfaces[1]);
//do stuff here to bind named interfaces to the right ports
/*
for(var pair_index in BCFR2000.options.discoveryname)
{
var pair_array = BCFR2000.options.discoveryname[pair_index];
host.addDeviceNameBasedDiscoveryPair([pair_array[0]],[pair_array[1]]);
}
*/
var controllers = new Array();
var icc_network = new Array();
var banks = {};
icc_network.push(ICC.create_new_icc_network('stealthascope'));
controllers[0] = new Stlh.StealthascopeController(Stlh.options);
/*************/
/* functions */
/*************/
/**\fn init
*
* init function entry point wrapping the controller components
*
* @param None
*
* @returns None
*/
function init()
{
for(var i = 0; i < controllers.length; i++)
{
controllers[i].init();
}
}
/**\fn flush
*
* wrapper function to handle flushing data to the controller
*
* @param None
*
* @returns None
*/
function flush()
{
for(var i = 0; i < controllers.length; i++)
{
controllers[i].flush();
}
}
/**\fn exit
*
* wrapper function to handle the the exit event when the program exits/controller
* gets removed from the program
*
* @param None
*
* @returns None
*/
function exit()
{
for(var i = 0; i < controllers.length; i++)
{
controllers[i].exit();
}
}