Dynamic range compression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2015-09-29 at 09:38 +0200, Mikhail Morfikov wrote:
> On 2015-09-28 15:51, Felipe Sateler wrote:
> > On 28 September 2015 at 10:43, Tanu Kaskinen <tanuk at iki.fi> wrote:
> > > On Mon, 2015-09-28 at 15:30 +0200, Mikhail Morfikov wrote:
> > > > A few days ago I found a module called module-ladspa-sink ,
> > > > and it can be enabled by adding the following code to the
> > > > /etc/pulse/default.pa file:
> > > > 
> > > > .ifexists module-ladspa-sink.so
> > > > .nofail
> > > > load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916
> > > > label=sc4m control=1,1.5,401,-30,20,5,12
> > > > .fail
> > > > .endif
> > > > 
> > > > It works, but I was trying to figure out what exactly
> > > > control=1,1.5,401,-30,20,5,12 means. There's a link
> > > > (http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html#tth_sEc2.92),
> > > > where you can find some documentation on the sc4m_1916 plugin,
> > > > but actually I don't really know which of the values corresponds
> > > > to the specific options. In the link, there's 9 parameters,
> > > > and in the code above, there's 7 I think.
> > > > 
> > > > Is there someone who could cast a little light on the control
> > > > numbers?
> > > 
> > > module-ladspa-sink fails to load if you don't provide all parameters,
> > > so if it works, the plugin really has only 7 control parameters. I
> > > don't know how you then should map them to the documentation. There
> > > very likely is some handy little program somewhere that you could use
> > > to inspect the plugin, but the only one that I can mention off the top
> > > of my head is JACK Rack, but that obviously depends on JACK, and if you
> > > don't already use JACK, it can be a bit of a hassle to set it up. I'd
> > > expect there to be some simple command line ladspa plugin inspector
> > > program too that doesn't need any audio access.
> > 
> > There is analyseplugin that is part of the ladspa sdk:
> > 
> > % analyseplugin sc4m_1916
> > 
> > Plugin Name: "SC4 mono"
> > Plugin Label: "sc4m"
> > Plugin Unique ID: 1916
> > Maker: "Steve Harris <steve at plugin.org.uk>"
> > Copyright: "GPL"
> > Must Run Real-Time: No
> > Has activate() Function: No
> > Has deactivate() Function: No
> > Has run_adding() Function: Yes
> > Environment: Normal or Hard Real-Time
> > Ports:  "RMS/peak" input, control, 0 to 1, default 0
> >        "Attack time (ms)" input, control, 1.5 to 400, default 101.125
> >        "Release time (ms)" input, control, 2 to 800, default 401
> >        "Threshold level (dB)" input, control, -30 to 0, default 0
> >        "Ratio (1:n)" input, control, 1 to 20, default 1
> >        "Knee radius (dB)" input, control, 1 to 10, default 3.25
> >        "Makeup gain (dB)" input, control, 0 to 24, default 0
> >        "Amplitude (dB)" output, control, -40 to 12
> >        "Gain reduction (dB)" output, control, -24 to 0
> >        "Input" input, audio
> >        "Output" output, audio
> > 
> 
> Thanks for the hint. I have one question though. Is there a tool that can
> tell what settings are applied to the plugin? In the log above, there's 7 ports
> that have to be set, that's why there's the default value. Also there's two other
> ports that weren't set anywhere, so I think they're not taken into consideration
> at all if they're not set in the control= option.

The last two controls are outputs, so if the plugin host supports it
(PulseAudio doesn't), other plugins can use those last two controls as
inputs. You only set values for input controls, which is why you only
need to set 7 values.

> I just wanted to see whether
> the settings in control=1,1.5,401,-30,20,5,12 are properly set. Is there something
> like that?

So you'd like to confirm that PulseAudio sets the values correctly?
There is an undocumented API to set and get the control values at
runtime. I don't want to document it here, sorry. I recommend you to
just trust that the controls are set to the values that you specify
when loading the module.

-- 
Tanu


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux