sequence

 elements

An element of type sequence is a parent element which you can link to any number of other elements that you also make for the trial. The sequence element runs those child elements in a sequence, possibly repeating. For example, you could use a sequence element in a change blindness flicker paradigm to show two picture elements alternating until the subject responds. You only need to set start and end cues (properties start/end) for the sequence element, not its child elements. The sequence element starts them, alternates between them, and ends them automatically.

Most elements can work in a sequence element. PsychBench will tell you if an element can't.

e.g.

<cd>sequence.elementExprs = [<cd><cds>"pictures(1)" ""   "pictures(2)" ""<cds><cd>  ];<cd>
<cd>sequence.interval     = [0.5           0.25 0.5           0.25];<cd>
<cd>sequence.repeat       = true;<cd>

→ run a repeating sequence of pictures(1) and pictures(2) with gaps between them. The pictures show for 500 msec and the gaps are 250 msec.

For any trial you define in an experiment script, you can make one or more 

sequence

 objects using function 

sequence

Object and input them to addTrial.

For any trial you define in an experiment script, you can make one or more 

sequence

 objects using function 

sequence

Object and input them to addTrial.

Input properties

Adjustable properties

You can allow the subject to adjust the following input properties of an object of this type during the experiment using an adjuster element. If you need to make other properties adjustable, you can copy the element type using newPbType and edit it.

position
nn_eyes
rotation
opacity

(None)

(None)

elementExprs

Default: none

A string or array of strings pointing to elements for the sequence by variable names and possibly indexes you use in the experiment script. You can include empties for gaps in the sequence. e.g. <cd>[<cd><cds>"pictures(1)" "" "pictures(2)" ""<cds><cd>]<cd> or <cd>{<cd><cds>'pictures(1)'<cds><cd> [] <cd><cds>'pictures(2)'<cds><cd> []}<cd>.

Tip: If you have an index in a numeric variable you can use it in an <cds>"x"<cds> string (but not an <cds>'x'<cds> string) like this: <cds>"pictures("<cds><cd> + n + <cd><cds>")"<cds>.

interval

Default: 1 sec

A number that is the interval to run each element for before switching to the next one (sec). Or a row vector of multiple intervals for different intervals for different elements.

repeat

Default: repeat

<cd>true<cd>/<cd>false<cd>: repeat the sequence. <cd>true<cd> = the sequence repeats until a cue you set in property end. <cd>false<cd> = the sequence ends on its own when the last element in it ends, so you don't need to set end for the sequence.

Input properties all visual elements have

position

Input properties all adjuster elements have

adjust

Input properties all objects have

report
info

Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.