Skip to content

Instantly share code, notes, and snippets.

@hiorws
Forked from HarryUPf/README.md
Created October 2, 2019 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiorws/a7815ada2715b0bb7b01f06f83d00c91 to your computer and use it in GitHub Desktop.
Save hiorws/a7815ada2715b0bb7b01f06f83d00c91 to your computer and use it in GitHub Desktop.
Raspberry Pi SunVox Headless Synth (in 10 easy steps)

Raspberry Pi SunVox Headless Synth Setup (in 10-easy-steps)

INSTRUCTIONS

STEP_01

STEP_02

  • write the extracted .img to sdcard with Etcher

STEP_03

  • replace cdmline.txt and config.txt on sdcard boot partition in its root folder with contents from this gist

STEP_04

  • create bin folder on sdcard rootfs partition in its home/pi folder
  • create sunvox.sh in the bin folder with contents from this gist

STEP_05

  • turn-on and configure rpi
  • login:pi / password:raspberry
sudo raspi-config
  • follow on-screen instructions
3 boot options
	B1:B2
	B2:NO
4 localization options
	I1:your_locale	//en_US.UTF-8(recommended)
	I2:your_timezone
	I3:your_kb_layout
	I4:your_country
finish
reboot now?:YES

STEP_06

  • hold the realtime kernel from upgrades
sudo apt-mark hold raspberrypi-kernel
  • connect ethernet cable to install packages
  • install sunvox SDL2 dependency, jack daemon and window manager
sudo apt-get update
sudo apt-get install libsdl2-2.0-0 qjackctl xorg awesome
//enable realtime process priority?:YES
sudo apt-get clean

STEP_07

  • download and unzip sunvox
wget -c http://warmplace.ru/soft/sunvox/sunvox-1.9.4c.zip
unzip -p sunvox-1.9.4c.zip sunvox/sunvox/linux_arm_armhf_raspberry_pi/sunvox_lofi > /home/pi/bin/sunvox_lofi
chmod +x /home/pi/bin/sunvox_lofi /home/pi/bin/sunvox.sh

STEP_08

  • set jack and sunvox autostart
echo 'startx' >> /home/pi/.profile

sudo sh -c "echo 'autorun=true apps={"sunvox.sh",} if autorun then for n=1, #apps do awful.util.spawn(apps[n]) end end' >> /etc/xdg/awesome/rc.lua"

reboot

STEP_09

  • wait for sunvox to start
  • configure sunvox for headless setup. Marky Shaw's video tutorial starts at 04:08
  • check comments and modify configuration in sunvox.sh script

STEP_10

  • enjoy your rpi-sunvox-synth and consider donating to sunvox development!
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=no rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo dwc_otg.fiq_fix_enable=1 dwc_otg.speed=0 smsc95xx.turbo_mode=N consoleblank=0 quiet init=/usr/lib/raspi-config/init_resize.sh
disable_splash=1
disable_overscan=1
dtparam=audio=on
audio_pwm_mode=2
max_usb_current=0
arm_freq=1000
dtoverlay=pi3-disable-bt
dtoverlay=pi3-disable-wifi
#!/bin/bash
##reference:https://wiki.linuxaudio.org/wiki/raspberrypi
##remount /dev/shm to prevent memory allocation errors
sudo mount -o remount,size=128M /dev/shm
##disable networking
#echo -n "1-1.1:1.0" | sudo tee /sys/bus/usb/drivers/smsc95xx/unbind
#sudo service networking stop
##performance governor to reduce xruns
echo -n performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
##kill if already running
killall jackd
killall sunvox
killall sunvox_lofi
wait
##list audio ports aliases with command: jack_lsp -A
##your setup. replace with your audio interface alias and choose a frame/period: -p128 -p256 -p512
#jackd -P70 -p16 -t2000 -dalsa -dhw:_insert_alias_here_ -r44100 -p_insert_fram/period_here_ -n3 -s -Xseq &
##my setup
#jackd -P70 -p16 -t2000 -dalsa -dhw:CODEC -r44100 -p256 -n3 -s -Xseq &
##default setup
jackd -P70 -p16 -t2000 -dalsa -dhw:ALSA -r44100 -p512 -n3 -s -Xseq &
sleep 1
##choose sunvox executable (lofi recommended)
#sunvox &
sunvox_lofi &
sleep 2
##list midi ports aliases with command: jack_lsp -A
##your setup. replace with you midi devices second aliases (they don't change after reboot/unplug)
#jack_connect _insert_midi_second_alias_here SunVox:Keyboard1
#jack_connect _insert_midi_second_alias_here SunVox:Keyboard1
##my setup
#jack_connect microKEY:midi/playback_1 SunVox:Keyboard1
#jack_connect nanoKONTROL2:midi/playback_1 SunVox:Keyboard1
##default setup
jack_connect system:midi_capture_1 SunVox:Keyboard1
jack_connect system:midi_capture_2 SunVox:Keyboard1
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment