Difference between revisions of "Stk2pd"

From CCRMA Wiki
Jump to: navigation, search
(Downloads)
Line 11: Line 11:
 
==Downloads==
 
==Downloads==
 
Source
 
Source
* stk2pd-07272007.tar.gz
+
* [http://ccrma.stanford.edu/courses/250a/pd/stk2pd-07272007.tar.gz stk2pd-07272007.tar.gz]
 +
 
  
 
Pd Externs
 
Pd Externs
* stk2pd-externs-IntelMac-07272007.tar.gz
+
* [http://ccrma.stanford.edu/courses/250a/pd/stk2pd-externs-IntelMac-07272007.tar.gz stk2pd-externs-IntelMac-07272007.tar.gz]
* stk2pd-externs-Linux-07272007.tar.gz
+
* [http://ccrma.stanford.edu/courses/250a/pd/stk2pd-externs-Linux-07272007.tar.gz stk2pd-externs-Linux-07272007.tar.gz]
 
+
 
+
 
+
  
 
==To Compile==
 
==To Compile==

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

Legal

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.


Downloads

Source


Pd Externs

To Compile

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:

autoconf

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:

   make

and then

   make install

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.