Examples
The examples can be viewed in highlighted html on this page, and are available as ASCII text
files in the examples directory of the Tscope distribution.
- screen1.c: usage of
the screen parameters.
- screen2.c: reading
screen settings from a parameter file.
- tscope.cfg:
configuration file needed by screen2.c
- dbuff1.c: usage of
the double buffer.
- dbuff2.c: using the
double buffer to speed up drawing.
- draw1.c: drawing
lines, rectangles and circles.
- draw2.c: drawing
triangles, polygons, ellipses and arcs.
- draw3.c: using
getpixel/putpixel.
- timer1.c: basic
timing of stimulus onset and response.
- timer2.c: basic
timing with maximim response time.
- timer3.c: double
keypress response.
- timer4.c:
measuring stimulus duration (priming).
- timer5.c: changing
(erasing) the stimulus while waiting for a response.
- timer6.c:
measuring key press time.
- timer7.c: reading
timer settings from a parameter file.
- tscope.cfg:
configuration file needed by timer7.c
- mouse1.c: drawing
mouse buttons on the screen.
- map1.c: reading
bitmaps from files.
- bitmap.pcx: bitmap
needed by map1.c.
- map2.c: preparing
stimuli on memory bitmaps.
- map3.c: special
blits (rotated, flipped, ..).
- newsound1.c:
read and play a wave file (blocking api).
- newsound2.c:
read and play a wave file (non blocking api).
- newsound3.c:
record, play and save a wave file (blocking api).
- newsound4.c:
record, play and save a wave file (non blocking api).
- newsound5.c:
record, play and save a wave file (non blocking api with disk buffering).
- example.wav: wave
needed by sound1.c and sound2.c.