diff options
author | erdgeist <erdgeist@bauklotz.fritz.box> | 2016-08-12 14:46:51 +0200 |
---|---|---|
committer | erdgeist <erdgeist@bauklotz.fritz.box> | 2016-08-12 14:46:51 +0200 |
commit | a8be0d3d20f07d4561826b01f566ca307eb23526 (patch) | |
tree | b2c5c6d513ae3a84aba8e4eea94ec32e46d352fa /config.h |
commit as a backup
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/config.h b/config.h new file mode 100644 index 0000000..2a9c09d --- /dev/null +++ b/config.h | |||
@@ -0,0 +1,75 @@ | |||
1 | #ifndef __CONFIG_H__ | ||
2 | #define __CONFIG_H__ | ||
3 | |||
4 | #include <stdint.h> | ||
5 | |||
6 | #define MAX_LINECOUNT 32 | ||
7 | |||
8 | extern int g_min_y, g_max_y; | ||
9 | |||
10 | extern int g_midi_two_octave_split; | ||
11 | extern int g_midi_three_octave_split_1; | ||
12 | extern int g_midi_three_octave_split_2; | ||
13 | extern int g_midi_three_octave_split_inverse; | ||
14 | extern int g_midi_main_control; | ||
15 | extern int g_midi_main_channel; | ||
16 | extern int g_settled_dist; | ||
17 | extern int g_timetosilence; | ||
18 | |||
19 | typedef enum { | ||
20 | midi_one_octave = 0, | ||
21 | midi_two_octaves = 1, | ||
22 | midi_three_octaves = 2, | ||
23 | midi_control = 3, | ||
24 | midi_control_inv = 4 | ||
25 | } StringMode; | ||
26 | |||
27 | typedef enum { | ||
28 | none = 0, | ||
29 | pitch_bend_up = 1, | ||
30 | pitch_bend_down = 2, | ||
31 | midi_controller = 3, | ||
32 | midi_controller_inv = 4 | ||
33 | } StringModifier; | ||
34 | |||
35 | typedef enum { | ||
36 | silent = 0, | ||
37 | in_attack = 1, | ||
38 | playing = 2 | ||
39 | } StringPlaying; | ||
40 | |||
41 | typedef struct { | ||
42 | int x0; int y0; | ||
43 | int x1; int y1; | ||
44 | } LLine; | ||
45 | |||
46 | typedef struct { | ||
47 | int x; int y; | ||
48 | } LPoint; | ||
49 | |||
50 | typedef struct { | ||
51 | StringMode mode; | ||
52 | LLine line; | ||
53 | uint8_t channel; | ||
54 | uint8_t note; | ||
55 | uint8_t controller; | ||
56 | int timetosilence; | ||
57 | StringModifier modifier; | ||
58 | int pitch_factor; | ||
59 | |||
60 | /* runtime values */ | ||
61 | uint32_t first_time_seen; | ||
62 | uint32_t last_time_seen; | ||
63 | StringPlaying playing; | ||
64 | int octave; | ||
65 | int start_off; | ||
66 | int last_off; | ||
67 | int current_pitch; | ||
68 | } StringConfig; | ||
69 | |||
70 | extern StringConfig g_string_conf[MAX_LINECOUNT]; | ||
71 | extern int g_string_count; | ||
72 | void config_parse( char *config_file ); | ||
73 | char *config_midi_note_to_string(int string); | ||
74 | |||
75 | #endif | ||