playitbyr and the
require Csound, a free and open
source software synthesizer. Hopefully, you can just install Csound
csound will automatically detect it and be able
to use it; but here are some tips if you run into trouble.
These instructions assume you have already
csound, which you can install from CRAN by
Csound can be retrieved from its Sourceforge site, but the download links are a bit outdated and confusing. Here are direct links to a recent version of Csound (5.17-6) for different platforms:
Mac OS X (10.6)
Mac OS X (10.7)
Windows and Mac OS X versions both have easy-to-use installation
instructions; make sure any options for "Libraries" are enabled
during the installation, since
csound links to the
shared library file.
It is also available from the Debian and Ubuntu reposotories, available via the command:
sudo apt-get install libcsound64-dev
Back to top
Linking to Csound in R
Now that Csound's installed, we can see if R is able to see it:
If this doesn't give you any messages or warnings, you should be all set. However, you may recieve a warning that looks like this:
Note: No valid csound library found automatically. You must have a valid Csound library to use this package; if you know the path to your Csound shared library, you can specify it using setCsoundLibrary.
Where do you find this mysterious 'library'? This is the file that R
calls to use the sound functionality of Csound. It probably has the
.so on Linux,
.dylib on Mac OS
.dll on Windows and has a name
libcsnd, and it is lurking somewhere on your
computer. It may have a version number (some numbers and dots, like '
5.2', tacked on after the extension.
As a rule of thumb, if you see two libraries and one of
them has a '
64' in it, that one will work better with
csound package. Here's some hunting tips:
On Linux, see if you can find it somewhere
it can find it automatically on Linux.)
On Windows, look at
\Program Files\Csound\bin\ or somewhere around there.
On Mac OS X, I found it in
/Library/Frameworks/CsoundLib64.framework/Versions/Current/. (It seems to have the most trouble finding it on OS X.)
Once you've found the library file, you can make tell the
csound package about it:
Back to top
A quick sound test
csound package is loaded, you can run the following commands as a sound test. If you hear a series of tones and fuzz, you're in business.
Back to top