Skip to content

Instantly share code, notes, and snippets.

@mmstick
Last active August 1, 2023 13:08
Show Gist options
  • 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
set -ex
FILTER_CHAIN_DIR="${HOME}/.config/pipewire/filter-chain.conf.d"
FILTER_CONFIG='https://gist.github.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 "1/3: Requesting permission to install resources to ${SOFA_RESOURCES}"
sudo mkdir -p ${SOFA_RESOURCES}
sudo curl --proto '=https' --tlsv1.2 -o ${SOFA_RESOURCES}/dtf.sofa ${SOFA_INPUT}
echo "2/3: Downloading spatialization configuration to ${FILTER_CHAIN_DIR}"
mkdir -p ${FILTER_CHAIN_DIR}
curl --proto '=https' --tlsv1.2 -o ${FILTER_CHAIN_DIR}/spatializer.conf ${FILTER_CONFIG}
echo "3/3: Finished. Run `pipewire -c filter-chain.conf` in a terminal to activate spatializer."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment