1DSP(1)                      General Commands Manual                     DSP(1)
2
3
4

NAME

6       dsp - an audio processing program with an interactive mode
7

SYNOPSIS

9       dsp  [options]  path  ...  [!]  [:channel_selector] [@[~/]effects_file]
10       [effect [args ...]] ...
11

DESCRIPTION

13       dsp is an audio processing program with an interactive mode.
14

OPTIONS

16   Global options
17       -h     Show help text.
18
19       -b frames
20              Set buffer size (must be given before the first input).
21
22       -R ratio
23              Set codec maximum buffer ratio (must be given before  the  first
24              input).
25
26       -i     Force interactive mode.
27
28       -I     Disable interactive mode.
29
30       -q     Disable progress display.
31
32       -s     Silent mode.
33
34       -v     Verbose mode.
35
36       -d     Force dithering.
37
38       -D     Disable dithering.
39
40       -E     Don't drain effects chain before rebuilding.
41
42       -p     Plot effects chain instead of processing audio.
43
44       -V     Enable verbose progress display.
45
46       -S     Use `sequence' input combining mode.
47
48   Input/output options
49       -o     Output.
50
51       -t type
52              Type.
53
54       -e encoding
55              Encoding.
56
57       -B/L/N Big/little/native endian.
58
59       -r frequency[k]
60              Sample rate.
61
62       -c channels
63              Number of channels.
64
65       -n     Equivalent to
66                   -t null null.
67

INPUTS AND OUTPUTS

69       For a complete list of supported input/output types, run
70            $ dsp -h
71
72   Input combining modes
73       In  concatenate  mode (the default), the inputs are concatenated in the
74       order given and sent to the output. All inputs must have the same  sam‐
75       ple rate and number of channels.
76
77       In  sequence mode, the inputs are sent serially to the output like con‐
78       catenate mode, but the inputs do not need to have the same sample  rate
79       or  number  of  channels.  The  effects  chain  and/or  output  will be
80       rebuilt/reopened when required. Note that if the output is a file,  the
81       file will be truncated if it is reopened. This mode is most useful when
82       the output is an audio device, but can  also  be  used  to  concatenate
83       inputs  with  different  sample rates and/or numbers of channels into a
84       single output file when used with the resample and/or remix effects.
85

EFFECTS

87   Full effects list
88       lowpass_1 f0[k]
89              Single-pole lowpass filter.
90
91       highpass_1 f0[k]
92              Single-pole highpass filter.
93
94       lowpass f0[k] width[q|o|h|k]
95              Double-pole lowpass filter.
96
97       highpass f0[k] width[q|o|h|k]
98              Double-pole highpass filter.
99
100       bandpass_skirt f0[k] width[q|o|h|k]
101              Double-pole bandpass filter with constant skirt gain.
102
103       bandpass_peak f0[k] width[q|o|h|k]
104              Double-pole bandpass filter with constant peak gain.
105
106       notch f0[k] width[q|o|h|k]
107              Double-pole notch filter.
108
109       allpass f0[k] width[q|o|h|k]
110              Double-pole allpass filter.
111
112       eq f0[k] width[q|o|h|k] gain
113              Double-pole peaking filter.
114
115       lowshelf f0[k] width[q|s|d|o|h|k] gain
116              Double-pole lowshelf filter.
117
118       highshelf f0[k] width[q|s|d|o|h|k] gain
119              Double-pole highshelf filter.
120
121       linkwitz_transform fz[k] qz fp[k] qp
122              Linkwitz    transform    (see    http://www.linkwitzlab.com/fil
123              ters.htm#9).
124
125       deemph Compact Disc de-emphasis filter.
126
127       biquad b0 b1 b2 a0 a1 a2
128              Biquad filter.
129
130       gain [channel] gain
131              Gain  adjustment.  Ignores the channel selector when the channel
132              argument is given.
133
134       mult [channel] multiplier
135              Multiplies each sample by multiplier. Ignores the channel selec‐
136              tor when the channel argument is given.
137
138       crossfeed f0[k] separation
139              Simple    crossfeed    for    headphones.    Very   similar   to
140              Linkwitz/Meier/CMoy/bs2b crossfeed.
141
142       remix channel_selector|. ...
143              Select and mix input channels into output channels. Each channel
144              selector  specifies  the  input  channels to be mixed to produce
145              each output channel.  `.' selects no input channels.  For  exam‐
146              ple,
147                   remix 0,1 2,3
148              mixes  input  channels  0 and 1 into output channel 0, and input
149              channels 2 and 3 into output channel 1.
150                   remix -
151              mixes all input channels into a single output channel.
152
153       delay delay[s|m|S]
154              Delay line. The unit for the delay argument depends on the  suf‐
155              fix used: `s' is seconds (the default), `m' is milliseconds, and
156              `S' is samples.
157
158       resample [bandwidth] fs[k]
159              Sinc resampler. Ignores the channel selector.
160
161       fir [~/]impulse_path
162              Non-partitioned 64-bit FFT convolution. Latency is equal to  the
163              length of the impulse.
164
165       zita_convolver [min_part_len [max_part_len]] [~/]impulse_path
166              Partitioned  32-bit  FFT  convolution  using  the zita-convolver
167              library.  Latency  is  equal  to  min_part_len  (64  samples  by
168              default).  {min,max}_part_len must be powers of 2 between 64 and
169              8192.
170
171       noise level
172              Add TPDF noise. The level argument specifies the peak  level  of
173              the noise (dBFS).
174
175       compress thresh ratio attack release
176              Compress  or  expand the dynamic range. This effect peak-sensing
177              and input channels are linked. If the ratio is in  (1,inf),  the
178              dynamic  range will be compressed. If the ratio is in (0,1), the
179              dynamic range will be expanded.  Attack refers to  decreases  in
180              gain and release refers to increases in gain.
181
182       reverb   [-w]   [reverberance   [hf_damping  [room_scale  [stereo_depth
183       [pre_delay [wet_gain]]]]]]
184              Add reverberation using the freeverb  algorithm.  Effect  ported
185              from   libSoX.    reverberance,   hf_damping,   room_scale,  and
186              stereo_depth are in percent. pre_delay is in seconds.
187
188       g2reverb  [-w]  [room_size   [reverb_time   [input_bandwidth   [damping
189       [dry_level [reflection_level [tail_level]]]]]]]
190              Add reverberation using Fons Adriaensen's g2reverb algorithm.
191
192       ladspa_host module_path plugin_label [control ...]
193              Apply a LADSPA plugin. Supports any number of input/output ports
194              (with the exception of zero output  ports).  Plugins  with  zero
195              input ports will replace selected input channels with their out‐
196              put(s). If a plugin has one or zero  input  ports,  it  will  be
197              instantiated multiple times to handle multi-channel input.
198
199              Controls which are not explicitly set or are set to `-' will use
200              default values (if available).
201
202              The `LADSPA_PATH' environment variable can be used  to  set  the
203              search path for plugins.
204
205       stats [ref_level]
206              Display  the DC offset, minimum, maximum, peak level (dBFS), RMS
207              level (dBFS), crest factor (dB), peak count, peak sample, number
208              of  samples,  and  length  (s) for each channel. If ref_level is
209              given, peak and RMS levels relative to ref_level will  be  shown
210              as well (dBr).
211
212   Exclamation mark
213       A `!' marks the effect that follows as `non-essential'. If an effect is
214       marked non-essential and it fails to initialize, it will be skipped.
215
216   Selector syntax
217       [[start][-[end]][,...]]
218
219       Example    Description
220       ──────────────────────────────────────
221       <empty>    all
222       -          all
223       2-         2 to n
224       -4         0 through 4
225       1,3        1 and 3
226       1-4,7,9-   1 through 4, 7, and 9 to n
227
228   Width suffixes
229       Suffix   Description
230       ─────────────────────────────────────────────────────
231       q        Q-factor (default).
232       s        Slope (shelving filters only).
233       d        Slope in dB/octave (shelving filters only).
234       o        Bandwidth in octaves.
235       h        Bandwidth in Hz.
236       k        Bandwidth in kHz.
237
238       Note: The `d' width suffix also changes the definition of f0 from  cen‐
239       ter  frequency  to  corner  frequency  (like  Room  EQ  Wizard  and the
240       Behringer DCX2496).
241
242   File paths
243       *      On the command line, relative paths are relative to `$PWD'.
244
245       *      Within an effects file,  relative  paths  are  relative  to  the
246              directory containing said effects file.
247
248       *      The `~/' prefix will be expanded to the contents of `$HOME'.
249
250   Effects file syntax
251       *      Arguments are delimited by whitespace.
252
253       *      If the first non-whitespace character in a line is `#', the line
254              is ignored.
255
256       *      The `\' character removes any special meaning of the next  char‐
257              acter.
258
259       Example:
260             gain -10
261             # This is a comment
262             eq 1k 1.0 +10.0 eq 3k 3.0 -4.0
263             lowshelf 90 0.7 +4.0
264
265       Effects  files inherit a copy of the current channel selector. In other
266       words, if an effects chain is this:
267             :2,4 @eq_file.txt eq 2k 1.0 -2.0
268       eq_file.txt will inherit the `2,4' selector, but any selector specified
269       within  eq_file.txt  will  not  affect the `eq 2k 1.0 -2.0' effect that
270       comes after it.
271

EXAMPLES

273       Read file.flac, apply a bass boost, and write to alsa device hw:2:
274             dsp file.flac -ot alsa -e s24_3 hw:2 lowshelf 60 0.5 +4.0
275
276       Plot amplitude vs frequency for a complex effects chain:
277             dsp -pn gain -1.5 lowshelf 60 0.7 +7.8 eq 50 2.0 -2.7 eq 100 2.0 -3.9
278               eq 242 1.0 -3.8 eq 628 2.0 +2.1 eq 700 1.5 -1.0
279               lowshelf 1420 0.68 -12.5 eq 2500 1.3 +3.0 eq 3000 8.0 -1.8
280               eq 3500 2.5 +1.4 eq 6000 1.1 -3.4 eq 9000 1.8 -5.6
281               highshelf 10000 0.7 -0.5 | gnuplot
282
283       Implement an LR4 crossover at 2.2KHz, where output channels 0 and 2 are
284       the left and right woofers, and channels 1 and 3 are the left and right
285       tweeters, respectively:
286             dsp stereo_file.flac -ot alsa -e s32 hw:3 remix 0 0 1 1 :0,2
287               lowpass 2.2k 0.707 lowpass 2.2k 0.707 :1,3 highpass 2.2k 0.707
288               highpass 2.2k 0.707 :
289
290       Apply effects from a file:
291             dsp file.flac @eq.txt
292

LADSPA FRONTEND

294   Configuration
295       ladspa_dsp looks for configuration files in the following directories:
296
297
298       *      $XDG_CONFIG_HOME/ladspa_dsp
299
300       *      $HOME/.config/ladspa_dsp (if $XDG_CONFIG_HOME is not set)
301
302       *      /etc/ladspa_dsp
303
304       To override the default directories, set  the  `LADSPA_DSP_CONFIG_PATH'
305       environment variable to the desired path(s) (colon-separated).
306
307       Each file that is named either config or config_<name> (where <name> is
308       any string) is loaded as a separate plugin. The plugin label is  either
309       ladspa_dsp (for config) or ladspa_dsp:<name> (for config_<name>).
310
311       Configuration  files  are a simple key-value format. Leading whitespace
312       is ignored. The valid keys are:
313
314       input_channels
315              Number of input channels. Default value is 1. May be left  unset
316              unless you want individual control over each channel.
317
318       output_channels
319              Number  of  output  channels. Default value is 1. Initialization
320              will fail if this value is set incorrectly.
321
322       LC_NUMERIC
323              Set `LC_NUMERIC' to the given value while building  the  effects
324              chain. If the decimal separator defined by your system locale is
325              something other than `.', you should set this to `C' (to use `.'
326              as  the decimal separator) or an empty value (to use the decimal
327              separator defined by your locale).
328
329       effects_chain
330              String to build the effects chain. The format is the same as  an
331              effects file, but only a single line is interpreted.
332
333       Example configuration:
334             # This is a comment
335             input_channels=1
336             output_channels=1
337             LC_NUMERIC=C
338             effects_chain=gain -3.0 lowshelf 100 1.0s +3.0 @/path/to/eq_file
339
340       Relative  file  paths  in  the  effects_chain  line are relative to the
341       directory in which the configuration file resides.
342
343       The loglevel can be set to `VERBOSE', `NORMAL', or `SILENT' through the
344       `LADSPA_DSP_LOGLEVEL' environment variable.
345
346       Note: The resample effect cannot be used with the LADSPA frontend.
347
348   Examples
349       See  https://github.com/bmc0/dsp/blob/master/README.md  for usage exam‐
350       ples.
351

BUGS

353       No support for metadata.
354
355       Some effects do not support plotting.
356

LICENSE

358       This software is released under the ISC license, except for the  reverb
359       effect,    which    is    under   the   LGPLv2.1   license   (copyright
360       robs@users.sourceforge.net), and the g2reverb effect,  which  is  under
361       the  GPLv2  license  (copyright Fons Adriaensen <fons@linuxaudio.org>).
362       See the LICENSE files for more details.
363
364
365
366                                    dsp-1.6                             DSP(1)
Impressum