login community faq

Does anyone have an install guide for Csound5, including the python bindings?

asked Oct 20 '12 at 04:14

ryans's gravatar image

ryans ♦♦
28411420


You can install csound5 using the following commands. This assumes you are using python2.7:

 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
mkdir -p $HOME/bin $HOME/lib/python2.7 $HOME/src

cd $HOME/src
wget 'http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz'
tar -xzf libsndfile-1.0.25.tar.gz
cd libsndfile-1.0.25
./configure --prefix=$HOME
make
make install

cd $HOME/src
wget 'http://sourceforge.net/projects/scons/files/latest/download?source=files'
tar -xzf scons-2.2.0.tar.gz
cd scons-2.2.0
python2.7 setup.py install

cd $HOME/src
git clone git://csound.git.sourceforge.net/gitroot/csound/csound5
cd csound5/
cp custom-linux-mkg.py custom.py
sed -i "s^customCPPPATH = \[\]^customCPPPATH = \['$HOME/include'\]^" custom.py
sed -i "s^customLIBPATH = \[\]^customLIBPATH = \['$HOME/lib'\]^" custom.py
scons useDouble=1 useOSC=1 buildCsound5GUI=1 buildPythonOpcodes=1 useOSC=1 builBeats=1 buildCsoundAC=1 buildInterfaces=1 buildPythonWrapper=1 pythonVersion=2.7 Lib64=1 dynamicCsoundLibrary=1
sed -i "s^prefix = '/usr/local'^prefix = '$HOME'^" install.py
sed -i "s^'/usr/lib%s/python%s/site-packages' % (word64Suffix, pyVersion)^'$HOME/lib/python2.7'^g" install.py
python2.7 install.py

Ensure that you set:

1
export LD_LIBRARY_PATH="$HOME/lib:$LD_LIBRARY_PATH"

at run-time in order to be able to run the program. You can also put this line into your $HOME/.bashrc file to set it automatically at login.

You can then import csnd from a python2.7 prompt:

1
2
3
4
5
Python 2.7.3 (default, May 18 2012, 14:51:16) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import csnd
>>>

Hope that helps!

This answer is marked "community wiki".

answered Oct 20 '12 at 04:18

ryans's gravatar image

ryans ♦♦
28411420

I still can not import CsoundAC to prepare CsoundAC.MusicModel()

http://www.linuxjournal.com/content/introducing-csoundac-algorithmic-composition-csound-and-python

(Nov 14 '12 at 03:57) Ivs Ivs's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×1

Asked: Oct 20 '12 at 04:14

Seen: 209 times

Last updated: Nov 14 '12 at 08:40

Related questions

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited