1: /*
2: * Guitar-ZyX(tm)::MasterControlProgram - portable guitar F/X controller
3: * Copyright (C) 2009 Douglas McClendon
4: *
5: * This program is free software: you can redistribute it and/or modify
6: * it under the terms of the GNU General Public License as published by
7: * the Free Software Foundation, version 3 of the License.
8: *
9: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program. If not, see <http://www.gnu.org/licenses/>.
16: */
17: /*
18: #############################################################################
19: #############################################################################
20: ##
21: ## gzmcpc::rak: some source file
22: ##
23: #############################################################################
24: ##
25: ## Copyright 2008-2009 Douglas McClendon <dmc AT filteredperception DOT org>
26: ##
27: #############################################################################
28: #############################################################################
29: #
30: */
31:
32:
33:
34:
35: #include <stdio.h>
36:
37:
38: #include "rak.h"
39:
40:
41:
42: char rak_midi_labels[128][32];
43: char rak_preset_labels[80][32];
44:
45:
46:
47:
48:
49: void gzmcpc_init_rak(void) {
50:
51: int i;
52:
53: // XXX: constant - and do for all other hardcoded values (128)
54: // initialize midi parameter table
55: for (i = 0 ; i < 128 ; i++) {
56: snprintf(rak_midi_labels[i], MIDI_LABEL_MAXLEN,
57: "midi-parameter-%03d", i);
58: }
59:
60: // preset names
61: for (i = 0 ; i < 80 ; i++) {
62: snprintf(rak_preset_labels[i], PRESET_LABEL_MAXLEN,
63: "preset:%02d:ZyX", i + 1);
64: }
65:
66: }
67:
68:
69: const char * get_rak_midi_label(int midival) {
70: // XXX: this needs to be pulled from server dynamically
71:
72: return rak_midi_labels[midival];
73:
74: }
75: