From 4d84d14ac1aa13958eaa2971b03f7f929a519105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 8 Feb 2008 13:00:32 +0000 Subject: reorganized svn path=/trunk/; revision=9400 --- desiredata/doc/1.manual/x4.htm | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 desiredata/doc/1.manual/x4.htm (limited to 'desiredata/doc/1.manual/x4.htm') diff --git a/desiredata/doc/1.manual/x4.htm b/desiredata/doc/1.manual/x4.htm new file mode 100644 index 00000000..faaf2f48 --- /dev/null +++ b/desiredata/doc/1.manual/x4.htm @@ -0,0 +1,61 @@ + + + + + Pd Documentation 4 + + + + + + + +

Pd Documentation chapter 4: writing Pd objects in C

+ +

+ back to table of contents +

+

+ +

You can write your own objects that you and others can use in their Pd +applications. You can write them in C or (if you're smart and brave) in C++ or +FORTRAN. + +

HOW EXTERNS ARE LOADED + +

Whenever you type the name of an object +(into an "object" text box) that Pd doesn't yet know about, Pd looks for a +relocatable object file, named, for instance, "profile.pd_irix5". Pd looks +first in the directory containing the patch, then in directories in its +"path." Pd will then add whatever object is defined there to its "class list," +which is the set of all Pd classes you can use. If all this works, Pd then +attempts again to create the object you asked for, this time perhaps +successfully. There is no difference between an object defined this way and an +object built into Pd. + +

Once you load a new object into Pd, it's there for the duration of your Pd +session. If you load another Pd document which supplies a different version of +some Pd object, the object won't be updated. IF you're working on a new object +and decide to change it, you have to exit and re-enter Pd to get the change to +take. + +

In the "externs" subdirectory of the documentation you +can find simple examples of "externs" with their source code and test patches; +there are many other on the web (see section 1.2 ). + +

Iohannes Zmoelnig has written an excellent guide to writing externs at + + http://iem.kug.ac.at/pd/externals-HOWTO/ . + +

A paper by Theo Stojanov on the subject is at: + +http://www.music.mcgill.ca/~theo/html/audio/pd_externs.pdf . + +

NT HINT: In NT, Pd is compiled using Visual C 6.0. If you have VC 5.x +your externs won't compile against Pd; you'll get an error about "disk full +or bad DLL." Simply recompile Pd under 5.x and the problem goes away. Externs +compiled under 5.x and 6.x are binary compatible; it's just the compilation +that's sensitive. + + + -- cgit v1.2.1