PEACH Library Documentation


Yury Petrov


The PEACH library provides C++ functions for programming experiments in visual psychophysics. PEACH contains an extensive collection of visual primitives (Gabors, Disks, Bars, Text, Images, etc.) as well as a set of experimental functions, which allow to code a complicated experiment in a few dozen lines. The library provides a full support for:

Only basic knowledge of C is required for programming experiments with PEACH. If you are a complete stranger to C try A Little C Primer. You'll probably get a working knowledge of C by just following the examples in the PEACH Tutorial. Essentially, PEACH functions can be viewed as a set of high-level commands implementing paradigms and stimuli commonly used in visual psychophysics. The little C that you'll use is to glue these commands together into a coherent experiment.

peach.h is the only header file for external linking. The file is located in the root PEACH directory, the rest of the header files in this directory are not meant for external access. Source files are located in the same directory. The PEACH documentation files are located in the html subdirectory. Point your browser to index.html to open this page. The examples subdirectory contains code for all the experiments discussed in the PEACH Tutorial.

PEACH is covered by the GNU Lesser General Public License and is distributed "as is" without any guarantees or liabilities. A copy of the license is in the Licence.txt file in the PEACH directory


Quick Start

For a quick start install PEACH as described in Installation. Then follow the PEACH Tutorial. You are encouraged to click on any variable, constant, or function name shown in blue to view the linked documentation.

All the experimental details are covered in the Experimental module. Various PEACH object functions are documented in the Objects module. Image display and stereoscopic display are documented in the Images and the Stereo modules respectively.

Release notes

PEACH has been tested on Mac OS 10.4 and 10.5 and on Fedora Core 6. To use it on Linux you'll have to install glut-3.7, because full-screen rendering will not work with Freeglut. You'll need both the regular package (to get and the developer package (to get glut.h header file). Also, GLUT GameMode is not working on Linux, so you won't be able to set your screen resolution and refresh rate from PEACH UI. Use your Linux distribution screen preferences dialog instead. Everything else should work.


Linux OS or Mac OS X with Xcode Tools installed (get it from Apple downloads or from your Mac OS X DVD). For Mac OS X after the XCode installation is completed verify that the UNIX make command works by running it in the terminal window (you might need to open a fresh one). If the command is not found look for the command in /usr/bin, i.e. ls /usr/bin/make. PEACH will not compile without the make utility properly installed.


Download PEACH here


For manual installation:

Port this library to Windows. This should be easy, since all the essential code is platform-independent.
Add TCP/IP signaling capabilities to communicate stimulus onset/offset events and observer responses to an external application (e.g. an EEG recording software).

Generated on Fri Feb 27 14:19:20 2009 for PEACH by  doxygen 1.5.6