Code: Select all
# JACK vocoder script by Dan MacDonald - Nov 9 2012
#
# This script depends on you having the following installed:
#
# 1 - JACK
# 2 - Carla plugin host from falkTX's Cadence suite
# 3 - MDA vocoder plugin - LV2 or VST version
# 4 - Aspect, Noisemaker, ZynAddSubFX, Yoshimi or any other JACK synth
#
# All of the above except Aspect are included with AV Linux 6. AVL6 was the
# distro under which this script was written and its also what I'd recommend
# you run it under for the most hassle-free experience.
#
# This script is really just a template as it won't work unless you edit it as
# described in my comments and you will need to change most of the JACK port
# names if you're using a synth other than Aspect. This is easily done though,
# you just need to use the command 'jack_lsp' to view the port names of any
# active JACK apps then replace the port names as required.
#
# Creating the Carla Project File
#
# Before you can use this script, you need to create a Carla project file.
# Start Carla, click 'Add New' and add the MDA vocoder plugin. Next, click
# on the MDA vocoder plugin racks little 'Edit Parameters' spanner icon
# then in the window that appears click on the 'Parameters' tab at the bottom.
#
# If you are going to be using a mic on the capture_1 port attached to the
# right input channel of the vocoder like I have done here then you will want
# to check the 'Mod In' option is set to the left (or 0). You may also want to
# bump up the output slider and make other adjustments to what will be your
# default vocoder settings now before saving this project file as something
# like mdavoc.carxp - name it as you wish.
#
# This first line starts Carla under AV Linux 6. If you have installed Carla
# yourself under another distro and its in your path you can likely change
# '/opt/carla/carla' to just 'carla' then the path specified after that should
# point Carla to the project file we just created by giving its full path.
/opt/carla/carla /home/pfm/music-stuff/mdavoc.carxp &
# The sleep values I have defined here are about the minimum required to ensure
# this script is likely to succeed in creating the JACK connections when the
# script is run immediately after a cold boot on my 2GHz CoreDuo with a run-of-
# the-mill, mechanical (5400rpm I think) SATA HD. If you have a faster HD or a
# decent SSD then its likely you will be able to use much smaller sleep values
# such as just a 1s sleep here.
sleep 4
# Make initial vocoder connections
jack_connect system:capture_1 MDA\ Vocoder:Right\ In
jack_connect MDA\ Vocoder:Left\ Out system:playback_1
jack_connect MDA\ Vocoder:Right\ Out system:playback_2
# Run the Aspect standalone JACK client
/home/pfm/music-stuff/Aspect/Aspect &
# My crappy lappy HD needs a good 15/16 seconds at least to fully load Aspect
# If your synths loads faster of you have a faster drive, you can experiment
# with reducing this value but this should be safe enough for most I'd imagine.
sleep 16
# Disconnect Aspect's direct master output connections
jack_disconnect Aspect\ JACK:out_1 system:playback_1
jack_disconnect Aspect\ JACK:out_2 system:playback_2
# Route both channels of Aspect into the Modulation channel of the MDA vocoder
# for a more fuller sound
jack_connect Aspect\ JACK:out_1 MDA\ Vocoder:Left\ In
jack_connect Aspect\ JACK:out_2 MDA\ Vocoder:Left\ In
# After adjusting the script as required, all you will need to do in the future
# to start vocoding is start JACK then run this script. If I have my MIDI controller
# attached to my machine before starting JACK or running this script, I usually find
# it gets auto-connected to Aspect. However, if you plug your keyboard in afterwards
# then you may find all you really need to do after running this script is go to
# Options -> Audio and MIDI config then select your controller from the list of
# active MIDI inputs.