Remove module from future :)
[calfbox.git] / layer.h
blobb11f6486bd7dbc4db3a7f47a693e24f9e28c50db
1 /*
2 Calf Box, an open source musical instrument.
3 Copyright (C) 2010-2011 Krzysztof Foltman
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, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CBOX_LAYER_H
20 #define CBOX_LAYER_H
22 #include "dom.h"
23 #include <glib.h>
24 #include <stdint.h>
26 struct cbox_module;
27 struct cbox_rt;
29 CBOX_EXTERN_CLASS(cbox_layer)
31 struct cbox_layer
33 CBOX_OBJECT_HEADER()
34 struct cbox_scene *scene;
35 struct cbox_instrument *instrument;
36 struct cbox_command_target cmd_target;
37 gboolean enabled;
38 int8_t in_channel; // -1 for Omni
39 int8_t out_channel; // -1 for Omni
40 uint8_t low_note;
41 uint8_t high_note;
42 int8_t transpose;
43 int8_t fixed_note;
44 gboolean disable_aftertouch;
45 gboolean invert_sustain;
46 gboolean consume;
47 gboolean ignore_scene_transpose;
48 gboolean ignore_program_changes;
51 extern struct cbox_layer *cbox_layer_new(struct cbox_scene *scene);
52 extern struct cbox_layer *cbox_layer_new_with_instrument(struct cbox_scene *scene, const char *instrument_name, GError **error);
53 extern struct cbox_layer *cbox_layer_new_from_config(struct cbox_scene *scene, const char *instrument_name, GError **error);
54 extern gboolean cbox_layer_load(struct cbox_layer *layer, const char *name, GError **error);
55 extern void cbox_layer_set_instrument(struct cbox_layer *layer, struct cbox_instrument *instrument);
56 extern void cbox_layer_destroy(struct cbox_layer *layer);
58 #endif