summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@bauklotz.fritz.box>2018-04-16 16:08:23 +0200
committererdgeist <erdgeist@bauklotz.fritz.box>2018-04-16 16:08:23 +0200
commit800008e018fe6160f7e88d939904c41d185fa9c1 (patch)
tree939bae028238fed8737c6ab062f5e1f065d05d66
parentfd0cea2ce5b43f04e9d2abcecc2a1e6b8bb95c73 (diff)
Make pitch factor global option
-rw-r--r--config.c2
-rw-r--r--config.h1
-rw-r--r--engine.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/config.c b/config.c
index 7fa938d..1d894ca 100644
--- a/config.c
+++ b/config.c
@@ -15,6 +15,7 @@ int g_midi_three_octave_split_inverse = 0;
15int g_settled_timedelta = 10; 15int g_settled_timedelta = 10;
16int g_settled_dist = 5; 16int g_settled_dist = 5;
17int g_timetosilence = 30; 17int g_timetosilence = 30;
18int g_pitch_factor = 256*128;
18int g_pitchbend_delay = 500; 19int g_pitchbend_delay = 500;
19 20
20int g_min_y = 0, g_max_y; 21int g_min_y = 0, g_max_y;
@@ -46,6 +47,7 @@ config_reset()
46 g_midi_three_octave_split_inverse = 0; 47 g_midi_three_octave_split_inverse = 0;
47 g_settled_dist = 5; 48 g_settled_dist = 5;
48 g_timetosilence = 30; 49 g_timetosilence = 30;
50 g_pitch_factor = 256*128;
49 g_pitchbend_delay = 500; 51 g_pitchbend_delay = 500;
50 52
51 g_config_source = source_none; 53 g_config_source = source_none;
diff --git a/config.h b/config.h
index 80e7f78..56e1e88 100644
--- a/config.h
+++ b/config.h
@@ -18,6 +18,7 @@ extern int g_midi_main_channel;
18extern int g_settled_dist; 18extern int g_settled_dist;
19extern int g_settled_timedelta; 19extern int g_settled_timedelta;
20extern int g_timetosilence; 20extern int g_timetosilence;
21extern int g_pitch_factor;
21extern int g_pitchbend_delay; 22extern int g_pitchbend_delay;
22extern int g_normalize_factor; 23extern int g_normalize_factor;
23 24
diff --git a/engine.c b/engine.c
index 4114b0f..5188fbd 100644
--- a/engine.c
+++ b/engine.c
@@ -246,7 +246,7 @@ engine_handle_point(LPoint * p, uint32_t monotime)
246 StringConfig *s;; 246 StringConfig *s;;
247 int dist_max = 1024 * 1024 * 8; 247 int dist_max = 1024 * 1024 * 8;
248 int offs, saite = -1, i, oct = 0; 248 int offs, saite = -1, i, oct = 0;
249 int y_viewfield, pitch_factor = 256*128; 249 int y_viewfield, pitch_factor = g_pitch_factor;
250 int dv, dt, speed, new_pitch; 250 int dv, dt, speed, new_pitch;
251 251
252#ifndef NO_DISPLAY 252#ifndef NO_DISPLAY