Skip to content

Instantly share code, notes, and snippets.

@madskjeldgaard
Last active August 10, 2023 01:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save madskjeldgaard/10ab025993d5b77d235819d56c4cc908 to your computer and use it in GitHub Desktop.
Save madskjeldgaard/10ab025993d5b77d235819d56c4cc908 to your computer and use it in GitHub Desktop.
Notes and scripts for headless raspbian setup for pro audio (Raspbian Lite + Raspberry Pi 4)
#!/bin/sh
# Taken from: https://github.com/lvm/build-supercollider
###
#
# Variables
#
INSTALL_DIR=/tmp
SUPERCOLLIDER_VER=3.10
SC3PLUGINS_DIR=$INSTALL_DIR/sc3-plugins
SC3PLUGINS_BUILD_DIR=$SC3PLUGINS_DIR/build
SC3_DIRECTORY=/usr/local/share/SuperCollider
SC3_EXT_DIRECTORY=/usr/local/share/SuperCollider/Extensions
###
#
# Update
#
sudo apt update
###
#
# Install building dependencies
#
sudo apt install -yq \
build-essential pkg-config cmake subversion git \
libjack-jackd2-dev libudev-dev libsndfile1-dev libasound2-dev \
libavahi-client-dev libicu-dev libreadline6-dev libfftw3-dev \
libxt-dev libcwiid-dev libqt5webkit5-dev libqt5sensors5-dev \
qt5-default qt5-qmake qttools5-dev qttools5-dev-tools \
qtdeclarative5-dev qtpositioning5-dev
###
#
# Download and build SC
#
mkdir -p $SC3PLUGINS_DIR
# Download SC3 Plugins Source
git clone --recursive --branch $SUPERCOLLIDER_VER \
https://github.com/supercollider/sc3-plugins.git $SC3PLUGINS_DIR
# Create the the directory where SC3 Plugins will be built
mkdir -p $SC3PLUGINS_BUILD_DIR
sudo mkdir -p $SC3_EXT_DIRECTORY
# And build it.
cd $SC3PLUGINS_BUILD_DIR && \
cmake -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/ \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DSC_PATH=/tmp/supercollider/ \
-DBUILD_TESTING=OFF -DQUARKS=ON -DSUPERNOVA=ON .. && \
make -j4 && \
sudo make install && \
sudo ldconfig && \
sudo mv $SC3_DIRECTORY/SC3plugins $SC3_EXT_DIRECTORY/SC3plugins
#!/bin/sh
# Modified version of this script: https://github.com/lvm/build-supercollider
# Inspired by this: https://github.com/supercollider/supercollider/blob/develop/README_RASPBERRY_PI.md
###
#
# Variables
#
INSTALL_DIR=/tmp
SUPERCOLLIDER_VER=3.11
SUPERCOLLIDER_DIR=$INSTALL_DIR/supercollider
SUPERCOLLIDER_BUILD_DIR=$SUPERCOLLIDER_DIR/build
###
#
# Update
#
sudo apt update
###
#
# Install building dependencies
#
sudo apt-get install libsamplerate0-dev libsndfile1-dev libasound2-dev libavahi-client-dev \
libreadline-dev libfftw3-dev libudev-dev cmake git libjack-jackd2-dev
###
#
# Download and build SC
#
mkdir -p $SUPERCOLLIDER_DIR
# Download SC Source
git clone --recursive --branch $SUPERCOLLIDER_VER \
https://github.com/supercollider/supercollider.git $SUPERCOLLIDER_DIR
# Create the the directory where SC will be built
mkdir -p $SUPERCOLLIDER_BUILD_DIR
# And build it.
cd $SUPERCOLLIDER_BUILD_DIR && \
# For a GUI-less build:
cmake -DCMAKE_BUILD_TYPE=Release -DSUPERNOVA=OFF -DSC_ED=OFF -DSC_EL=OFF -DSC_VIM=ON -DNATIVE=ON \
-DSC_IDE=OFF -DNO_X11=ON -DSC_QT=OFF ..
make -j4 && \
sudo make install && \
sudo ldconfig
@daveriedstra
Copy link

A couple quick notes from having run this on my 3B just now:

  • github changed some auth policy and now prevents cloning git:// URLs unauthenticated; this affects submodules in supercollider versions before 3.12.2 (more info, tldr: ppl should use the 3.12 branch, which has the fix)
  • my Pi has only 1 Gb of RAM and the default 100Mb swap was not enough to compile sc; bumping it up to 512Mb worked (here's a guide for wayward travellers)

@madskjeldgaard
Copy link
Author

A couple quick notes from having run this on my 3B just now:

  • github changed some auth policy and now prevents cloning git:// URLs unauthenticated; this affects submodules in supercollider versions before 3.12.2 (more info, tldr: ppl should use the 3.12 branch, which has the fix)
  • my Pi has only 1 Gb of RAM and the default 100Mb swap was not enough to compile sc; bumping it up to 512Mb worked (here's a guide for wayward travellers)

Thanks Dave!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment