X-Git-Url: https://git.ao2.it/experiments/gstreamer.git/blobdiff_plain/5fc665970ff9731d7de25510393465f5ffa7893d..2e8d81473f8663741c2860a8ee6e92fc994bbf39:/shell/gst-vocoder.sh diff --git a/shell/gst-vocoder.sh b/shell/gst-vocoder.sh index 240c01c..df00ccf 100755 --- a/shell/gst-vocoder.sh +++ b/shell/gst-vocoder.sh @@ -1,30 +1,33 @@ #!/bin/sh - + FORMANT="autoaudiosrc" - -# In order to have a MIDI carrier use the alsa loopback device and Timidity++ like this: + +# Connect your hardware MIDI device, or launch a virtual MIDI device like +# this: # -# $ sudo modprobe snd-aloop -# $ timidity -Os -o "hw:Loopback,0,0" -iA --sequencer-ports 1 +# $ xset -r && vkeybd; xset r on # -# then connect to Timidity++ with a MIDI input device, e.g.: +# Find out the port of the input MIDI device: # -# $ xset -r -# $ vkeybd --device alsa --addr 129:0 -# $ xset r on +# $ aconnect -l +# ... +# client 128: 'Virtual Keyboard' [type=user,pid=25939] +# 0 'Virtual Keyboard' # -# and have a lot of fun vocoding the crap out of your formant channel -CARRIER_TONE="alsasrc device=hw:Loopback,1,0 ! audioconvert" - +# and have a lot of fun vocoding the crap out of your formant channel. +CARRIER_TONE="alsamidisrc ports=128:0 ! fluiddec synth-gain=1 ! 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" - +#SINK="wavenc ! filesink location=audio-vocoder-test.wav" + +# Using vocoder_1337.so, in Debian it's available in the swh-plugins package. 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 \ + ladspa-vocoder-1337-so-vocoder \ number-of-bands=16 \ left-right=0 \ band-1-level=1 \