From 5fc665970ff9731d7de25510393465f5ffa7893d Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Wed, 17 Sep 2014 12:00:42 +0200 Subject: [PATCH] Add the gst-vocoder experiment --- shell/gst-vocoder.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 shell/gst-vocoder.sh diff --git a/shell/gst-vocoder.sh b/shell/gst-vocoder.sh new file mode 100755 index 0000000..240c01c --- /dev/null +++ b/shell/gst-vocoder.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +FORMANT="autoaudiosrc" + +# In order to have a MIDI carrier use the alsa loopback device and Timidity++ like this: +# +# $ sudo modprobe snd-aloop +# $ timidity -Os -o "hw:Loopback,0,0" -iA --sequencer-ports 1 +# +# then connect to Timidity++ with a MIDI input device, e.g.: +# +# $ xset -r +# $ vkeybd --device alsa --addr 129:0 +# $ xset r on +# +# and have a lot of fun vocoding the crap out of your formant channel +CARRIER_TONE="alsasrc device=hw:Loopback,1,0 ! audioconvert" + +# Add some white noise to the carrier +CARRIER_PARAMS="$CARRIER_TONE ! carrier. audiotestsrc wave=5 volume=0.1 ! carrier." +CARRIER="adder name=carrier" + +SINK="autoaudiosink" + +gst-launch-1.0 -v interleave name=i ! \ + capssetter caps="audio/x-raw,channels=2,channel-mask=(bitmask)0x3" ! audioconvert ! audioresample ! \ + ladspa-vocoder-1337-so-vocoder-lmms \ + number-of-bands=16 \ + left-right=0 \ + band-1-level=1 \ + band-2-level=1 \ + band-3-level=1 \ + band-4-level=1 \ + band-5-level=1 \ + band-6-level=1 \ + band-7-level=1 \ + band-8-level=1 \ + band-9-level=1 \ + band-10-level=1 \ + band-11-level=1 \ + band-12-level=1 \ + band-13-level=1 \ + band-14-level=1 \ + band-15-level=1 \ + band-16-level=1 \ + ! $SINK \ + $FORMANT ! audioconvert ! audioresample ! audio/x-raw, rate=44100, format=S16LE, channels=1 ! queue ! i.sink_0 \ + $CARRIER ! audioconvert ! audioresample ! audio/x-raw, rate=44100, format=S16LE, channels=1 ! queue ! i.sink_1 \ + $CARRIER_PARAMS -- 2.1.4