sequence

 element objects

An element of type sequence is a parent element which you can link to any number of other elements that you have in the trial. The sequence element runs those child elements in a sequence, by default repeating. You only need to set start and end conditions (properties start/end) for the sequence element, not its child elements. The sequence element starts them, alternates between them, and ends them automatically.

Note for sequences of picture elements in particular, just use a picture element and set its property interval—this is easier and more efficient.

sequence elements are mainly useful for setting up repeating sequences of elements. For regular non-repeating sequences you can generally use properties start/end (especially field endOf) of the elements directly.

▸ Object ends on its own?

By default no, the sequence repeats until a condition you set in property end. However, if you set repeat = <cd>false<cd>, it ends on its own after one pass.

"Ends on its own" means ends automatically at that point. If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).

No—runs until any condition you set in property end.

Input properties
Record properties
sequence
elements (see below)

elementExprs
interval
repeat

All visual elements
position

All adjuster elements have
adjust

All elements
start
end

startBuffer
endBuffer

vary
staircase

All objects
report
info

elementExprs

Default: none

A string or array of strings pointing to elements for the sequence by their variable names and possibly indexes (visual method: in their object headings / coding method: 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 vector for different intervals for different elements.

repeat

Default: repeat until a condition you set in property end

<cd>true<cd>/<cd>false<cd>: repeat the sequence until a condition you set in property end. If = <cd>false<cd>, the sequence ends on its own when the last element in it ends.

Adjustable properties

You can vary or allow the subject to adjust the following properties of an object of this type when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.

Adjustable properties

Adjustable properties

position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars

(None)

(None)

Input properties
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.

sequence
elements (see below)

All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable