Skip to content

Instantly share code, notes, and snippets.

@mmstick
Last active August 1, 2023 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmstick/460049dbc746660f6ce6275087a837a3 to your computer and use it in GitHub Desktop.
Save mmstick/460049dbc746660f6ce6275087a837a3 to your computer and use it in GitHub Desktop.
SOFA Spatializer Installer
#!/bin/bash
GREEN='\e[32m'
RESET='\e[0m'
FILTER_CHAIN_DIR="${HOME}/.config/pipewire/filter-chain.conf.d"
FILTER_CONFIG='https://gist.githubusercontent.com/mmstick/039422a63c73a09e998d08608abaee43/raw/9c4dfef5a447fe25a47e3492e518e134e57ee9d4/7.1-spatializer.conf'
SOFA_RESOURCES='/usr/share/pipewire/sofa'
SOFA_INPUT='https://sofacoustics.org/data/database_sofa_0.6/ari/dtf%20b_nh724.sofa'
echo -e "${GREEN}1/3: Requesting permission to install resources to ${SOFA_RESOURCES}${RESET}"
sudo mkdir -p ${SOFA_RESOURCES}
sudo curl --proto '=https' --tlsv1.2 -o ${SOFA_RESOURCES}/dtf.sofa ${SOFA_INPUT}
echo -e "${GREEN}2/3: Downloading spatialization configuration to ${FILTER_CHAIN_DIR}${RESET}"
mkdir -p ${FILTER_CHAIN_DIR}
curl --proto '=https' --tlsv1.2 -o ${FILTER_CHAIN_DIR}/spatializer.conf ${FILTER_CONFIG}
echo -e "${GREEN}3/3: Finished. Activate by running 'pipewire -c filter-chain.conf' while using headphones.${RESET}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment