summaryrefslogtreecommitdiff
path: root/libs/plugins/a-eq.lv2
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2016-07-09 00:28:01 +1000
committerDamien Zammit <damien@zamaudio.com>2016-07-09 00:29:59 +1000
commitb7a7c1bbd8491f0c66f3fac8e84e8ee08c273f52 (patch)
treef12b72417a8a316034d783c4076ad3e5bcf64537 /libs/plugins/a-eq.lv2
parent2cc33684c71131fd483346fe05e3b1a0e1706de9 (diff)
a-EQ: Tweak default values and inline display scale +-20dB
Diffstat (limited to 'libs/plugins/a-eq.lv2')
-rw-r--r--libs/plugins/a-eq.lv2/a-eq.c19
-rw-r--r--libs/plugins/a-eq.lv2/a-eq.ttl.in16
2 files changed, 20 insertions, 15 deletions
diff --git a/libs/plugins/a-eq.lv2/a-eq.c b/libs/plugins/a-eq.lv2/a-eq.c
index 816ea46672..21a69c0671 100644
--- a/libs/plugins/a-eq.lv2/a-eq.c
+++ b/libs/plugins/a-eq.lv2/a-eq.c
@@ -110,6 +110,7 @@ typedef struct {
float v_filtog[BANDS];
float v_shelftogl;
float v_shelftogh;
+ float v_master;
bool need_expose;
@@ -429,6 +430,10 @@ run(LV2_Handle instance, uint32_t n_samples)
aeq->v_shelftogh = *(aeq->shelftogh);
aeq->need_expose = true;
}
+ if (aeq->v_master != *(aeq->master)) {
+ aeq->v_master = *(aeq->master);
+ aeq->need_expose = true;
+ }
}
#ifdef LV2_EXTENDED
@@ -560,15 +565,15 @@ render_inline (LV2_Handle instance, uint32_t w, uint32_t max_h)
cairo_set_line_width(cr, 1.0);
- // draw grid 10dB steps
+ // draw grid 5dB steps
const double dash2[] = {1, 3};
cairo_save (cr);
cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
cairo_set_dash(cr, dash2, 2, 2);
cairo_set_source_rgba (cr, 0.5, 0.5, 0.5, 0.5);
- for (uint32_t d = 1; d < 6; ++d) {
- const float y = -.5 + floorf (h * (d * 10.f / 60.f));
+ for (uint32_t d = 1; d < 8; ++d) {
+ const float y = -.5 + floorf (h * (d * 5.f / 40.f));
cairo_move_to (cr, 0, y);
cairo_line_to (cr, w, y);
cairo_stroke (cr);
@@ -581,12 +586,12 @@ render_inline (LV2_Handle instance, uint32_t w, uint32_t max_h)
cairo_move_to (cr, 0, h);
for (uint32_t x = 0; x < w; ++x) {
- // plot 20..20kHz +-30dB
+ // plot 20..20kHz +-20dB
const float x_hz = 20.f * powf (1000.f, (float)x / (float)w);
- const float y_db = to_dB(eq_curve(self, x_hz));
- const float y = h * -y_db / 60.0 + h / 2;
+ const float y_db = to_dB(eq_curve(self, x_hz)) + self->v_master;
+ const float y = h * -y_db / 40.0 + h / 2;
cairo_line_to (cr, x, y);
- printf("(hz,H,db)=(%f, %f, %f)\n", x_hz, from_dB(y_db), y_db);
+ //printf("(hz,H,db)=(%f, %f, %f)\n", x_hz, from_dB(y_db), y_db);
}
cairo_stroke_preserve (cr);
diff --git a/libs/plugins/a-eq.lv2/a-eq.ttl.in b/libs/plugins/a-eq.lv2/a-eq.ttl.in
index 42aa063a14..4fd8b17463 100644
--- a/libs/plugins/a-eq.lv2/a-eq.ttl.in
+++ b/libs/plugins/a-eq.lv2/a-eq.ttl.in
@@ -24,7 +24,7 @@
lv2:index 0 ;
lv2:name "Shelf toggle L" ;
lv2:symbol "shelftogl" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;
@@ -175,7 +175,7 @@
lv2:index 15 ;
lv2:name "Shelf toggle H" ;
lv2:symbol "shelftogh" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;
@@ -215,7 +215,7 @@
lv2:index 19 ;
lv2:name "Filter L ON" ;
lv2:symbol "filtogl" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;
@@ -225,7 +225,7 @@
lv2:index 20 ;
lv2:name "Filter 1 ON" ;
lv2:symbol "filtog1" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;
@@ -235,7 +235,7 @@
lv2:index 21 ;
lv2:name "Filter 2 ON" ;
lv2:symbol "filtog2" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;
@@ -245,7 +245,7 @@
lv2:index 22 ;
lv2:name "Filter 3 ON" ;
lv2:symbol "filtog3" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;
@@ -255,7 +255,7 @@
lv2:index 23 ;
lv2:name "Filter 4 ON" ;
lv2:symbol "filtog4" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;
@@ -265,7 +265,7 @@
lv2:index 24 ;
lv2:name "Filter H ON" ;
lv2:symbol "filtogh" ;
- lv2:default 0.000000 ;
+ lv2:default 1.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 1.000000 ;
lv2:portProperty lv2:toggled ;