sound distortion problems - redFrik/supercolliderStandaloneRPI2 GitHub Wiki

alsa dummy driver

if you use microphone and/or experience crackle in the sound that come and go with regular intervals (~20min), you might need to use jack with the alsa dummy driver.

here is how to edit the autostart.sh file to use the dummy driver...

#!/bin/bash
/usr/bin/jackd -P75 -d dummy -C1 -P2 -p1024 -r48000 &
sleep 1
/usr/bin/alsa_in -c1 -q1 -d hw:1 &
/usr/bin/alsa_out -c2 -q1 -d hw:1 &
./sclang -a -l sclang.yaml mycode.scd

and then in supercollider one need to use jack_connect after the server is booted like this...

s.waitForBoot{
    Platform.case(\linux, {
        "jack_connect SuperCollider:in_1 alsa_in:capture_1 &".unixCmd;
        "jack_connect SuperCollider:out_1 alsa_out:playback_1 &".unixCmd;
        "jack_connect SuperCollider:out_2 alsa_out:playback_2 &".unixCmd;
    });
    {SinOsc.ar([400, 404], 0, 0.5)}.play;
};

note: on jessie-lite you might need to set different paths...

/usr/local/bin/jackd
/usr/local/bin/alsa_in
/usr/local/bin/alsa_out
/usr/local/bin/jack_connect

volume

another thing to check is if the volume is right. type alsamixer and press F6 to select soundcard. edit the speaker and capture volumes.