-
Notifications
You must be signed in to change notification settings - Fork 1
/
start-sc
54 lines (39 loc) · 2.05 KB
/
start-sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# script based on http://wiki.linuxaudio.org/wiki/raspberrypi
# Stop the ntp service
sudo service ntp stop
## Stop the triggerhappy service
sudo service triggerhappy stop
## Stop the dbus service. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
sudo service dbus stop
## Stop the console-kit-daemon service. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
sudo killall console-kit-daemon
## Stop the polkitd service. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
sudo killall polkitd
## Only needed when Jack2 is compiled with D-Bus support (Jack2 in the AutoStatic RPi audio repo is compiled without D-Bus support)
#export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
## Remount /dev/shm to prevent memory allocation errors
sudo mount -o remount,size=128M /dev/shm
## Kill the usespace gnome virtual filesystem daemon. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
killall gvfsd
## Kill the userspace D-Bus daemon. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
killall dbus-daemon
## Kill the userspace dbus-launch daemon. Warning: this can cause unpredictable behaviour when running a desktop environment on the RPi
killall dbus-launch
## Uncomment if you'd like to disable the network adapter completely
#echo -n “1-1.1:1.0” | sudo tee /sys/bus/usb/drivers/smsc95xx/unbind
## Set the CPU scaling governor to performance
echo -n performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sleep 1
# start jack in dummy mode
jackd -P80 -m -p 32 -d dummy -p 256 -r48000 &
sleep 1
# start alsa_out with quality 1, dump error messages and standart output (2>&1 > /dev/null)
alsa_out -q1 -p256 2>&1 > /dev/null &
sleep 1
# start scsynth
scsynth -u 57110 &
sleep 2
# connect SC outs to jack
jack_connect SuperCollider:out_1 alsa_out:playback_1 &
jack_connect SuperCollider:out_2 alsa_out:playback_2 &