Git Product home page Git Product logo

supercolliderstandalonerpi2's Introduction

supercolliderStandaloneRPI2

Standalone for Raspberry Pi 2 and 3 including the full IDE

This is the audio synthesis program SuperCollider version 3.13.0 (branch main, commit 3188503, 19feb2023) + sc3-plugins (branch main, commit cd37e2f, 24jan2023) compiled for Raspberry Pi 2 and Raspberry Pi 3 (and likely Raspberry Pi 4 but this is untested).

The standalone was built on a RPi 3B using this guide and tested to run under Raspberry Pi OS 32-bit with desktop (2022-09-22-raspios-bullseye-armhf) and Lite (2022-09-22-raspios-bullseye-armhf-lite).

For 32-bit Legacy (raspios buster, desktop and Lite) download the previous release sc3.12.0 and follow the instructions in that README instead.

For 64-bit (RPi4, Zero2...) use this repository.

For Raspberry Pi 1 and Raspberry Pi Zero use this repository.

A quick (4:33) screencast showing the installation in realtime can be seen here... https://vimeo.com/397466041

Note since SuperCollider version 3.10 the ScIDE needs to be built without qt-webengine (-DSC_USE_QTWEBENGINE:BOOL=OFF) and that means that the built-in help system is not available for this standalone. You can browse help files at doc.sccode.org until this is resolved.

This standalone is self-contained and all files are in one directory (except for the sc_ide_conf.yaml file - see below). It can coexist with other programs using scsynth like Sonic Pi and can even run simultaneously (as long as Sonic Pi is started first).

installation

(this assumes you have done all the usual initialisation... burned the disk image, booted, changed password, optionally enabled ssh)

open the terminal on the RPi and type...

  • sudo apt-get update
  • sudo apt-get install qjackctl
  • git clone https://github.com/redFrik/supercolliderStandaloneRPI2 --depth 1
  • mkdir -p ~/.config/SuperCollider
  • cp supercolliderStandaloneRPI2/sc_ide_conf_temp.yaml ~/.config/SuperCollider/sc_ide_conf.yaml

NOTE: Double check the name in the last cp command. The resulting file must be called sc_ide_conf.yaml

This last cp command will create a global sc_ide preference file from a template. At the moment SuperCollider IDE can not use a local configuration file, but hopefully, this will change in the future. Also, note that if you cloned or moved this repository somewhere else than in your home directory you should edit the yaml file to make the paths in there point to your standalone directory.

IMPORTANT: If you have set another user name than pi, edit the two files SuperColliderIDE.desktop and sc_ide_conf.yaml to match your username.

  • nano ~/supercolliderStandaloneRPI2/SuperColliderIDE.desktop
  • nano ~/.config/SuperCollider/sc_ide_conf.yaml

startup

To run the full IDE first open a terminal window and type...

  • qjackctl

Select the correct soundcard (under setup/interfaces) and then start jackd. (if USB soundcard is used also set periods to 3)

Then open another terminal window and type...

  • cd supercolliderStandaloneRPI2
  • export PATH=.:$PATH
  • scide

or simply just double click the desktop icon. SuperCollider IDE should start and run like normal - with scope, meter, plot, GUI, animation, quarks etc.

The startup file is located in the subdirectory share/user/ and extensions you can put in share/user/Extensions/ (first create that directory if it does not exist).

KNOWN ISSUES:

  • 'libEGL warning: DRI2: failed to authenticate' that is posted in the terminal at ScIDE startup is harmless
  • 'Open startup file' and 'Open user support directory' menu selections do not open the right file/folder.

jack

If you start SuperCollider without having Jack already running (like when autostarting or running headless), Jack will automatically launch when you boot the server. The audio settings then used are found in the file...

  • nano ~/.jackdrc

(this file is created by qjackctl so if you never ran qjackctl you might need to create this file manually.)

The recommended jack audio settings are...

  • /usr/bin/jackd -P75 -dalsa -dhw:0 -p1024 -n3 -s -r44100

and to set up Jack to use an external USB sound card change -dhw:0 to -dhw:1 like this...

  • /usr/bin/jackd -P75 -dalsa -dhw:1 -p1024 -n3 -s -r44100

NOTE: the internal soundcard volume is by default set low (40). type alsamixer in terminal and adjust the PCM volume to 85 with the arrow keys, ESC key exits.

autostart

  • crontab -e #and add the following line to the end
    • @reboot cd /home/pi/supercolliderStandaloneRPI2 && ./autostart.sh
  • sudo reboot #and supercollider should automatically start after a while and play some beating sine tones.

Then edit the autostart script to load whichever file. By default, it will load mycode.scd.

headless

To run sclang+scsynth only from ssh...

  • export QT_QPA_PLATFORM=offscreen
  • cd supercolliderStandaloneRPI2
  • ./sclang -a -l ~/supercolliderStandaloneRPI2/sclang.yaml

NOTE: one can also specify a .scd file to load when starting sclang like this: ./sclang -a -l ~/supercolliderStandaloneRPI2/sclang.yaml mycode.scd


Lite

The standalone also works under Raspberry Pi OS Lite but the installation process is a little bit different...

installation:

  • sudo apt-get update
  • sudo apt-get install libqt5network5 libqt5printsupport5 git libasound2-dev libsamplerate0-dev libsndfile1-dev
  • sudo apt remove '*jack*'
  • git clone --branch master --single-branch https://github.com/jackaudio/jack2.git
  • cd jack2
  • ./waf configure --alsa
  • ./waf build
  • sudo ./waf install
  • sudo ldconfig
  • cd ..
  • rm -rf jack2
  • sudo sh -c "echo @audio - memlock 256000 >> /etc/security/limits.conf"
  • sudo sh -c "echo @audio - rtprio 75 >> /etc/security/limits.conf"
  • echo /usr/local/bin/jackd -P75 -p16 -dalsa -dhw:0 -r44100 -p1024 -n3 > ~/.jackdrc #use -dhw:1 for USB soundcard
  • cd ~; git clone https://github.com/redFrik/supercolliderStandaloneRPI2 --depth 1
  • sudo reboot

startup:

  • export QT_QPA_PLATFORM=offscreen
  • cd supercolliderStandaloneRPI2
  • ./sclang -a -l ~/supercolliderStandaloneRPI2/sclang.yaml

supercolliderstandalonerpi2's People

Contributors

redfrik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

supercolliderstandalonerpi2's Issues

Interpreter Inactive

Running on a Raspberry Pi 3

Running scide in the terminal, the error I get:

scide warning: Failed to load fallback translation file

In the ide I get: Interpreter has quit. [Exit code: 0]

Attempting to rerun headless, the server is able to run, qjack shows connection, but no audio.

Any tips?

Raspbian Buster Lite: libQt5OpenGL.so.5: cannot open shared object file: No such file or directory

Hey Fredrik!

I just tried following your instructions to build this standalone under the most recent version of raspbian, 2019-07-10-raspbian-buster-lite.zip, and have run across a missing file issue that prevents SC from starting. When I tried to run SC with xvfb-run --auto-servernum ./sclang -a -l ~/supercolliderStandaloneRPI2/sclang.yaml I got the following error:

./sclang: error while loading shared libraries: libQt5OpenGL.so.5: cannot open shared object file: No such file or directory

I am afraid I do not have time at the moment to research this more thoroughly, as I need to roll back to a version of raspbian that I know works with this standalone in order to finish prepping for a workshop I have to run this week, but wanted to let you know about this in the meantime.

I do see some discussion of this particular missing file/library being an issue in Debian Buster generally...if I have some time over the weekend I will poke around and see if I can find a simple fix.

Automatic start does not work on a new machine after cloning the system on a working device.

Dear redFrik,

I installed supercolliderStandaloneRPI2 on my Raspberry Pi 4B. It works very well.
Today I cloned the system SD card using "SD Card Copier" on the Raspberry Pi 4B.
Then, I booted a Raspberry Pi 3B+ using a cloned SD card.
I can run python, SuperCollider and Jack.
I can execute the following one-line command in a terminal window, which comes in the last line opened by typing "crontab -e" in a terminal window.
cd /home/pi/supercolliderStandaloneRPI2 && ./autostart.sh

However, this line is not executed on Raspberry Pi 3B+ when booting Raspberry Pi 3B+.

Using the same method, I copied the system from a Raspberry Pi 4B to another Raspberry 4B. Again, it worked well, and the command in "crontab -e" works well.

Why does it not automatically work when booting on Raspberry 3B+?
Is there a resolution to resolve the problem?
Thank you very much for your help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.