**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 [[jvs:cigal:showplay:manual:chapter1:parametersettings|parameter settings]] section and a [[jvs:cigal:showplay:manual:chapter1:stimulustable|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([[jvs:cigal:showplay:manual:chapter4:eventcode|Eventcode]]), a control flag ([[jvs:cigal:showplay:manual:chapter4:eventflag|Eventflag]]), the [[jvs:cigal:showplay:manual:chapter4:start|Onset]] and [[jvs:cigal:showplay:manual:chapter4:duration|Duration]] in milliseconds, and screen location for visual stimuli (See [[jvs:cigal:showplay:manual:chapter1:stimulustable|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) showplay 0 ; initialize new showplay task 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 1000 -1 -1 ; show pictures (1/s) face2.pcx 14 1 -1 1000 -1 -1 ; Onset value -1 means scene1.jpg 15 1 -1 1000 -1 -1 ; onset is end of prev. stim. face5.jpg 14 1 -1 1000 -1 -1 face6.jpg 14 1 -1 1000 -1 -1 movie1.avi 16 1 -1 2000 -1 -1 ; play for 2 secs fix 2 0 -1 3000 -1 -1 erase 0 0 -1 0 tones2.wav 3 0 -1 0 ; play sound "End of task" 1 0 -1 2000 -1 -1 ; text and tone simultaneous quit 0 0 -1 **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 you need to include a line that says "imagefile1 = STIMFILE" somewhere after the "showplay 0" line (use your file name in place of STIMFILE). __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 [[jvs:cigal:showplay:manual:chapter1:stimulustable|stimulus table]]. These file names are relative to the [[jvs:cigal:showplay:manual:chapter3:showdir|SHOWDIR]] directory. By default, SHOWDIR is the directory containing the PPF ([[jvs:cigal:showplay:manual:chapter3:paramfile|Param_file]]) itself. 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. When set explicitly, the SHOWDIR path is relative to your current working directory ([[jvs:cigal:manual:chapter4:curdir|Curdir]]), not the directory containing the PPF. **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:**\\ [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:showplay|ShowPlay Home]], [[jvs:cigal:showplay:manual:chapter1|Introduction Topics]], [[jvs:cigal:showplay:manual:help|Manual Help]]