Skip to content

Instantly share code, notes, and snippets.

@ymauray
Last active April 23, 2020 15:00
Show Gist options
  • Save ymauray/e75a03bb5a5ff47a831dc7e0f5ea0eb4 to your computer and use it in GitHub Desktop.
Save ymauray/e75a03bb5a5ff47a831dc7e0f5ea0eb4 to your computer and use it in GitHub Desktop.
Script to start JACK, load Calf JACK Host, connect ports, wait, and kill jack.
<?xml version="1.1" encoding="utf-8"?>
<rack><plugin type="gate" instance-name="gate" input-index="1" output-index="1">
<preset bank="0" program="0" plugin="gate" name="">
<param name="bypass" value="0" />
<param name="level_in" value="1" />
<param name="meter_in" value="0.315075" />
<param name="meter_out" value="0.315075" />
<param name="clip_in" value="0" />
<param name="clip_out" value="0" />
<param name="range" value="1.5849e-05" />
<param name="threshold" value="0.0200535" />
<param name="ratio" value="2" />
<param name="attack" value="20" />
<param name="release" value="250" />
<param name="makeup" value="1" />
<param name="knee" value="2.82843" />
<param name="detection" value="0" />
<param name="stereo_link" value="0" />
<param name="gating" value="0.00358293" />
</preset>
</plugin>
<plugin type="deesser" instance-name="deesser" input-index="3" output-index="3">
<preset bank="0" program="0" plugin="deesser" name="">
<param name="bypass" value="0" />
<param name="detected" value="0.035929" />
<param name="compression" value="1" />
<param name="detected_led" value="0" />
<param name="clip_out" value="0" />
<param name="detection" value="0" />
<param name="mode" value="0" />
<param name="threshold" value="0.125" />
<param name="ratio" value="3" />
<param name="laxity" value="15" />
<param name="makeup" value="1" />
<param name="f1_freq" value="6000" />
<param name="f2_freq" value="4500" />
<param name="f1_level" value="1" />
<param name="f2_level" value="4" />
<param name="f2_q" value="1" />
<param name="sc_listen" value="0" />
</preset>
</plugin>
<plugin type="monocompressor" instance-name="monocompressor" input-index="7" output-index="7">
<preset bank="0" program="0" plugin="monocompressor" name="">
<param name="bypass" value="0" />
<param name="level_in" value="1" />
<param name="meter_in" value="0.339689" />
<param name="meter_out" value="0.448837" />
<param name="clip_in" value="0" />
<param name="clip_out" value="0" />
<param name="threshold" value="0.125" />
<param name="ratio" value="2" />
<param name="attack" value="20" />
<param name="release" value="250" />
<param name="makeup" value="2" />
<param name="knee" value="2.82843" />
<param name="compression" value="0.628456" />
<param name="mix" value="1" />
</preset>
</plugin>
<plugin type="eq8" instance-name="eq8" input-index="5" output-index="5">
<preset bank="0" program="0" plugin="eq8" name="">
<param name="bypass" value="0" />
<param name="level_in" value="1" />
<param name="level_out" value="1" />
<param name="meter_inL" value="0.448837" />
<param name="meter_inR" value="0" />
<param name="meter_outL" value="0.448837" />
<param name="meter_outR" value="0" />
<param name="clip_inL" value="0" />
<param name="clip_inR" value="0" />
<param name="clip_outL" value="0" />
<param name="clip_outR" value="0" />
<param name="hp_active" value="0" />
<param name="hp_freq" value="30" />
<param name="hp_mode" value="1" />
<param name="lp_active" value="0" />
<param name="lp_freq" value="18000" />
<param name="lp_mode" value="1" />
<param name="ls_active" value="0" />
<param name="ls_level" value="1" />
<param name="ls_freq" value="100" />
<param name="hs_active" value="0" />
<param name="hs_level" value="1" />
<param name="hs_freq" value="5000" />
<param name="p1_active" value="0" />
<param name="p1_level" value="1" />
<param name="p1_freq" value="100" />
<param name="p1_q" value="1" />
<param name="p2_active" value="0" />
<param name="p2_level" value="1" />
<param name="p2_freq" value="500" />
<param name="p2_q" value="1" />
<param name="p3_active" value="0" />
<param name="p3_level" value="1" />
<param name="p3_freq" value="2000" />
<param name="p3_q" value="1" />
<param name="p4_active" value="0" />
<param name="p4_level" value="1" />
<param name="p4_freq" value="5000" />
<param name="p4_q" value="1" />
<param name="individuals" value="1" />
<param name="zoom" value="0.25" />
<param name="analyzer" value="0" />
<param name="analyzer_mode" value="1" />
</preset>
</plugin>
</rack>
[Desktop Entry]
Name=Start JACK and Calf JACK Host
Comment=Start JACK and Calf JACK Host
GenericName=Start JACK and Calf JACK Host
Exec=/usr/local/bin/startjack.sh
Terminal=true
Type=Application
StartupNotify=true
Icon=calf
#! /bin/bash
# Start jack
/usr/bin/screen -d -m -S jack /usr/bin/pasuspender -- /usr/bin/jackd -dalsa -r44100 -p128 -n4 -D -Chw:CODEC -Phw:CODEC
# Give jack a second to load
sleep 1
# Load pulse sink and source
/usr/bin/pactl load-module module-jack-sink
/usr/bin/pactl load-module module-jack-source
# Start calfjackhost with my configuration
/usr/bin/screen -d -m -S calf /usr/bin/calfjackhost --load /mnt/data/Podcasts/calf_config.xml
# Give it a second to load
sleep 1
# Disconnect pulse source
/usr/bin/jack_disconnect system:capture_1 "PulseAudio JACK Source:front-left"
/usr/bin/jack_disconnect system:capture_2 "PulseAudio JACK Source:front-right"
# Connect ports
/usr/bin/jack_connect system:capture_1 "Calf Studio Gear:gate In #1"
/usr/bin/jack_connect "Calf Studio Gear:gate Out #1" "Calf Studio Gear:deesser In #1"
/usr/bin/jack_connect "Calf Studio Gear:deesser Out #1" "Calf Studio Gear:monocompressor In #1"
/usr/bin/jack_connect "Calf Studio Gear:monocompressor Out #1" "Calf Studio Gear:eq8 In #1"
/usr/bin/jack_connect "Calf Studio Gear:eq8 Out #1" system:playback_1
/usr/bin/jack_connect "Calf Studio Gear:eq8 Out #1" system:playback_2
/usr/bin/jack_connect "Calf Studio Gear:eq8 Out #1" "PulseAudio JACK Source:front-left"
/usr/bin/jack_connect "Calf Studio Gear:eq8 Out #1" "PulseAudio JACK Source:front-right"
# Wait for Calf JACK Host to be killed
/usr/bin/screen -r calf
# Unload pulse sink and source
/usr/bin/pactl unload-module module-jack-source
/usr/bin/pactl unload-module module-jack-sink
# Kill jack
/usr/bin/screen -X -S jack quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment