I am want to apply a noise gate to my microphone. But I dont know why. I see that LADSPA Plugins can do that but i dont know how to set them up. If someone can help me with LADSPA or has a different application that I could use with PulseAudio, tell me. I need this, quick!
-
For LADSPA usage with pulseaudio see: http://askubuntu.com/questions/43950/how-can-i-apply-a-ladspa-plugin-to-a-pulseaudio-stream - there is a gate in the [SWH plugins](http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html#tth_sEc2.47), or from [TAP Dynamics](http://tap-plugins.sourceforge.net/ladspa/dynamics.html) - it's a bit trial and error to find appropriate parameters. – Takkat Sep 30 '15 at 13:45
-
Every time I try to add this module, it says "Module load failed" I am using this code `pacmd load-module module-ladspa-sink sink_name=ladspa_out master=alsa_output.pci-0000_00_1b.0.analog-stereo plugin=tap_dynamics_st label=tap_dynamics_st control=4,4,2,2` @Takkat – Elderzz Sep 30 '15 at 15:57
-
You missed some options, see my answer below. – Takkat Sep 30 '15 at 19:01
1 Answers
LADSPA-plugins to Pulse Audio
See this question on how to load and use LADSPA-plugins with pulseaudio:
TAP dynamics
For a compressor plugin we can use the TAP dynamics plugin from the tap-plugins
.
The syntax for this plugin to load with pulseaudio is as follows:
pactl load-module module-ladspa-sink sink_name=LADSPA master=<sink-name> \
plugin=tap_dynamics_st label=tap_dynamics_st \
control=<attack>,<release>,<offset gain>,<makeup gain>,<stereo mode>,<function>
To get this plugin loaded we need to fill in all options above within the following possible range (from TAP documentation, also stored locally in usr/share/doc/tap-plugins/):
min. default max.
Attack (ms) 4 125 500
Release (ms) 4 502 1000
Offset Gain (dB) -20 0 20
Makeup Gain (dB) -20 0 20
Stereo Mode [2] ?* ?* ?* *not documented well!
Function 0 0 14
The following function is selected by its number:
0 2:1 compressor at -6 dB
1 2:1 compressor at -9 dB
2 2:1 compressor at -12 dB
3 2:1 compressor at -18 dB
4 2.5:1 compressor at -12 dB
5 3:1 compressor at -12 dB
6 3:1 compressor at -15 dB
7 Compressor/Gate
8 Expander
9 Hard limiter at -6 dB
10 Hard limiter at -12 dB
11 Hard gate at -35 dB
12 Soft limiter
13 Soft knee compressor/gate
14 Soft gate below -36 dB
Apply to microphone source
To apply the LADSPA effect on a microphone source we can loopback the microphone input to this sink:
Using JACK sound server
For a more professional audio processing we may also consider running the JACK sound server where we can add plugins for LADSPA effects (e.g. jack-rack
).
Post-processing with Audacity
Post-processing of exisiting audio files or recordings can be done with Audacity
.
-
I used this solution that you sent. It loads, but how can I set it to take in the audio from the microhpone and make the ladspa like a "virtual" mic in the system that I could use for recording? Now no audio is going into ladspa plugin! – Elderzz Oct 01 '15 at 12:44
-
I can apply the filter to my google chrome stream(when I am watching a vid) and it has huge effects, but when applied to my mic, it doesnt have that effect at all! am i doing something wrong? – Elderzz Oct 01 '15 at 14:07
-
@Elderzz: actually the loopback device should work (at least it did for me). You could also try to assign a duplex profile to your sound card. – Takkat Oct 01 '15 at 14:35
-
How do I do that? @Takkat I also hear myself with the ladspa sink unmuted – Elderzz Oct 01 '15 at 14:37
-
@Elderzz: sorry for the delay (/me busy). I am a bit confused as to where your issue is at the moment. It is crucial to follow this sequence: 1. load the LADSPA module 2. switch to the LADSPA sink for output 3. load the loopback module. A duplex profile can be selected with **pavucontrol** configuration tab or via `pactl set-card-profile
– Takkat Oct 01 '15 at 18:06`. -
I know @Takkat I did all of that, but how do i record the output of the sink? Also, it seems like the plugin has no effects to my mic audio. – Elderzz Oct 01 '15 at 18:15
-
It should have the same effect you hear when playing any other stream. To record the sink choose a `name_of_sink.monitor ` as an input source for the recording application. Again, this choice can best be made with **pavucontrol**. It's not only you who finds this to be confusing and rather complicated. – Takkat Oct 01 '15 at 18:20
-
You may also play with a plugin effect that can't be overheard to get a grasp on the right settings (e.g. with the pitch shift I mentioned in my post I linked to above). – Takkat Oct 01 '15 at 18:24
-
I know the parameters and that but i dont know how to apply it to the mic! – Elderzz Oct 02 '15 at 17:20
-
@Elderzz: I see - no, unfortunately the LADSPA plugins can only be applied to a sink, not to a source. A so far not-yet-existent module-ladspa-source would be really nice to have ;-). That's why we have to loop-back the source to a sink to be able to apply LADSPA effects. – Takkat Oct 02 '15 at 18:14
-
Do you maybe know of a application that would help me do that? Maybe an app that adds plugins to ALSA or PulseAudio. – Elderzz Oct 02 '15 at 19:32
-
@Elderzz: for professional audio processing [JACK](http://jackaudio.org/applications/) as a sound server with effects plugins e.g. [JACKRack](http://jack-rack.sourceforge.net/) may be a better (though harder) approach. JACK is the default sound server in Ubuntu Studio. – Takkat Oct 02 '15 at 20:28
-
I tried to setup jack, but I dont know how to use it cuz whenever i start a jack server, my pulseaudio is not working(I tried with a vid on youtube and it just stops doenst move anywhere) I cant find how to correctly set it up @Takkat – Elderzz Oct 03 '15 at 08:11
-
JACK is an entirely different sound server, and it is not easy to set up. See https://help.ubuntu.com/community/What%20is%20JACK for a start. – Takkat Oct 03 '15 at 08:20
-
I know how to setup jack, the only thing is the connections. in qjactl i dont see chrome, or skype or any of those... @Takkat – Elderzz Oct 03 '15 at 11:45
-
-
@qubodup `
` is the name of the sink you wish the plugin to be applied to. See `pactl list short sinks` for sinks in your system. – Takkat Dec 13 '16 at 18:23