|
Warning: you need the Praat source code only in the following cases:
Before trying to dive into Praat's source code, you should be familiar with the working of the Praat program and with writing Praat scripts. The Praat program can be downloaded from www.praat.org.
All of the code is available under the GNU General Public License. Of course, any improvements are welcomed by the authors.
To download the latest source code of Praat, click on one of the archives:
The code requires that your compiler supports C99.
On most computers you can unpack the zip file by double-clicking. If you prefer to try the .tar.gz file instead, drop it on StuffIt Expander (on Macintosh or Windows) or use gunzip and tar xvf (on Unix).
First make sure that the source code can be compiled as is. Then add your own buttons by editing main/main_Praat.c or fon/praat_Fon.c. Consult the manual page on Programming.
Open the project praat.xcodeproj (which you can find on the disk image praat_xcodeproj.dmg) in Xcode, and choose Build or Build & Go. The project contains the target praat_mac (for MacOS X, on PowerPC or Intel processors). Praat includes QuickTime unless you #define the symbol DONT_INCLUDE_QUICKTIME.
Open the project praat.mcp in Metrowerks CodeWarrior 9.0 or newer (on a Windows PC or on a Mac), and choose Make or Run. The project contains the targets praat_win (for praat.exe) and praatcon_win (for the console program praatcon.exe). Praat also seems to compile correctly with the MinGW compiler (on a Windows PC); in that case, you first copy the file makefiles/makefile.defs.mingw to the sources directory (i.e. where makefile is) and rename it to makefile.defs. You have to install the QuickTime SDK for Windows (if it does not work, #define the symbol DONT_INCLUDE_QUICKTIME).
Install a Motif library (Xm.a) and the Motif include files. Then go to the sources directory and type
cp makefiles/makefile.defs.linux.dynamic ./makefile.defs
Then type make to build the program.
Install a Motif library (libXm.a) and the Motif include files. Then go to the sources directory and type
cp makefiles/makefile.defs.freebsd.dynamic ./makefile.defs
Then type make to build the program. According to Jason Bacon, one may "have to kill artsd to unlock /dev/dsp" in order to get audio playback to function.
Install a Motif library and the Motif include file directory, for instance as /usr/local/lib/libXm.a and /usr/local/include/Xm/. Then go to the sources directory and type
cp makefiles/makefile.defs.openbsd ./makefile.defs
Then type make to build the program.
Go to the sources directory and type
cp makefiles/makefile.defs.irix ./makefile.defs
Then type make to build the program.
Go to the sources directory and type
cp makefiles/makefile.defs.solaris10 ./makefile.defs
Then type make to build the program.
Go to the sources directory and type
cp /usr/lib/include/audio/Alib.h sys cp makefiles/makefile.defs.hpux ./makefile.defs
Then type make to build the program.