[SCM] calf/master: zoom stuff

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:41:00 UTC 2013


The following commit has been merged in the master branch:
commit 8888127ec44eeade3cfdf5fdbefa01ab39402c19
Author: Markus Schmidt <schmidt at boomshop.net>
Date:   Tue Mar 6 09:34:11 2012 +0100

    zoom stuff

diff --git a/gui/gui-analyzer.xml b/gui/gui-analyzer.xml
index ee0fc4b..fe829b4 100644
--- a/gui/gui-analyzer.xml
+++ b/gui/gui-analyzer.xml
@@ -50,7 +50,7 @@
                         </hbox>
                     </vbox>
                     <vbox spacing="3">
-                        <label text="Level" />
+                        <label text="Zoom" />
                         <vscale param="analyzer_level" inverted="1"/>
                         <value param="analyzer_level" />
                     </vbox>
diff --git a/src/metadata.cpp b/src/metadata.cpp
index d6a53bb..1a5e073 100644
--- a/src/metadata.cpp
+++ b/src/metadata.cpp
@@ -992,7 +992,7 @@ CALF_PORT_PROPS(analyzer) = {
     { 0,           0,           1,     0,  PF_FLOAT | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip_L", "Clip L" },
     { 0,           0,           1,     0,  PF_FLOAT | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip_R", "Clip R" },
     
-    { 1,           0.125,           8,    0,  PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "analyzer_level", "Analyzer Level" },
+    { 1,           0.5,           2,    0,  PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "analyzer_level", "Analyzer Level" },
     { 0,           0,           2,     0,  PF_ENUM | PF_CTL_COMBO, analyzer_source_names, "analyzer_source", "Analyzer Source" },
     { 6,      2,           8,   0,  PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_GRAPH, NULL, "analyzer_accuracy", "Analyzer Accuracy" },
     { 13,      1,           15,   0,  PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_GRAPH, NULL, "analyzer_speed", "Analyzer Speed" },
diff --git a/src/modules.cpp b/src/modules.cpp
index 0170bee..b7512cf 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -943,8 +943,8 @@ uint32_t analyzer_audio_module::process(uint32_t offset, uint32_t numsamples, ui
         ppos %= (phase_buffer_size - 2);
         
         // analyzer
-        fft_buffer[fpos] = L * *params[param_analyzer_level];
-        fft_buffer[fpos + 1] = R * *params[param_analyzer_level];
+        fft_buffer[fpos] = L;
+        fft_buffer[fpos + 1] = R;
         
         fpos += 2;
         fpos %= (max_fft_buffer_size - 2);
@@ -1185,7 +1185,7 @@ bool analyzer_audio_module::get_graph(int index, int subindex, float *data, int
                 // fill freeze buffer
                 fft_freeze[iter] = val;
             }
-            data[i] = dB_grid(fabs(val) / _accuracy * 2.f + 1e-20);
+            data[i] = dB_grid(fabs(val) / _accuracy * 2.f + 1e-20, pow(64, *params[param_analyzer_level]), 0.5f);
             if(*params[param_analyzer_mode] == 3) {
                 if(i) {
                     data[i] = val;
@@ -1230,9 +1230,9 @@ bool analyzer_audio_module::get_gridline(int index, int subindex, float &pos, bo
 { 
     bool out;
     if(*params[param_analyzer_mode] != 3)
-        out = get_freq_gridline(subindex, pos, vertical, legend, context);
+        out = get_freq_gridline(subindex, pos, vertical, legend, context, true, pow(64, *params[param_analyzer_level]), 0.5f);
     else
-        out = get_freq_gridline(subindex, pos, vertical, legend, context, true, 16, 0.0000000001f);
+        out = get_freq_gridline(subindex, pos, vertical, legend, context, true, pow(16, *params[param_analyzer_level]), 0.f);
     if(*params[param_analyzer_mode] == 3 and not vertical) {
         if(subindex == 30)
             legend="L";
@@ -1244,7 +1244,7 @@ bool analyzer_audio_module::get_gridline(int index, int subindex, float &pos, bo
     return out;
 }
 bool analyzer_audio_module::get_clear_all(int index) const {
-    if(*params[param_analyzer_mode] != _mode_old) {
+    if(*params[param_analyzer_mode] != _mode_old or *params[param_analyzer_level]) {
         _mode_old = *params[param_analyzer_mode];
         return true;
     }

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list