summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorerdgeist <erdgeist@bauklotz.fritz.box>2016-08-12 14:46:51 +0200
committererdgeist <erdgeist@bauklotz.fritz.box>2016-08-12 14:46:51 +0200
commita8be0d3d20f07d4561826b01f566ca307eb23526 (patch)
treeb2c5c6d513ae3a84aba8e4eea94ec32e46d352fa /config.h
commit as a backup
Diffstat (limited to 'config.h')
-rw-r--r--config.h75
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
8extern int g_min_y, g_max_y;
9
10extern int g_midi_two_octave_split;
11extern int g_midi_three_octave_split_1;
12extern int g_midi_three_octave_split_2;
13extern int g_midi_three_octave_split_inverse;
14extern int g_midi_main_control;
15extern int g_midi_main_channel;
16extern int g_settled_dist;
17extern int g_timetosilence;
18
19typedef 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
27typedef 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
35typedef enum {
36 silent = 0,
37 in_attack = 1,
38 playing = 2
39} StringPlaying;
40
41typedef struct {
42 int x0; int y0;
43 int x1; int y1;
44} LLine;
45
46typedef struct {
47 int x; int y;
48} LPoint;
49
50typedef 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
70extern StringConfig g_string_conf[MAX_LINECOUNT];
71extern int g_string_count;
72void config_parse( char *config_file );
73char *config_midi_note_to_string(int string);
74
75#endif