getting started with the python API
Date | 2006-03-18 00:22 |
From | Atte André Jensen |
Subject | getting started with the python API |
I wanted to try out the new python API (linux), but helas: [atte@aarhus interfaces]$ python test.py Traceback (most recent call last): File "test.py", line 2, in ? import csnd ImportError: No module named csnd I'm assuming it's because I haven't installed csound (don't laugh yet...). Normally to be able to switch between versions I only build csound and point to the version I wanna use with a symlink: [atte@aarhus atte]$ grep -i csound .bashrc csound_path=/home/atte/software/csound/current export OPCODEDIR=$csound_path PATH=$csound_path:"${PATH}" Is it correct that I'll have to install csound with "scons install" (should I repeat any parameters used for building?)? How well does a real install lend itself to up and/or downgrades? If a new version stops working I need to be able to quickly revert to a known-to-work version, is there a good way to do this with a "real" install? Thanks in advance. -- peace, love & harmony Atte http://www.atte.dk |
Date | 2006-03-18 09:47 |
From | Atte André Jensen |
Subject | Re: getting started with the python API |
Atte André Jensen wrote: > I wanted to try out the new python API (linux), but helas: > > [atte@aarhus interfaces]$ python test.py > Traceback (most recent call last): > File "test.py", line 2, in ? > import csnd > ImportError: No module named csnd I went ahead and installed csound, but the problem is still there. If soneone could help me out, I'd be most happy... [atte@aarhus csound5]$ sudo scons usePortAudio=0 noDebug=1 buildInterfaces=1 buildPythonOpcodes=1 gcc3opt=pentium4 install ... CONFIGURATION DECISION: Using single-precision floating point for audio samples. Checking for C header file stdio.h... yes Checking for C header file sndfile.h... yes Checking for C header file portaudio.h... no Checking for C header file portmidi.h... yes Checking for C++ header file FL/Fl.H... yes Checking for C++ header file boost/any.hpp... no Checking for C header file alsa/asoundlib.h... yes Checking for C header file jack/jack.h... no Checking for C header file lo/lo.h... no Checking for C++ header file Opcodes/stk/include/Stk.h... no Checking for C header file m_pd.h... yes Checking for C header file tcl.h... no Checking for C header file lua.h... no Checking for SWIG... no Checking for C header file Python.h... no Checking for C header file /usr/include/python2.4/Python.h... yes Checking for C++ header file jni.h... no Checking for C header file io.h... no Checking for C header file fcntl.h... yes Checking for C header file unistd.h... yes Checking for C header file stdint.h... yes Checking for C header file sys/time.h... yes Checking for C header file sys/types.h... yes Checking for C header file termios.h... yes Checking for C header file dirent.h... yes Checking for libsndfile version 1.0.13 or later... ok CONFIGURATION DECISION: Building static Csound library CONFIGURATION DECISION: Building with PortMIDI. CONFIGURATION DECISION: Not building Csound interfaces library. CONFIGURATION DECISION: Not generating PDF documentation. CONFIGURATION DECISION: Building with FLTK graphs and widgets. CONFIGURATION DECISION: Not building CoreAudio plugin. CONFIGURATION DECISION: Building ALSA plugin. CONFIGURATION DECISION: Not building PortAudio module. CONFIGURATION DECISION: Not building JACK plugin. CONFIGURATION DECISION: Not building OSC plugin. Checking for C header file fluidsynth.h... no CONFIGURATION DECISION: Not building fluid opcodes. CONFIGURATION DECISION: Not building CsoundVST plugin and standalone. Checking for C header file Opcodes/Loris/src/loris.h... no CONFIGURATION DECISION: Not building Loris Python extension and Csound opcodes. CONFIGURATION DECISION: Not building STK opcodes. CONFIGURATION DECISION: Building Python opcodes. CONFIGURATION DECISION: Not building Tclcsound CONFIGURATION DECISION: not building OSX GUI frontend CONFIGURATION DECISION: Building DSSI plugin host opcodes. CONFIGURATION DECISION: Not calling TAGS CONFIGURATION DECISION: Calling makedb CONFIGURATION DECISION: Not compiling zip file for release. I'm thinking this is a bad thing: CONFIGURATION DECISION: Not building Csound interfaces library. What can I be missing? -- peace, love & harmony Atte http://www.atte.dk |
Date | 2006-03-18 10:47 |
From | Istvan Varga |
Subject | Re: getting started with the python API |
Attachments | None |
Date | 2006-03-18 11:52 |
From | Atte André Jensen |
Subject | Re: getting started with the python API |
Istvan Varga wrote: > You do not have SWIG, which is required for generating language interfaces. Ok > Also, instead of 'scons install', you could try using install.py instead, as > the former does not work correctly at this time. install.py also makes it > possible to do a clean uninstall by running 'uninstall-csound5'; since you > have already used 'scons install', you need to manually find and delete > every file that was installed. Grrrrrrrrrrrrrrr! Couldn't that option be removed untill it works? This is very annoying! Any chance of getting a list of installed files? Tried running the scons install again with stdout redirected to a file for inspection, but now scons knows it's installed so it doesn't want to repeat it for me :-( > If you decide to use install.py, it may be > useful to have a look at the target directories defined at the top of the > file for any distribution specific details. > Csound 5.01 is now also available at SourceForge, from this page: > http://sourceforge.net/project/showfiles.php?group_id=81968 > It may be worth trying the RPM file, And on debian, which is not rpm based? Would it also spam my filesystem with files that need to be manually removed? > if it works, you get a fairly complete > Csound installation, including basically everything that can be built on > Linux with the exception of the Lua interface. If it does not work, you can > at least easily uninstall it. That sounds nice! -- peace, love & harmony Atte http://www.atte.dk |
Date | 2006-03-18 12:33 |
From | Istvan Varga |
Subject | Re: getting started with the python API |
Attachments | None |
Date | 2006-03-18 12:37 |
From | Atte André Jensen |
Subject | Re: getting started with the python API |
Atte André Jensen wrote: > Any chance of getting a list of installed files? How complete is this list? Ideas of building a better one? [root@aarhus root]# slocate csound | grep -v '/mnt/' | grep -v '/home/atte/' /usr/local/bin/csound /usr/local/lib/csound /usr/local/lib/csound/plugins /usr/local/lib/csound/plugins/libpmidi.so /usr/local/lib/csound/plugins/libstdopcod.so /usr/local/lib/csound/plugins/libcontrol.so /usr/local/lib/csound/plugins/libftest.so /usr/local/lib/csound/plugins/libmixer.so /usr/local/lib/csound/plugins/libmodal4.so /usr/local/lib/csound/plugins/libphysmod.so /usr/local/lib/csound/plugins/libpitch.so /usr/local/lib/csound/plugins/libscansyn.so /usr/local/lib/csound/plugins/libsfont.so /usr/local/lib/csound/plugins/libwidgets.so /usr/local/lib/csound/plugins/librtalsa.so /usr/local/lib/csound/plugins/libstdutil.so /usr/local/lib/csound/plugins/libdssi4cs.so /usr/local/lib/csound/plugins/.sconsign /usr/local/lib/libcsound.a /usr/local/include/csound /usr/local/include/csound/cfgvar.h /usr/local/include/csound/cscore.h /usr/local/include/csound/csdl.h /usr/local/include/csound/csound.h /usr/local/include/csound/csound.hpp /usr/local/include/csound/csoundCore.h /usr/local/include/csound/cwindow.h /usr/local/include/csound/msg_attr.h /usr/local/include/csound/OpcodeBase.hpp /usr/local/include/csound/pstream.h /usr/local/include/csound/pvfileio.h /usr/local/include/csound/soundio.h /usr/local/include/csound/sysdep.h /usr/local/include/csound/text.h /usr/local/include/csound/version.h /usr/local/include/csound/CsoundFile.hpp /usr/local/include/csound/CppSound.hpp /usr/local/include/csound/filebuilding.h /usr/local/include/csound/.sconsign -- peace, love & harmony Atte http://www.atte.dk |
Date | 2006-03-18 12:41 |
From | Atte André Jensen |
Subject | Re: getting started with the python API |
Istvan Varga wrote: > find /usr/local \! -type d -ctime -2 -print Thanks... -- peace, love & harmony Atte http://www.atte.dk |
Date | 2006-03-18 13:21 |
From | Atte André Jensen |
Subject | Re: getting started with the python API |
Istvan Varga wrote: > You do not have SWIG, which is required for generating language interfaces. Ok, I removed all the junk from scons install, grabbed 5.01 from cvs and build (not installed) it. I added the csound5 directory to my python path and "python test.py" shows me some help + plays back trapped.csd for me. Cabel.py even works for me (didn't figure out how to make noise, but it seams to start csound). Should this mean that I'm ready to work with the python API? Anything obvious missing? Sorry for being a bit stubborn about the way I'd like to have csound (not)installed... BTW: What does this mean and what do I need to build these: CONFIGURATION DECISION: Not building Python opcodes. -- peace, love & harmony Atte http://www.atte.dk |
Date | 2006-03-18 13:25 |
From | Istvan Varga |
Subject | Re: getting started with the python API |
Attachments | None filelist.txt |
Date | 2006-03-18 13:29 |
From | Istvan Varga |
Subject | Re: getting started with the python API |
Attachments | None |
Date | 2006-03-18 14:09 |
From | Atte André Jensen |
Subject | Re: getting started with the python API |
Istvan Varga wrote: > Add buildPythonOpcodes=1 to the scons options. I have that already. It must be some library or something missing on my system... -- peace, love & harmony Atte http://www.atte.dk |