sequence

 element objects

A sequence element 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. The sequence element starts its children, alternates between them, and ends them when it ends—you don't need to set properties start/end for them.

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. Also note many dynamic visual elements have properties like maxNumLoops, breakInterval, phase which allow you to loop them without using a sequence element (see for example movie elements). sequence elements are useful for setting up sequences of static visual stimuli which don't have properties like that.

Object end

By default a sequence element repeats until a time or condition you set in property end. You can also set property maxNumLoops to tell it to end after a certain number of loops—in that case you don't need to set end (unless you want to add other end conditions that could occur earlier).

When a sequence element ends it also ends all its child elements (see above). In the unusual case that all its child elements end on their own, the sequence element ends automatically.

Input properties
Record properties
sequence
elements (see below)

elementExprs
interval
maxNumLoops
phase

All visual elements
position

(Visual element properties not applicable for this element type)
depth
nn_eyes
rotation
flipHorz
flipVert
colorMask
alpha
intensity
contrastMult
convolution
shader
filterOrder
filterGrayscale
filterResolutionMult
filterGamma
channelResolution
backColor
addDisplay

All adjuster elements have
adjust

All elements
start
end

startBuffer
endBuffer
preload
vary
staircase

All objects
info
report

elementExprs

No default

A string or array of strings pointing to elements to run through by their variable names and possibly indexes. You can include empties for breaks 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>. (In the coding method this is just the variable name/index you use in the experiment script. In the visual method you can specify a name/index for an object in its object heading, default = object type name.)

interval

Default: 1 sec

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

maxNumLoops
phase

Default: maxNumLoops = repeat until a condition you set in property end
Default: phase = start at start of sequence

maxNumLoops is a number > 0 that is number of times to repeat the sequence, after which the object (and all its child elements) will end. Note this number can be fractional, not just integer. <cd>inf<cd> = repeat until a condition you set in property end.

phase is start time in the sequence (sec). 0 = start. Generally use for a looping sequence if you want to set a starting point other than sequence start.

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