text
stringlengths 0
14.1k
|
---|
(foreach-channel
|
(cout (* scale (part-convolve (audio-in 0) *pvbuf*))))))
|
---
|
<span style=""color: #ff7f24;""># </span><span style=""color: #ff7f24;"">Trivial rego file</span>
|
<span style=""color: #b0c4de;"">echo</span> 0 convolve > forge.rego</pre>
|
<p>
|
I use `–' to separate toplevel and user options. reverb.wav is
|
the impulse response of a stereo reverb, sampled with sample rate
|
96 kHz, and voice.wav is an input file. The second user option is a
|
scale factor for the output.
|
</p>
|
<pre class=""src src-sh"">incudine conv.cudo -i voice.wav -r 96000 -s forge.rego -- reverb.wav 0.4</pre>
|
<p>
|
A function for the shell is immediate.
|
</p>
|
<pre class=""src src-sh""><span style=""color: #ff7f24;""># </span><span style=""color: #ff7f24;"">Usage: convolve inputfile irfile [scale] [srate] [pad]</span>
|
<span style=""color: #87cefa;"">convolve</span>() { incudine conv.cudo -i <span style=""color: #ffa07a;"">""$1""</span> ${<span style=""color: #eedd82;"">4</span>:+-r $<span style=""color: #eedd82;"">4</span>} --pad ${<span style=""color: #eedd82;"">5</span>:-2} <span style=""color: #ffa07a;"">\</span>
|
-s forge.rego -- <span style=""color: #ffa07a;"">""$2""</span> <span style=""color: #ffa07a;"">""$3""</span> ; }
|
convolve voice.wav reverb.wav 0.4 96000
|
convolve voice48.wav ir48.wav 0.53 48000 2.5
|
<span style=""color: #ff7f24;""># </span><span style=""color: #ff7f24;"">Remove the traces</span>
|
<span style=""color: #b0c4de;"">unset</span> -f convolve</pre>
|
<p>
|
If you have created the incudine command with the support for LV2, you
|
can use LV2 plugins in your scripts. A trivial example:
|
</p>
|
<pre class=""src src-sh"">cat > amp.cudo <<'---'
|
(lv2->vug ""http://plugin.org.uk/swh-plugins/amp"" swh.amp)
|
(dsp! amp-test (gain)
|
(stereo (swh.amp gain (white-noise 1))))
|
---
|
cat > amp-test.rego <<'---'
|
0 amp-test -6 :id 1
|
1 set-control 1 :gain -12
|
2 set-control 1 :gain -4
|
3 set-control 1 :gain -20
|
4 set-control 1 :gain -5
|
5 free 1
|
---
|
incudine amp.cudo -s amp-test.rego</pre>
|
<p>
|
Another example, where a multi output plugin returns a FRAME:
|
</p>
|
<pre class=""src src-sh"">cat > gverb.cudo <<'---'
|
(lv2->vug ""http://plugin.org.uk/swh-plugins/gverb"" gverb)
|
(dsp! gverb-test (room-size rev-time damping input-bw dry early-level
|
tail-level scale)
|
(frame-out (gverb room-size rev-time damping input-bw
|
dry early-level tail-level (audio-in 0))
|
2 0 scale))
|
---
|
cat > gverb-test.rego <<'---'
|
0 gverb-test 80 8 0.5 0.75 -70 0 -17 .4 :id 1
|
3 set-controls 1 :freq .3 :dt .05 :dry -77 :rev-time 30 :tail-level -7
|
6 set-control 1 :rev-time 1
|
---
|
incudine gverb.cudo -i voice.wav --pad 3 -r 96000 -s gverb-test.rego</pre>
|
<p>
|
If you have also created the incudine command with the support for
|
LADSPA, here is an example to use LADSPA plugins:
|
</p>
|
<pre class=""src src-sh"">cat > plate-rev.cudo <<'---'
|
(ladspa->vug ""caps"" ""Plate"" plate-reverb)
|
(dsp! plate-reverb-test (trig-freq input-decay input-scale bw tail damping blend)
|
""Test of the Plate reverb developed by Tim Goetze.""
|
(with-samples ((in (* (decay (impulse trig-freq) input-decay)
|
(white-noise input-scale))))
|
;; PLATE-REVERB returns a frame because there are two outputs.
|
(multiple-sample-bind (l r)
|
(plate-reverb bw tail damping blend in)
|
(out l r))))
|
---
|
cat > plate-rev-test.rego <<'---'
|
0 plate-reverb-test 4 .165 .5 .75 .5 .25 .25
|
2 set-controls 1 :trig-freq 1.5 :tail .8 :dumping .1 :blend .5
|
5 set-control 1 :trig-freq .1
|
8 free 1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.