Building Csound on Ubuntu
|Line 1:||Line 1:|
These are the steps
These are the steps take for installing the most recent Csound from GIT (using command: git clone git://csound.git.sourceforge.net/gitroot/csound/csound5) in (K)(X)Ubuntu. After downloading the source package from GIT, these are the steps to take to build the latest version of Csound .
== What packages are needed? ==
== What packages are needed? ==
Revision as of 19:39, 29 February 2012
These are the steps to take for installing the most recent Csound from GIT (using command: git clone git://csound.git.sourceforge.net/gitroot/csound/csound5) in (K)(X)Ubuntu. After downloading the source package from GIT, these are the steps to take to build the latest version of Csound on Ubuntu. Note:The GIT version of Csound still may contain some bugs.
What packages are needed?
install scons install libsndfile AND libsnd-dev. The manual says libdsndfile but look for libsndfile i have python2.6 and -dev installed, for Ubuntu 11.10 python2.7 and -dev portaudio19 and portaudio19-dev portmidi and portmidi-dev. For Suse i did not see Portmidi, i'm depending on Alsa midi for that alsa-source libpng12-dev FLTK1.1 and FLTK1.1.dev libfftw3-dev (for Loris) swig libfluidsynth1 and libfluidsynth-devitem liblo0-dev for completeness-sake (i do not need OSC atm) libasound2-dev DSSI and DSSI-dev flex and bison for building with the new parser libboost1.40-dev and libgmm++-dev for installation of Chuap, CsoundAC and the Linear Algebra Opcodes
Note: all the packages above are installed via Synaptic; that will take care of all other dependencies.
These packages are now on the system, but for some extras every time you are rebuilding the latest version, you can take the following steps:
The extra goodies
- if you want the STK opcodes included:
https://ccrma.stanford.edu/software/stk/download.html and download Version 4.4.2. Copy "include", "rawwaves" and "src" with all its contents and paste them in Csound5/Opcodes/stk
- MP3 support:
Download mpadec (version beta) http://mpadec.cvs.sourceforge.net/viewvc/mpadec/ (cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/mpadec co -P mpadec) "make" to compile and do a MANUAL install: sudo cp ./include/mp3dec.h ./include/mpadec.h /usr/include AND sudo cp ./libmpadec/libmpadec.a ./libmpadec/libmpadec.so /usr/lib
- if you want Loris opcodes:
go to http://sourceforge.net/projects/loris/files/ and get Loris version 1.8. install Loris with this option: sh ./configure "CPPFLAGS=-I/usr/local/include/csound -DUSE_DOUBLE" It will create the Csound Loris opcodes (along with Loris itself), here for double precision. When you run Csound use an additional command line flag: --opcode-lib=/usr/local/lib/libloris.so
Another method described by Tito Latini:
remove the old plugin install Loris as mentioned above but without csound copy or link these directories from loris-1.8 source dir to Opcodes/Loris in the Csound5 directory: csound, src, scripting recompile csound (buildLoris=1)
For more information on the installation of Loris 1.8 have a look at: http://www.csounds.com/node/1380
- there are "unofficial" opcode files that did not make it to the standard Csound (yet). They can be downloaded from http://noisesmith-linux-audio.googlecode.com/svn-history/r114/trunk/csou... . These opcodes are produced:
linuxjoystick imageblit, imagecreate, imagegain and imagediv.
The files imagemanip.c and imagemanip.h along with linuxjoystick.c and linuxjoystick.h must be copied to the Opcodes folder of Csound before building. Also add these two line in the SConstruct file of Csound, for example as line 1600:
makePlugin(pluginEnvironment, 'linuxjoystick', ['Opcodes/linuxjoystick.c']) makePlugin(pluginEnvironment, 'imagemanip', ['Opcodes/imagemanip.c'])
A modified linuxjoystick opcode can be downloaded here: http://members.home.nl/mag.knevel/joystick_opcode. The examples are a bit modified too.
- custom-linux-jpff.py is the script i use to handle nonstandard options for third-party dependencies, so rename custom-linux-jpff.py -> custom.py
- optional: I am a blue user (http://sourceforge.net/projects/bluemusic/), a great compositional program for Csound, but to take full advantage of the API i had to build Csound with the scons option buildJavaWrapper=1 if you prefer java-sun: change something in the SConstruct file (line 799). It was looking for an older Java file, while i have 18.104.22.168. The line should be: for i in ['java', 'jvm/java', 'jvm/java-6-sun-22.214.171.124']: OR, if you use OpenJDK you can change the line 24 in the file custom.py (previously custom-linux-jpff.py) to: customCPPPATH.append('/usr/lib/jvm/java-6-openjdk/include') Probably you will need to install openjdk-6-jdk (=dev) too.
I want to install the Double Precision Version, so i am running scons in the csound5 directory with useDouble=1 and other options: scons -j 3 buildDSSI=1 buildImageOpcodes=1 buildInterfaces=1 buildJavaWrapper=1 buildNewParser=1 buildPythonOpcodes=1 buildUtilities=1 buildVirtual=1 Lib64=0 useDouble=1 usePortAudio=1 usePortMidi=1 useALSA=1 useJack=1 useFLTK=1 Word64=1 buildPythonWrapper=1 smoothSort=1 includeMP3=1 buildCsoundAC=1 buildStkOpcodes=1 buildBeats=1 dynamicCsoundLibrary=1 buildOSC=1 useOSC=1 >compile.txt A text file will be written to the csound5 directory so you can see later on what was build and how exactly.
It builds Csound in its directory. Then: sudo python install.py and it installs.
Then setting the environment. The file /etc/environment has to be edited:
OPCODEDIR64="/usr/local/lib/csound/plugins64" CSSTRNGS="/usr/local/share/locale" RAWWAVE_PATH=/usr/local/share/csound/rawwaves
and why not while we are there, the home settings for SADIR, SFDIR, SSDIR:
SFDIR="/home/user/csound/Output" SSDIR="/home/user/csound/Samples" SADIR="/home/user/csound/Analyses"
Csound can be uninstalled by running /usr/local/bin/uninstall-csound5