Difference between revisions of "Stk2pd"
|Line 11:||Line 11:|
Revision as of 12:16, 27 July 2007
stk2pd is a script to convert STK objects to Pd objects
It is currently tested on:
- PlanetCCRMA Linux machines running FC6
- Intel Macs running OS 10.4.10 and Pd version 0.39.2-extended-rc3
The code and scripts in this package are provided for free with no warranty. Use at your own risk. The source package includes the rawwaves directory from the STK, which may or may not be covered by a license. The binary Pd objects generated by this package use libstk.a and require a path to the STK include directory, neither of which are included here. See the STK source for licensing and legal information about STK.
1. You need the STK includes and libstk.a You can download and compile it from source from: http://ccrma.stanford.edu/software/stk/
2. Autoconf. Type:
This will generate a configure file.
3. Configure. You probably need to set the pd path and the stk path, and may want to set the installation prefix. You can do this by typing:
./configure --with-pd-dir=/path/to/pd/include --with-stk-dir=/path/to/stk --prefix=/where/you/put/your/pd/externs
4. If this is successful, you can type:
This will copy the compiled externs and the (required) stk rawwaves directory to the installation directory, determined by --prefix
5. Note that to install the help patches, you'll need to copy them manually to where you keep your Pd help patches.
6. *WARNING* Some of the STK instruments load small sound files into buffers when they are created. These sound files are in the rawwaves directory, and the path to this directory must be set at COMPILE TIME. Because of this, I set the path to rawwaves to be relative to the pd objects. This means that the rawwaves directory needs to be copied along with the compiled pd objects to your destination directory.
How this (hopefully) works
- When you type make, the Makefile (generated by configure) calls a shell script called ProcessInstrument.
- This script generates a .cpp file for each stk instrument in the list defined on first line of the Makefile. The .cpp files are put in the cppfiles directory.
- To change this list, you can edit the Makefile (or Makefile.in, and then re-run configure).
- The .cpp files are generated by find and replace, based on the template cpp file called stk2pdTemplate.
- After each is generated, a Pd extern is compiled into the externs directory.
- The install: make target stupidly copies the compiled externs and the rawwaves directory to the path set by --prefix.