Introduction
Tscope is a C/C++ library aimed at experiment programming. It was developed at the
Department of Experimental Psychology of Ghent University, as a Windows 2000/XP replacement of
the Dos-based Expstuff library. As a specialized experiment programming library, it is more
flexible than experiment generation software, but also hides the complexities of the
non-specialized C/C++ libraries it is based on. Tscope provides functions for graphics, sound,
timing, randomization and response registration.
Tscope is based on three open source
projects: the Cygwin gcc compiler, the Allegro game programming library, and the Crimson source
editor. In the download section you'll find an installation package that bundles these
three projects into a single Experiment Development Environment.
The
graphics subsystem provides
- full screen and windowed modes.
- drawing functions.
- text output functions.
- a simple mouse GUI.
- memory bitmap support.
Most of the graphics functions are based on Allegro functions.
The
sound system can
- play .wav files.
- generate sound waves on the fly.
Like the graphics subsystem, the sound subsystem is based on Allegro functions.
This part is a C implementation of
Brysbaert's randomization procedures published in BRMIC. Highlights:
- generation of random numbers from uniform, normal or exponential distributions.
- generation of random lists without replacement.
- sequential randomization.
This is the reason we started with the project. We were getting bored of
going back to DOS to run our experiments, but easy-to-use, flexible and accurate Windows timers
were not known to us. We made our own - based on the Win32 api, allegro
(mouse/keyboard/joystick input), and Cygwin's ioperm library (game- and parallel port
input). Features:
- Manipulation of the program's priority to reduce timing errors.
- Estimates of the timing error.
- Synchronization of stimuli with screen refreshes.
- Can read input from popular, but inaccurate input devices (mouse, keyboard and
joystick)
- Can read input from specialized, accurate response boxes attached to the game, parallel
or usb port.
Linux can be used as a development environment for Tscope programs. Every
bug-free Tscope program that compiles on Windows will also compile on Linux, and vice versa.
From version 168 onwards, Tscope programs can be run with above normal priority on Linux
systems. This should make stimulus and response timing on Linux reasonably accurate. A separate
section of the reference manual describes the functions that behave differently on Linux.
Mac can be used as a development environment for Tscope programs. Every
bug-free Tscope program that compiles on Windows will also compile on Mac, and vice versa. On
Mac, however, no accurate timing of stimuli and responses is possible. It is therefore not a
good idea to use Mac for running experiments. A separate section of the reference manual
describes the functions that behave differently on Mac.
Example programs that clarify the usage of Tscope functions are available both
on this site, and within the Tscope distribution. In addition to reading the reference manual,
you can play around with these programs to get an understanding of how the Tscope functions
work. After that you can start using the functions in your own programs.
On the Tscope site, there is a directory tree with experiment-specific
algorithms and full-blown experiments submitted by Tscope users. All users are encouraged to
submit the fruit of their programming efforts to the authors. This way we can provide other
users with as many examples as possible.