From a8be0d3d20f07d4561826b01f566ca307eb23526 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 12 Aug 2016 14:46:51 +0200 Subject: commit as a backup --- config.h | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 config.h (limited to 'config.h') diff --git a/config.h b/config.h new file mode 100644 index 0000000..2a9c09d --- /dev/null +++ b/config.h @@ -0,0 +1,75 @@ +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +#include + +#define MAX_LINECOUNT 32 + +extern int g_min_y, g_max_y; + +extern int g_midi_two_octave_split; +extern int g_midi_three_octave_split_1; +extern int g_midi_three_octave_split_2; +extern int g_midi_three_octave_split_inverse; +extern int g_midi_main_control; +extern int g_midi_main_channel; +extern int g_settled_dist; +extern int g_timetosilence; + +typedef enum { + midi_one_octave = 0, + midi_two_octaves = 1, + midi_three_octaves = 2, + midi_control = 3, + midi_control_inv = 4 +} StringMode; + +typedef enum { + none = 0, + pitch_bend_up = 1, + pitch_bend_down = 2, + midi_controller = 3, + midi_controller_inv = 4 +} StringModifier; + +typedef enum { + silent = 0, + in_attack = 1, + playing = 2 +} StringPlaying; + +typedef struct { + int x0; int y0; + int x1; int y1; +} LLine; + +typedef struct { + int x; int y; +} LPoint; + +typedef struct { + StringMode mode; + LLine line; + uint8_t channel; + uint8_t note; + uint8_t controller; + int timetosilence; + StringModifier modifier; + int pitch_factor; + +/* runtime values */ + uint32_t first_time_seen; + uint32_t last_time_seen; + StringPlaying playing; + int octave; + int start_off; + int last_off; + int current_pitch; +} StringConfig; + +extern StringConfig g_string_conf[MAX_LINECOUNT]; +extern int g_string_count; +void config_parse( char *config_file ); +char *config_midi_note_to_string(int string); + +#endif -- cgit v1.2.3