Press "Enter" to skip to content

Month: October 2014

What is the Cross-modal oddball paradigm?

My current research focus on how attention can be captured by deviating stimuli. I will briefly describe the paradigm I have used – the cross-modal oddball task. Before I go into the cross-modal oddball task I will describe the auditory oddball task. In the oddball paradigm the subjects are exposed to a repetitive stream of distracting sounds. Furthermore, they can be either passive (i.e., watching a film) or engaged in a task (i.e., making judgments of durations of the tones). Typically subjects are exposed to two types of  distractors; one standard, presented frequently (i.e., 80 % of trials), and an oddball (‘Novel’ or ‘Deviant’) presented on infrequent trials (i.e., 20 % of the trials).

Cross-modal oddball sound sequence
Example of an oddball sequence. Black tones represent standard sounds and red represents deviant or novel sounds.

There is a plethora of research using the oddball paradigm in examining electrophysiological responses (i.e., ERPs) to deviating sounds (for reviews see; Bendixen, SanMiguel, & Schröger, 2012; Friedman, Cycowicz, & Gaeta, 2001). However, when engaged in a primary task there is also a behavioral cost – the response time to target tone is slowed by the presentation of a deviant (e.g., Berti, 2008).

Python script for trial randomization

In this post you will find a Python script for randomizing conditions with constraints (i.e., never 2 consecutive trials of X). This script will in a later post be implemented in a cross-modal oddball task created in Psychopy.

I recently started to use Psychopy to build experiments. To build my experiments (mainly oddball tasks) I have, up until I found psychopy, used e-prime. In an oddball task one does not usually present several oddball (typically called “novel” or “deviant”) stimuli in succession. Without getting into detail; I was not able to solve this problem with e-primes scripting language “e-basic” so I made a python script instead. With this script I pre-generated .txt-files that I loaded into e-prime and got my constraints fulfilled.