作者:渭南电信贺平 | 来源:互联网 | 2023-08-16 16:52
本文由编程笔记#小编为大家整理,主要介绍了text 如何为ubuntu 17.xx构建sonic pi 3相关的知识,希望对你有一定的参考价值。
#Install SP3 on fresh Ubuntu 17.04 or 17.10
#(also much the same for Debian 9.1 and even Pi3 o Stretch))
#install following with sudo apt-get install (a couple may be there already)
sudo apt-get install git libasound2-dev libx11-dev build-essential cmake libsndfile1 libsndfile1-dev erlang-base ruby ruby-dev qt5-qmake libqwt-qt5-6 libqwt-qt5-dev qttools5-dev-tools libqt5svg5-dev libqt5svg5 qtbase5-dev libqt5scintilla2-l10n libqt5scintilla2-dev libboost-dev supercollider-server sc3-plugins
#now install three downloads that need to be built (including Sonic PI!)
cd ~
git clone https://github.com/samaaron/sonic-pi.git
git clone https://git.aubio.org/aubio/aubio
git clone https://github.com/llloret/osmid.git
#set the sonic-pi "head" to the latest release
cd sonic-pi
git checkout 98914aaac061c1e7d6216b2a1065f49cb9733d9c #latest commit for version 3.0.1
#build osmid binaries m2o and o2m
cd ~
cd osmid
mkdir build
cd build
cmake ..
make
cd ~ #we will install them later
#build and install aubio
cd aubio
./scripts/get_waf.sh
./waf configure
./waf build
sudo ./waf install
cd ~
#build two erlang .erl files to their equivalent .beam files
cd sonic-pi/app/server/erlang
erlc osc.erl
erlc pi_server.erl
#build the native ruby extensions to some Sonic Pi gems
cd ~
cd sonic-pi/app/server/ruby/bin
./compile-extensions.rb
#create the receiving folder and copy in the osmid binaries
cd ~
cd sonic-pi/app/server/native
mkdir -p linux/osmid
cd linux/osmid
cp ~/osmid/build/m2o ./
cp ~/osmid/build/o2m ./
#switch to the qt folder in Sonic Pi to build the docs and gui
cd ~/sonic-pi/app/gui/qt
../../server/ruby/bin/i18n-tool.rb -t
cp -f ruby_help.tmpl ruby_help.h
../../server/ruby/bin/qt-doc.rb -o ruby_help.h
export QT_SELECT=qt5 #select qt version to use
lrelease SonicPi.pro
qmake SonicPi.pro
make #this will take some time
#for jackd to work properly you must add YOUR username to the audio group
#substitute YOUR username for rbn below
sudo usermod -a -G audio rbn #to allow user to access jackd with rt privileges
#switch back to home folder and run Sonic Pi 3
cd ~
./sonic-pi/bin/sonic-pi
#(ctrl-C to quit)
#remaining problems. At present the two osmid binaries are not stopped on exit
#you must manually killall m2o and killall o2m before re-running.
#worth checking killall ruby and killall sonic-pi
#Sonic Pi will take the default sound card in slot 0.
#To use a different card start jackd with qjackctl (in the GUI) and configure it there.
#Also I found an error in scsynthexternal.rb
#Alter the scsynth connection commands in lines 386 and 387
# `jack_connect SuperCollider:in_1 system_capture_1`
# `jack_connect SuperCollider:in_2 system_capture_2`
#to read
# `jack_connect SuperCollider:in_1 system:capture_1`
# `jack_connect SuperCollider:in_2 system:capture_2`