|
| 1 | +#!/bin/bash |
| 2 | +# --------------------------- |
| 3 | +# This is a bash script for configuring Debian 13 (trixie) for pro audio USING PIPEWIRE. |
| 4 | +# --------------------------- |
| 5 | +# NOTE: Execute this script by running the following command on your system: |
| 6 | +# wget -O ~/install-audio.sh https://raw.githubusercontent.com/brendaningram/linux-audio-setup-scripts/main/debian/13/install-audio.sh && chmod +x ~/install-audio.sh && ~/install-audio.sh |
| 7 | + |
| 8 | +# Exit if any command fails |
| 9 | +set -e |
| 10 | + |
| 11 | +notify () { |
| 12 | + echo "--------------------------------------------------------------------" |
| 13 | + echo $1 |
| 14 | + echo "--------------------------------------------------------------------" |
| 15 | +} |
| 16 | + |
| 17 | + |
| 18 | +# --------------------------- |
| 19 | +# Update our system |
| 20 | +# --------------------------- |
| 21 | +notify "Update the system" |
| 22 | +sudo apt modernize-sources -y |
| 23 | +sudo apt update && sudo apt upgrade -y |
| 24 | + |
| 25 | + |
| 26 | +# --------------------------- |
| 27 | +# Install Liquorix kernel |
| 28 | +# https://liquorix.net/ |
| 29 | +# --------------------------- |
| 30 | +sudo apt install curl -y |
| 31 | +curl 'https://liquorix.net/add-liquorix-repo.sh' | sudo bash |
| 32 | +sudo apt install linux-image-liquorix-amd64 linux-headers-liquorix-amd64 -y |
| 33 | + |
| 34 | + |
| 35 | +# --------------------------- |
| 36 | +# Pipewire |
| 37 | +# https://wiki.debian.org/PipeWire |
| 38 | +# NOTE: If you don't have any audio coming from your system, it is possible that the hardware |
| 39 | +# channels in your audio interface are muted. In that case, run alsamixer, press F6 to select |
| 40 | +# your audio interface, locate your main monitor channel, then press M to unmute. |
| 41 | +# You can then run sudo alsactl store to persist these changes. |
| 42 | +# --------------------------- |
| 43 | +notify "Install pipewire" |
| 44 | +sudo apt install pipewire-alsa pipewire-audio pipewire-audio-client-libraries pipewire-jack libspa-0.2-jack -y |
| 45 | + |
| 46 | +# Tell all apps that use JACK to now use the Pipewire JACK |
| 47 | +sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/ |
| 48 | +sudo ldconfig |
| 49 | + |
| 50 | +#sudo apt install qjackctl --no-install-recommends -y |
| 51 | + |
| 52 | + |
| 53 | +# --------------------------- |
| 54 | +# grub |
| 55 | +# --------------------------- |
| 56 | +notify "Modify GRUB options" |
| 57 | +sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet threadirqs cpufreq.default_governor=performance"/g' /etc/default/grub |
| 58 | +sudo update-grub |
| 59 | + |
| 60 | + |
| 61 | +# --------------------------- |
| 62 | +# limits |
| 63 | +# See https://wiki.linuxaudio.org/wiki/system_configuration for more information. |
| 64 | +# --------------------------- |
| 65 | +notify "Modify limits.d/audio.conf" |
| 66 | +echo '@pipewire - rtprio 90 |
| 67 | +@pipewire - memlock unlimited' | sudo tee -a /etc/security/limits.d/audio.conf |
| 68 | + |
| 69 | + |
| 70 | +# --------------------------- |
| 71 | +# sysctl.conf |
| 72 | +# See https://wiki.linuxaudio.org/wiki/system_configuration for more information. |
| 73 | +# --------------------------- |
| 74 | +notify "Modify /etc/sysctl.conf" |
| 75 | +echo 'vm.swappiness=10 |
| 76 | +fs.inotify.max_user_watches=600000' | sudo tee -a /etc/sysctl.conf |
| 77 | + |
| 78 | + |
| 79 | +# --------------------------- |
| 80 | +# Add the user to the pipewire group |
| 81 | +# --------------------------- |
| 82 | +notify "Add ourselves to the pipewire group" |
| 83 | +sudo usermod -a -G pipewire $USER |
| 84 | + |
| 85 | + |
| 86 | +# --------------------------- |
| 87 | +# REAPER |
| 88 | +# Note: The instructions below will create a PORTABLE REAPER installation |
| 89 | +# at ~/REAPER. |
| 90 | +# --------------------------- |
| 91 | +notify "REAPER" |
| 92 | +wget -O reaper.tar.xz http://reaper.fm/files/7.x/reaper735_linux_x86_64.tar.xz |
| 93 | +mkdir ./reaper |
| 94 | +tar -C ./reaper -xf reaper.tar.xz |
| 95 | +./reaper/reaper_linux_x86_64/install-reaper.sh --install ~/ --integrate-desktop |
| 96 | +rm -rf ./reaper |
| 97 | +rm reaper.tar.xz |
| 98 | +touch ~/REAPER/reaper.ini |
| 99 | + |
| 100 | + |
| 101 | +# --------------------------- |
| 102 | +# Wine (staging) |
| 103 | +# This is required for yabridge |
| 104 | +# See https://wiki.winehq.org/Debian for additional information. |
| 105 | +# --------------------------- |
| 106 | +notify "Install Wine" |
| 107 | +sudo dpkg --add-architecture i386 |
| 108 | +sudo mkdir -pm755 /etc/apt/keyrings |
| 109 | +wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - |
| 110 | +sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/trixie/winehq-trixie.sources |
| 111 | +sudo apt update |
| 112 | +sudo apt install --install-recommends --allow-change-held-packages winehq-staging=9.21~trixie-1 wine-staging=9.21~trixie-1 wine-staging-amd64=9.21~trixie-1 wine-staging-i386=9.21~trixie-1 --allow-downgrades -y |
| 113 | +sudo apt-mark hold winehq-staging wine-staging wine-staging-i386 wine-staging-amd64 |
| 114 | + |
| 115 | +# Winetricks |
| 116 | +sudo apt install cabextract -y |
| 117 | +mkdir -p ~/.local/share |
| 118 | +wget -O winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks |
| 119 | +mv winetricks ~/.local/share |
| 120 | +chmod +x ~/.local/share/winetricks |
| 121 | +echo '' >> ~/.bash_aliases |
| 122 | +echo '# Audio: winetricks' >> ~/.bash_aliases |
| 123 | +echo 'export PATH="$PATH:$HOME/.local/share"' >> ~/.bash_aliases |
| 124 | +. ~/.bash_aliases |
| 125 | + |
| 126 | +# Base wine packages required for proper plugin functionality |
| 127 | +winetricks corefonts |
| 128 | + |
| 129 | +# Make a copy of .wine, as we will use this in the future as the base of |
| 130 | +# new wine prefixes (when installing plugins) |
| 131 | +cp -r ~/.wine ~/.wine-base |
| 132 | + |
| 133 | + |
| 134 | +# --------------------------- |
| 135 | +# Yabridge |
| 136 | +# Detailed instructions can be found at: https://github.com/robbert-vdh/yabridge/blob/master/README.md |
| 137 | +# --------------------------- |
| 138 | +# NOTE: When you run this script, there may be a newer version of yabridge available. |
| 139 | +# Check https://github.com/robbert-vdh/yabridge/releases and update the version numbers below if necessary |
| 140 | +notify "Install yabridge" |
| 141 | +wget -O yabridge.tar.gz https://github.com/robbert-vdh/yabridge/releases/download/5.1.1/yabridge-5.1.1.tar.gz |
| 142 | +mkdir -p ~/.local/share |
| 143 | +tar -C ~/.local/share -xavf yabridge.tar.gz |
| 144 | +rm yabridge.tar.gz |
| 145 | +echo '' >> ~/.bash_aliases |
| 146 | +echo '# Audio: yabridge path' >> ~/.bash_aliases |
| 147 | +echo 'export PATH="$PATH:$HOME/.local/share/yabridge"' >> ~/.bash_aliases |
| 148 | +. ~/.bash_aliases |
| 149 | + |
| 150 | +# libnotify-bin contains notify-send, which is used for yabridge plugin notifications. |
| 151 | +sudo apt install libnotify-bin -y |
| 152 | + |
| 153 | +# Create common VST paths |
| 154 | +mkdir -p "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins" |
| 155 | +mkdir -p "$HOME/.wine/drive_c/Program Files/Common Files/VST2" |
| 156 | +mkdir -p "$HOME/.wine/drive_c/Program Files/Common Files/VST3" |
| 157 | + |
| 158 | +# Add them into yabridge |
| 159 | +yabridgectl add "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins" |
| 160 | +yabridgectl add "$HOME/.wine/drive_c/Program Files/Common Files/VST2" |
| 161 | +yabridgectl add "$HOME/.wine/drive_c/Program Files/Common Files/VST3" |
| 162 | + |
| 163 | +# --------------------------- |
| 164 | +# Install Windows VST plugins |
| 165 | +# This is a manual step for you to run when you download plugins. |
| 166 | +# First, run the plugin installer .exe file |
| 167 | +# When the installer asks for a directory, make sure you select |
| 168 | +# one of the directories above. |
| 169 | + |
| 170 | +# VST2 plugins: |
| 171 | +# C:\Program Files\Steinberg\VstPlugins |
| 172 | +# OR |
| 173 | +# C:\Program Files\Common Files\VST2 |
| 174 | + |
| 175 | +# VST3 plugins: |
| 176 | +# C:\Program Files\Common Files\VST3 |
| 177 | +# --------------------------- |
| 178 | + |
| 179 | +# Each time you install a new plugin, you need to run: |
| 180 | +# yabridgectl sync |
| 181 | + |
| 182 | +# --------------------------- |
| 183 | +# FINISHED! |
| 184 | +# Now just reboot, and make music! |
| 185 | +# --------------------------- |
| 186 | +notify "Done - please reboot." |
| 187 | + |
0 commit comments