This is an old revision of the document!
ShowPlay Reference Manual, Chapter 1 (Introduction): PPF
Paradigm parameter file (PPF) -- Showplay paradigm file
Showplay paradigm timing is controlled by a simple text file, commonly referred to as a paradigm parameter file (PPF). Each PPF has two major components: a parameter settings section and a stimulus table section. Each section is a block of text; text blocks end with a blank line.
The parameter settings section appears first and is used to specify parameters to use during the paradigm. These can be any CIGAL commands, but typically just involve setting global variable values. After the parameter section there should be a blank line, followed by the stimulus timing list, organized as a table. Each line in the table specifies a separate stimulus event. The columns specify: the stimulus file name (or text string or command), a user-defined ID code value(Eventcode), a control flag (Eventflag), the Onset and Duration in milliseconds, and screen location for visual stimuli (See Stimulus Table for details.) Stimuli can overlap in time and do not need to be listed in chronological order.
The following is an example of a simple input file that mixes graphics, pictures, text, movies, and sound stimuli. (Text following a ';' is ignored by CIGAL. Do not start any line with ';' within the body of the parameter block or the stimulus list because it will be interpreted as a blank line, which will terminate the text block.)
showplay 0 ; initialize new showplay task showdir = getfile(param_file,4) ; set SHOWDIR to the folder containing this file sbackcolor = "black" ; screen background color stextcolor = 'white' return ; end of parameters (must be followed by blank line) ;Stimulus ID Flg Onset(ms) Duration LocationXY "Press for faces" 1 0 0 4000 -1 -1 ; show text fix 2 0 4000 0 -1 -1 ; central '+' tones1.wav 3 0 6000 0 ; play auditory tone face1.jpg 14 1 8000 0 -1 -1 ; show pictures (1/s) face2.pcx 14 1 9000 0 -1 -1 scene1.jpg 15 1 10000 0 -1 -1 face5.jpg 14 1 11000 0 -1 -1 face6.jpg 14 1 12000 0 -1 -1 movie1.avi 16 1 13000 2000 -1 -1 ; play for 2 secs fix 2 0 15000 0 -1 -1 erase 0 0 18000 tones2.wav 3 0 18000 "End of task" 1 0 18000 2000 -1 -1 ; show text quit 0 0 20000
Essential components
A Showplay paradigm file has 4 important features.
- It must start with a line that says “showplay 0”, to define variables and initialize all settings to their default values.
- The top part of the file should end with a line that says “return”. This tells CIGAL not to attempt to process subsequent lines as standard commands. (Note: the “return” line can be omitted if the stimulus table is contained in a separate file – see below).
- If the file contains the stimulus table, you must have one (or more) blank lines after the “return” line, to separate the parameter section from the stimulus table. There must not be any other blank lines within the text sections of the file. (See Note below for what constitutes a blank line).
- The stimulus table (normally the bottom section) can be contained in the same file or it can be in a separate file. If it's in the same file it will be found automatically. If it is in a separate file (e.g. STIMFILE) you need to include a line that says “imagefile1 = STIMFILE” somewhere after the “showplay 0” line.
Note: A line that starts with space characters is not considered a blank line even though it may look blank. Also, a semicolon (';') and all sebsequent characters on a line is ignored by CIGAL, so that a line that starts with a semicolon will be treated as a blank line even though it doesn't look it. (Put some blank space before the semicolon if you want to embed comments within your stimulus table.)
Stimulus file names
File names for image, sound, and movie stimuli appear as the first argument in the stimulus table. By default, these file names are relative to the current working directory (Curdir). Alternatively, you can explicitly specify the folder containing your stimulus files by setting the Showdir string variable in the upper portion of the pardigm parameter file. The “showdir=getfile” line in the above example makes the starting directory for finding stimulus files the same directory containing the PPF (Param_file) itself.
Paradigm parameter file names
In Showplay's documentation, paradigm parameter files are typically referred to as “PPF files” and named with a “.ppf” file suffix. The file name itself doesn't matter to CIGAL, however, so you may find it more convenient to simply name these files with the standard “.txt” file suffix. When creating PPF files just be sure that they contain plain text only, with no special formatting characters. So if you use programs like Microsoft Word or Wordpad make sure to select the no formatting option when saving your file.
See Also:
CIGAL Home, CIGAL Manual, ShowPlay Home, Introduction Topics, Manual Help