.. _routines:

Routines
-------------

An experiment consists of one or more Routines. A Routine might specify the timing of events within a trial or the presentation of instructions or feedback. Multiple Routines can then be combined in the :doc:`Flow </builder/flow>`, which controls the order in which these occur and the way in which they repeat.

To create a new Routine, you can either select "Insert Routine" from within your flow panel or  use the Experiment menu. The display size of items within a routine can be adjusted (see the View menu).

Within a Routine there are a number of components. These components determine the occurrence of a stimulus, or the recording of a response. Any number of components can be added to a Routine. Each has its own line in the Routine view that shows when the component starts and finishes in time, and these can overlap.

For now the time axis of the Routines panel is fixed, representing seconds (one line is one second). If you choose to present your stimuli based on another timing unit, e.g. number of frames (more precise) and can be scaled up or down to allow veYou can specify the "Expected duration" within the component - that will mean that this component still appears on your routine timeline.