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.

Revisions

  1. mmstick revised this gist Aug 1, 2023. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions sofa-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,17 @@
    #!/bin/bash
    set -ex
    GREEN='\033[0;32m'
    RESET='\033[0m'
    GREEN='\e[32m'
    RESET='\e[0m'
    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 "${GREEN}1/3: Requesting permission to install resources to ${SOFA_RESOURCES}${RESET}"
    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 "${GREEN}2/3: Downloading spatialization configuration to ${FILTER_CHAIN_DIR}${RESET}"
    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 "${GREEN}3/3: Finished. Activate by running 'pipewire -c filter-chain.conf' while using headphones.${RESET}"
    echo -e "${GREEN}3/3: Finished. Activate by running 'pipewire -c filter-chain.conf' while using headphones.${RESET}"
  2. mmstick revised this gist Aug 1, 2023. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions sofa-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,18 @@
    #!/bin/bash
    set -ex
    GREEN='\033[0;32m'
    RESET='\033[0m'
    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}"
    echo "${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 "2/3: Downloading spatialization configuration to ${FILTER_CHAIN_DIR}"
    echo "${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 '3/3: Finished. Activate by running "pipewire -c filter-chain.conf" while using headphones.'
    echo "${GREEN}3/3: Finished. Activate by running 'pipewire -c filter-chain.conf' while using headphones.${RESET}"
  3. mmstick revised this gist Aug 1, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion sofa-install.sh
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ 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."
    echo '3/3: Finished. Activate by running "pipewire -c filter-chain.conf" while using headphones.'
  4. mmstick revised this gist Aug 1, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions sofa-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    #!/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'
  5. mmstick revised this gist Aug 1, 2023. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions sofa-install.sh
    Original file line number Diff line number Diff line change
    @@ -6,10 +6,10 @@ SOFA_INPUT='https://sofacoustics.org/data/database_sofa_0.6/ari/dtf%20b_nh724.so

    echo "1/3: Requesting permission to install resources to ${SOFA_RESOURCES}"
    sudo mkdir -p ${SOFA_RESOURCES}
    sudo curl -o ${SOFA_RESOURCES}/dtf.sofa ${SOFA_INPUT}
    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 -o ${FILTER_CHAIN_DIR}/spatializer.conf ${CONFIG}
    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.
    echo "3/3: Finished. Run `pipewire -c filter-chain.conf` in a terminal to activate spatializer."
  6. mmstick created this gist Aug 1, 2023.
    15 changes: 15 additions & 0 deletions sofa-install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash
    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 -o ${SOFA_RESOURCES}/dtf.sofa ${SOFA_INPUT}

    echo "2/3: Downloading spatialization configuration to ${FILTER_CHAIN_DIR}"
    mkdir -p ${FILTER_CHAIN_DIR}
    curl -o ${FILTER_CHAIN_DIR}/spatializer.conf ${CONFIG}

    echo "3/3: Finished. Run `pipewire -c filter-chain.conf` in a terminal to activate spatializer.