-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChannelDisplay.control.js
125 lines (99 loc) · 1.97 KB
/
ChannelDisplay.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
120
121
122
123
124
125
loadAPI(1);
/**
* Copyright 2015 Alan Drees
*
* Purpose:
* Channel Display Controller script entry point
*
* Dependencies:
*
*/
var console = {};
console.debug = false;
console.log = function(string)
{
if(console.debug === true)
{
println(string);
}
}
load('channel_display_options.js');
load('channel_display_object.js');
load('channel_display_group_object.js');
host.defineController("Stealthascope", "Channel Display Controler", "0.0", "7AECC690-751D-4324-9DBE-60F7B9839436", "Alan Drees");
host.defineMidiPorts(0,1);
//add some discovery stuff here later
var controllers = new Array();
var icc_network = new Array();
//icc_network.push(ICC.create_new_icc_network('channeldisplay8'));
controllers[0] = new ChannelDisplay.ChannelDisplayGroupController(ChannelDisplay.options, 0, 0);
/**\fn parse_func
*
* Parse function which returns data in the required way
*
* @param title (string) string which to parse
*
* @returns object in the required format
*/
function parse_function(title)
{
var rv = {1 : '',
2 : '',
3 : '',
4 : ''};
if(typeof title === 'string')
{
var split = title.split(';');
for(var i = 0; i < split.length; i++)
{
rv[i] = split[i];
}
}
return rv;
}
/**\fn init
*
* init function entry point wrapping the controller components
*
* @param None
*
* @returns None
*/
function init()
{
for(var controller in controllers)
{
controllers[controller].init();
controllers[controller].set_parse_func(parse_function);
}
}
/**\fn exit
*
* exit function to wrap the controller components exit functions
*
* @param None
*
* @returns None
*/
function exit()
{
for(var controller in controllers)
{
controllers[controller].exit();
}
}
/**\fn flush
*
* flush function to wrap the controller components flush functions
*
* @param None
*
* @returns None
*/
function flush()
{
for(var controller in controllers)
{
controllers[controller].flush();
}
}