diff options
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -14,8 +14,10 @@ int g_midi_three_octave_split_2 = 66; | |||
14 | int g_midi_three_octave_split_inverse = 0; | 14 | int g_midi_three_octave_split_inverse = 0; |
15 | int g_settled_dist = 5; | 15 | int g_settled_dist = 5; |
16 | int g_timetosilence = 30; | 16 | int g_timetosilence = 30; |
17 | int g_pitchbend_delay = 500; | ||
17 | 18 | ||
18 | int g_min_y = 0, g_max_y; | 19 | int g_min_y = 0, g_max_y; |
20 | int g_normalize_factor = 0; | ||
19 | 21 | ||
20 | static int g_current_string; | 22 | static int g_current_string; |
21 | StringConfig | 23 | StringConfig |
@@ -43,6 +45,7 @@ config_reset() | |||
43 | g_midi_three_octave_split_inverse = 0; | 45 | g_midi_three_octave_split_inverse = 0; |
44 | g_settled_dist = 5; | 46 | g_settled_dist = 5; |
45 | g_timetosilence = 30; | 47 | g_timetosilence = 30; |
48 | g_pitchbend_delay = 500; | ||
46 | 49 | ||
47 | g_config_source = source_none; | 50 | g_config_source = source_none; |
48 | } | 51 | } |
@@ -74,6 +77,8 @@ enum { | |||
74 | KEYWORD_STRINGS, | 77 | KEYWORD_STRINGS, |
75 | KEYWORD_STRING, | 78 | KEYWORD_STRING, |
76 | KEYWORD_LINE, | 79 | KEYWORD_LINE, |
80 | KEYWORD_LINEARIZE, | ||
81 | KEYWORD_PITCHBEND_DELAY, | ||
77 | KEYWORD_MODE, | 82 | KEYWORD_MODE, |
78 | KEYWORD_MODE_ONE_OCTAVE, | 83 | KEYWORD_MODE_ONE_OCTAVE, |
79 | KEYWORD_MODE_TWO_OCTAVES, | 84 | KEYWORD_MODE_TWO_OCTAVES, |
@@ -108,6 +113,8 @@ static keyword keywords[] = { | |||
108 | {KEYWORD_STRINGS, "Strings"}, | 113 | {KEYWORD_STRINGS, "Strings"}, |
109 | {KEYWORD_STRING, "String"}, | 114 | {KEYWORD_STRING, "String"}, |
110 | {KEYWORD_LINE, "Line"}, | 115 | {KEYWORD_LINE, "Line"}, |
116 | {KEYWORD_LINEARIZE, "LineSquareFactor"}, | ||
117 | {KEYWORD_PITCHBEND_DELAY, "PitchBendDelay"}, | ||
111 | {KEYWORD_MODE, "Mode"}, | 118 | {KEYWORD_MODE, "Mode"}, |
112 | {KEYWORD_MODE_ONE_OCTAVE, "midi_one_octave"}, | 119 | {KEYWORD_MODE_ONE_OCTAVE, "midi_one_octave"}, |
113 | {KEYWORD_MODE_TWO_OCTAVES, "midi_two_octaves"}, | 120 | {KEYWORD_MODE_TWO_OCTAVES, "midi_two_octaves"}, |
@@ -208,6 +215,12 @@ config_handle_line(char *line) | |||
208 | return -1; | 215 | return -1; |
209 | } | 216 | } |
210 | break; | 217 | break; |
218 | case KEYWORD_LINEARIZE: | ||
219 | g_normalize_factor = atol(line); | ||
220 | break; | ||
221 | case KEYWORD_PITCHBEND_DELAY: | ||
222 | g_pitchbend_delay = atol(line); | ||
223 | break; | ||
211 | case KEYWORD_LINE: | 224 | case KEYWORD_LINE: |
212 | { | 225 | { |
213 | LLine *l = &sc->line; | 226 | LLine *l = &sc->line; |
@@ -394,6 +407,11 @@ config_dumpglobals(char *out, size_t outsize) | |||
394 | off += snprintf(out + off, outsize - off, | 407 | off += snprintf(out + off, outsize - off, |
395 | "midi_main_channel %d\n\n", g_midi_main_channel); | 408 | "midi_main_channel %d\n\n", g_midi_main_channel); |
396 | 409 | ||
410 | off += snprintf(out + off, outsize - off, | ||
411 | "LineSquareFactor %d\n\n", g_normalize_factor); | ||
412 | off += snprintf(out + off, outsize - off, | ||
413 | "PitchBendDelay %d\n\n", g_pitchbend_delay); | ||
414 | |||
397 | if (g_settled_dist != 5) | 415 | if (g_settled_dist != 5) |
398 | off += snprintf(out + off, outsize - off, | 416 | off += snprintf(out + off, outsize - off, |
399 | "SettledDist %d\n\n", g_settled_dist); | 417 | "SettledDist %d\n\n", g_settled_dist); |