These are the steps i take for installing the most recent Csound install from GIT (using command: git clone git://git.code.sf.net/p/csound/csound5-git) in (K)(X)Ubuntu. The GIT version of Csound still may contain some bugs but i just want to have the most recent version of Csound on my system. After downloading the source package from GIT, these are the steps to take to build the latest version of Csound.
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
- FLTK1.1 and FLTK1.1.dev
- libfftw3-dev (for Loris)
- libfluidsynth1 and libfluidsynth-devitem
- liblo0-dev for completeness-sake (i do not need OSC atm)
- 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
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 is an "unofficial" opcode files that did not make it to the standard Csound (yet). It can be downloaded from http://noisesmith-linux-audio.googlecode.com/svn-history/r114/trunk/csou... .
The opcodes that are produced:
- imageblit, imagecreate, imagegain and imagediv.
The files imagemanip.c and imagemanip.h must be copied to the Opcodes folder of Csound before building. Also add this line in the SConstruct file of Csound, for example as line 1600:
- makePlugin(pluginEnvironment, 'imagemanip', ['Opcodes/imagemanip.c'])
- 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 22.214.171.124.
The line should be: for i in ['java', 'jvm/java', 'jvm/java-6-sun-126.96.36.199']:
- 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-7-openjdk-amd64/include') -in my case -
Probably you will need to install openjdk-7-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 2 buildDSSI=1 buildImageOpcodes=1 buildInterfaces=1 buildJavaWrapper=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=0 buildStkOpcodes=1 buildBeats=1 dynamicCsoundLibrary=1 buildOSC=1 useOSC=1 useIpMIDI=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.
sudo python install.py
and it installs.
Then setting the environment. The file /etc/environment has to be edited:
and why not while we are there, the home settings for SADIR, SFDIR, SSDIR:
Csound can be uninstalled by running /usr/local/bin/uninstall-csound5