Vous êtes sur la page 1sur 8

Journal of Neuroscience Methods 177 (2009) 250257

Contents lists available at ScienceDirect

Journal of Neuroscience Methods


journal homepage: www.elsevier.com/locate/jneumeth

MatTAP: A MATLAB toolbox for the control and analysis of movement


synchronisation experiments
Mark T. Elliott , Andrew E. Welchman, Alan M. Wing
Behavioural Brain Sciences Centre, School of Psychology, University of Birmingham, Edgbaston B15 2TT, UK

a r t i c l e

i n f o

Article history:
Received 25 March 2008
Received in revised form
29 September 2008
Accepted 1 October 2008
Keywords:
MATLAB
Timing
Toolbox
Synchronisation
Tapping
Metronome

a b s t r a c t
Investigating movement timing and synchronisation at the sub-second range relies on an experimental setup that has high temporal delity, is able to deliver output cues and can capture corresponding
responses. Modern, multi-tasking operating systems make this increasingly challenging when using standard PC hardware and programming languages. This paper describes a new free suite of tools (available
from http://www.snipurl.com/mattap) for use within the MATLAB programming environment, compatible with Microsoft Windows and a range of data acquisition hardware. The toolbox allows exible
generation of timing cues with high temporal accuracy, the capture and automatic storage of corresponding participant responses and an integrated analysis module for the rapid processing of results. A simple
graphical user interface is used to navigate the toolbox and so can be operated easily by users not familiar
with programming languages. However, it is also fully extensible and customisable, allowing adaptation for individual experiments and facilitating the addition of new modules in future releases. Here we
discuss the relevance of the MatTAP (MATLAB Timing Analysis Package) toolbox to current timing experiments and compare its use to alternative methods. We validate the accuracy of the analysis module
through comparison to manual observation methods and replicate a previous sensorimotor synchronisation experiment to demonstrate the versatility of the toolbox features demanded by such movement
synchronisation paradigms.
2008 Elsevier B.V. All rights reserved.

1. Introduction
Producing rhythmic movements and actions is an everyday task
that we can execute using our own internal pacing signals (e.g.
walking or cycling), or in time with some external event (e.g. dancing with a partner (Gentry and Feron, 2004; Batalha and Macara,
2007) or playing in a musical ensemble (Keller et al., 2007)). Empirical investigations of the timing of rhythmic actions are often
conducted by instructing participants to tap their index nger in
time to an auditory, visual or tactile stimulus produced at regular
intervals (a metronome), typically at rates above 1 Hz. Following
this, the metronome stimulus is often turned off while the participant continues to tap at the same pace for a further period of
time. This procedure, which was rst employed by Stevens (1886),
is referred to as the synchronisation-continuation paradigm. Performance is typically described in terms of the disparity between
the metronome pulse and nger tap response (asynchrony) in
the synchronisation phase (Fig. 1). It is often noted that the tap
precedes the metronome in an anticipatory manner (Vos et al.,

Corresponding author. Tel.: +44 121 414 9517; fax: +44 121 414 4897.
E-mail address: m.t.elliott@bham.ac.uk (M.T. Elliott).
0165-0270/$ see front matter 2008 Elsevier B.V. All rights reserved.
doi:10.1016/j.jneumeth.2008.10.002

1995; Aschersleben, 2002), with the resulting timing error generally in the order of tens of milliseconds (standard notation is
that a negative value indicates an anticipatory tap). Similarly, in
the continuation phase, when the metronome is switched off,
self-paced tapping can be analysed through the measurement of
inter-response intervals (IRI)the interval between the current and
previous tap onset (Wing and Kristofferson, 1973; Billon et al., 1996;
Collyer and Church, 1998; Inui et al., 2001).
Detailed analysis of nger tapping timing accuracy in terms of
mean and variability has given rise to a large literature that has
shaped understanding of movement synchronisation (see Repp,
2005 for a comprehensive review). However, given the small temporal magnitude of these measurements (typically in the tens
of milliseconds range), a considerable empirical challenge is to
produce stimulus events with reliable timing while concurrently
capturing the participants movements with high temporal delity
using sensors appropriate to the movement (e.g. force-transducer,
video-based motion tracking). Meeting this challenge requires an
experimental setup that is able to (i) generate cues with a low
level of temporal lag and uncertainty, (ii) capture responses with
a high sampling accuracy and (iii) allow a true measurement of
the participants timing error by aligning precisely the participants movement with the cue event. Moreover, researchers often

M.T. Elliott et al. / Journal of Neuroscience Methods 177 (2009) 250257

251

Fig. 1. MatTAP captures both the metronome event and participants response to the event. Using this data, asynchronies can be calculated by measuring the temporal
difference between the metronome onsets and the corresponding response onsets. As indicated, responses typically precede the metronome resulting in negative asynchrony
values. Similarly, the inter-response intervals of the responses can be calculated from the time between the current and preceding response.

require more complex setups to the standard synchronisationcontinuation paradigm in which the properties of the metronome
and/or the properties of the produced movement might be varied.
For example, the duration of individual tones has been varied (Vos
et al., 1995), while investigating syncopated synchronisation has
involved using two independently timed auditory tones at different pitches (Keller and Repp, 2005). Further, a number of studies
have involved controlling the metronome rate during a trial by
changing the period in a stepped manner (Thaut et al., 1998), continuously (Schulze et al., 2005) or as a single phase shift (Repp,
2000, 2001, 2002; Elliott et al., 2008). Other studies have investigated multi-effector responses such as bimanual synchronisation
of right and left hands (Drewing and Aschersleben, 2003; Chen et
al., 2005; Doumas and Wing, 2007) or hand and foot (Helmuth and
Ivry, 1996).
Previous implementations for the accurate control of synchronisation experiments have exploited MIDI (Musical Instrument
Digital Interface) systems (e.g. Repp, 2000; Finney, 2001; Schulze
et al., 2005). This system has been used as the MIDI interface uses
dedicated hardware to ensure a constant output data rate that
has high temporal accuracy (latencies of 3 ms and jitter of around
1 ms are typical, Heckroth, 2001) with similar accuracy reported for
input events. In the context of movement synchronisation experiments this enables investigators to produce regular/rhythmic audio
tones whilst simultaneously detecting key strike events instigated
by the participants. The disadvantage of the MIDI standard is that
it is reliant on the use of digital musical instruments to capture
responses (such as a keyboard) imposing constraints on the experimental setup and making the implementation of multi-effector
recordings challenging. Further, there are few research-specic
software tools that exploit the MIDI protocol, hence timing analysis must be performed with separate software using data exported
from the sampling equipment. To date, MIDI-based methods have
remained attractive through their use of hardware whose timing
is independent of the controlling computer workstation. In particular, using an exclusively software-based solution under modern,
multi-tasking operating systems is difcult because the timing process relies on the central computer clock (the CPU) that is shared
with a range of different processes. This often results in temporal
latency and jitter in both the production of a metronome and the
capture of responses that cannot be controlled reliably.
Here we describe a dedicated solution for the control and analysis of synchronisation-continuation experiments. Written in the
MATLAB (The MathWorks, Inc., MA, USA) programming environment, the MatTAP (MATLAB Timing Analysis Package) toolbox
allows sub-millisecond accuracy for the production of metronome
events and the capture of participant responses (from a range of
sensors) through the use of dedicated data acquisition hardware.

The software incorporates a graphical user interface (GUI) to provide users with high-level control in the generation of multiple
timed output cues with a range of different parameters. This allows
exible experimental design without the necessity of writing new
program scripts and hence reduces the likelihood of introducing
errors into a particular paradigm. On the other hand, the toolbox
is fully extensible, allowing new modules to be added by those
familiar with the MATLAB programming language.
1.1. Overview of the toolbox
MatTAP is a MATLAB toolbox written with the goal of simplifying the process of running synchronisation experiments with highly
accurate metronome signals and capturing the responses made by
participants. It uses the MATLAB Data Acquisition Toolbox (The
MathWorks, Inc., MA, USA) to interface dedicated data acquisition
hardware. This removes the signal generation and data capture
tasks away from the PC, avoiding the problems of multi-tasking
operating systems and allowing high temporal precision. A typical
hardware conguration for an experimental setup using MatTAP is
shown in Fig. 2.
MatTAP contains three main modules of operation. First, a
graphical user interface is provided to allow full experimental
control of the metronome events and the capture of participant
movements. Based on the diversity of previous experiments in the
area (see above), the interface allows the user to generate up to two

Fig. 2. A typical hardware conguration for cue generation and response capture
using MatTAP. The toolbox uses data acquisition hardware to achieve a high level of
timing accuracy. (1) Two outputs are generated to drive stimuli. One is an analogue
waveform, typically used to drive an audio speaker, but can also be applied to haptic
or visual devices. The second output is a digital square pulse which can be used to
trigger bespoke stimuli equipment. To increase accuracy further, this pulse is fed
back into the system to compensate for processing delays in the hardware. (2) Up
to two sensors can be utilised to capture responses. Any sensor which produces
an analogue or digital voltage, typically in the range 5 V can be used to record
events. (3) The output signals and corresponding responses are captured and stored
automatically in individual, sequentially numbered .mat format les.

252

M.T. Elliott et al. / Journal of Neuroscience Methods 177 (2009) 250257

Fig. 3. A diagram showing the steps involved from setting up an experiment in MatTAP to running the analysis on the acquired data using the three provided modules. A
User Action is where the user interacts with toolbox; Background Activity is where the toolbox automatically executes a task after a user action.

independent metronomes, which are fully adjustable for interval


frequency, tone frequency, tone duration, length of synchronisation period and length of continuation period. Additionally, jitter
can be added to the metronome interval and a phase shift in the
metronome can be inserted at individually chosen intervals. External stimuli may be driven using the associated timing pulse output
in analogue form (sinusoidal wave, typically used to generate audio
tones or tactile vibrations) or digital form (0/1 V binary pulse, typically used as a trigger signal for external stimuli). Up to two input
channels can be congured to capture responses from any sensor
device able to produce analogue or digital voltages within the range
of the utilised data acquisition card. Typically this will be 5 V at 12
or 16 bits, representing a resolution of 2.44 or 0.15 mV respectively.
Second, a built in le manager saves the data captured from
each trial as separate, sequentially numbered .mat les in a predetermined directory structure, enabling easy post-processing and
analysis of the experimental data.
Finally, an analysis module is provided that can be used to
process the raw data les automatically, extract onset times and
calculate inter-response intervals and asynchronies. Fig. 3 provides
a step-based view of how the MatTAP modules are used collectively to run a timing or synchronisation experiment. Section 2
of this article discusses the operation of these modules in more
detail.
1.2. Availability and requirements
MatTAP can be downloaded at no cost from http://www.
snipurl.com/mattap. The software is released under the GNU Public License and is provided without warranty. The MatTAP GUI is
started by typing mattap vx xx in the MATLAB command window
where the version number downloaded should replace the x xx.
MatTAP has the following system requirements:
MATLABTested on versions 7.0 onwards (i.e. 2006a/b, 2007a/b).
MATLAB Data Acquisition Toolbox.
Data acquisition card supported by MATLAB Data Acquisition
Toolbox (e.g. Advantech, Measurement Computing, and National

Instruments), with a minimum of two analogue output channels


and two analogue input channels.
The MATLAB Data Acquisition Toolbox is currently only available
for workstations running Microsoft Windows. Therefore the use of
MatTAP on other platforms, such as Apple OS X or Linux machines,
is dependent on the future development of a platform independent
version of Mathworks Data Acquisition Toolbox.
2. Methods
2.1. Metronome control
The diversity of timing experiments previously undertaken
highlights the need for a tool that provides a high level of exibility
in the parameters that dene a metronome. The metronome section
of MatTAPs GUI (Fig. 4: Metronome page) allows the generation
of up to two simultaneous metronomes dened by the parameters
shown in Table 1. Properties of the metronome can be controlled
and customised on a per-trial basis by adjusting the parameters
manually using the GUI (Fig. 4; A). Alternatively, MatTAP is able to
read in a pre-determined set of parameters on a trial-by-trial basis
using values stored in a comma separated variable (CSV) le (Fig. 4;
B). By doing so, an experimenter can create a protocol for each trial
of the experiment using software such as Microsoft Excel and easily import the data into MatTAP to automate randomisation when
conducting the experiment.
Using the dened parameters, MatTAP exploits MATLABs vector
and matrix manipulation abilities to produce an output sample vector containing the metronome denition for the whole trial. Each
vector element represents an output sample (output at the designated sampling rate) in binary form, i.e. square pulses set high at 1 V
and low at 0 V. The pulses are set high to identify the metronome
onset and duration. This can be used as a trigger pulse for any external stimulus being used. A secondary vector is generated in parallel,
replacing the square pulses with sinusoidal waveforms (5 to 5 V)
at the chosen tone frequency. This is typically output to a speaker
via an amplier to generate an auditory tone.

M.T. Elliott et al. / Journal of Neuroscience Methods 177 (2009) 250257

253

Fig. 4. The user interacts with MatTAP using two GUI screens, File and Metronome. The Metronome page allows the user to fully dene one or two metronomes, either
manually (A) or via a trial control script (B). The File page allows the user to dene a new experiment, lists trials within an experiment (C) and provides a basic plot of the
raw data from a chosen trial (D). The analysis module is also called from the File page (E).

The two vectors are converted to physical output signals using


data acquisition hardware. Data acquisition cards (DAQ) are capable
of highly accurate input and output sampling that is independent
of the PC hardware and software used to generate the vectors. A
default script is supplied for use with National Instruments cards
(NI Corporation, TX, USA). Devices used with MatTAP are required to
have available a minimum of two analogue input and two analogue
output channels. To compensate for the independence between the
sampling of the output and input channels on DAQ hardware, it is
recommended that the output timing pulse is fed back into one of

the DAQ inputs to ensure the difference between metronome onsets


and the associated responses are recorded with the highest level of
accuracy (see Fig. 2).

3. Parameter scripts
With the exception of phase shift insertion, MatTAP is able to
import comma separated variable les to automatically set the
parameters described in Table 1 on a trial-by-trial basis. This allows

Table 1
MatTAP allows exible metronome generation to allow a wide range of experimental protocols to be implemented. This table lists the parameters that can be set using the
MatTAP GUI.
Parameter

Description

Sample frequency
Tone frequency

Controls the input and output sampling frequency of the data acquisition card.
The frequency of the tone emitted when using the analogue metronome output. This is typically used to set the pitch of an audio output or vibration
frequency of a tactile stimulus.
The inter-stimulus interval (ISI), i.e. time between the onsets of the metronome tones. For a regular metronome this value is a constant. However,
MatTAP allows variability in the timing of individual metronome pulses. In the latter case this value corresponds to the mean of the distribution.
In the case of a variable metronome, this parameter controls the standard deviation of the normal distribution from which ISIs are randomly selected.
If the metronome is regular (xed) this parameter is ignored.
The duration in milliseconds of each metronome pulse.
The number of metronome pulses to be output in the trial (the synchronisation phase).
The duration (in seconds) of the continuation phase (metronome suppressed). Synchronisation pulses are still emitted during this period, however, no
analogue output is produced. If the continuation phase is set to greater than 0, then a high pitched tone (2 tone frequency) is emitted at the end of
this period to mark the end of the trial.
The temporal offset (in milliseconds) between the rst (M1) and second (M2) metronome if a second metronome is used. 0 would mean the
metronomes have the same phase. A negative offset indicates that the mean ISI of M2 leads M1, whereas a positive offset would produce a mean ISI of
M1 that leads M2.
Insert a phase shift before one of the metronome pulses. This lets the experimenter increase or decrease a single ISI by a xed amount. All
corresponding ISIs return to their standard period such that the metronome is phase shifted.

Mean ISI
S.D. ISI
Tone duration
No. of stimuli
Silence

Offset to M1

Insert phase shift

254

M.T. Elliott et al. / Journal of Neuroscience Methods 177 (2009) 250257

Fig. 5. MatTAP can calculate the asynchronies between the onset of a participants response and the metronome onset. The owchart above shows how the algorithm aligns
the response onsets such that there is always one response corresponding to a metronome onset.

trials to be randomised or presented in a chosen sequence. Parameter scripts can be produced in simple table format using software
such as Microsoft Excel, with each row of the table representing a
trial and the column relating to the described parameters. Fields can
be manually overwritten using the MatTAP GUI if required, and trials can be freely navigated backwards and forwards once the script
has been loaded.
3.1. Analysis
MatTAP includes an analysis module (Fig. 4; E) to process the
raw data from each trial in order to determine the onsets of (i) the
metronome pulse and (ii) the participants response. Having identied movement onsets, the software calculates the inter-response
intervals (IRI) between successive movements of the participant
and the asynchronies (timing errors) between the participants
responses and the metronome. Below we describe the algorithms
used in the analysis module.
4. Onset detection algorithm
The appropriate algorithm for onset detection can be very signal
specic, depending on the nature of the response and the type of
sensor used to capture it. For this reason MatTAP allows bespoke
algorithms to be developed for onset detection without requiring
changes to other parts of the MatTAP code. In particular, a selfcontained function is used to extract the onsets from the captured
data. This function takes the raw data as an input parameter and
returns a vector of onsets to the main MatTAP program. A default
algorithm is included in the package that provides a means of capturing nger taps from a surface-based sensor. However, MatTAP
has successfully been used with more sophisticated algorithms
designed to extract onsets from motion-captured arm movements
and forces measured by a force-transducer. The default algorithm
classies an onset by rst identifying a point where the current
data value exceeds a specied threshold voltage (default: 0.2 V),
with the previous value having been noted as below this threshold. To avoid false detections, baseline offsets are subtracted and
hysteresis techniques are used to stop effects of noise around the

threshold, while the detected onset is discarded if the time elapsed


since a previous positive detection is less than half the metronome
period. In Section 8, we validate this method through comparison
with a manual observation approach.
5. Asynchrony calculation
The asynchrony calculation employs an algorithm which nds
the shortest distance between tap onsets and each metronome
onset. A distance matrix is formed by calculating the squared
difference between each metronome onset and each response
onset. The algorithm shown in Fig. 5 is then used to align each
metronome onset to an appropriate response onset. The resulting output is a two column matrix which has an equal number
of rows as there are metronome onsets. The rst column consists of the metronome onset times, the second column contains
the associated response onset time. If a participant misses a tap,
then a NaN (Not a Number) value is inserted into the position
corresponding to that metronome onset. Similarly, multiple taps
during a single interval are dealt with by only keeping the closest tap onset and discarding the remainders.1 Asynchronies are
calculated by subtracting the response onset times from the corresponding metronome onset times. When multiple metronomes are
used and/or multiple responses are captured, then the asynchrony
is calculated for each responsemetronome combination (up to a
maximum of two metronomes and two responses).
6. Interval calculation
To calculate the inter-response intervals (IRI) or the interstimulus intervals the appropriate aligned onset vector is taken and
split into two new vectors:
Vector A consists of onsets (1:end-1)
Vector B consists of onsets (2:end)
1
In some cases this method can enhance the perceived performance of a participant if they were producing many multiple taps or missing taps. However, for most
trials where missed or multiple taps occur rarely, the described algorithm provides
an efcient method for aligning responses to the metronome beats.

M.T. Elliott et al. / Journal of Neuroscience Methods 177 (2009) 250257

255

The resulting interval vector is calculated as Vector B Vector


A. By using the aligned onsets, missed and double taps are removed
and only valid intervals are calculated. Intervals are calculated for
each metronome used and each response captured (up to a maximum of two metronomes and two responses).

that requires the insertion of small perturbations in the metronome


and accurate analysis of responses and asynchronies to observe the
effect.

6.1. File management

The accuracy of the raw data capture and generation is determined by the sampling rate used and ultimately the DAQ hardware
used. For example, a sample rate of 10,000 samples per second
would provide a temporal accuracy of up to 0.1 ms. Most modern
DAQ hardware devices are capable of maximum sampling rates of
hundreds of kilo-samples per second and hence it can be seen that
potentially MatTAP is many more times accurate than any other
previous synchronisation research software available. Equally, the
use of analogue data acquisition to capture responses enables accurate amplitude measurements as well as temporal ones. Again,
this is dependent on the DAQ hardware used, a 16-bit DAQ with
a voltage range 010 V would provide an amplitude resolution
of around 153 V, while a 12-bit DAQ would have a resolution
of 2.4 mV. Given the appropriate sensor, recording the amplitude
could, for example, be used to measure the level of force applied in
a tap.
To validate the MatTAP system as a whole, a test was set up
to compare the values obtained using the algorithms described
above in comparison to a method that was independent of the
hardware and software used by MatTAP. Using an oscilloscope (Agilent 54621D, Agilent Technologies Inc., CA, USA) simultaneously
with MatTAP and National Instruments USB-6229 data acquisition hardware to capture real experimental data, the metronome
synchronisation pulse and the participants corresponding tap
response were examined by splitting the signal to both the DAQ
(MatTAP) and oscilloscope inputs.
Data from a typical synchronisationcontinuation experiment
were used in which participants were instructed to tap their index
nger in synchrony with an auditory metronome producing beats
at regular 500 ms intervals. Single trials were chosen randomly
from three participants datasets. Using ve consecutive tap-pulse
events from the three trials, the asynchronies were calculated
by eye on the oscilloscope using the built in cursor function to
calculate the difference between tap onset time and metronome
onset time (3 volunteers; time-base: 20 ms/div; cursor resolution: 0.1 ms). The same data were processed using the analysis
module in MatTAP after being captured at a sampling frequency
of 10 kS/s.
The variability of the onset detection by the MatTAP module was contrasted to that of three human observers asked to
classify movement onsets using the oscilloscope. To do this, the
MatTAP asynchrony values were subtracted from the mean asynchrony measurements produced by the three human observers.
The mean and standard deviation of the resulting residuals were
recorded. The same method was then used to calculate the differences between each individuals measurements and the mean of
the measurements recorded by the other two observers. The standard deviation of the differences between MatTAP (0.27 ms) and the
manual measurements (Volunteer 1: 0.29 ms; Volunteer 2: 0.26 ms;
Volunteer 3: 0.27 ms) is comparable to that found between volunteers. There is a slight positive bias in the mean difference (MatTAP:
0.21 ms; Volunteers: 0.08, 0.10, 0.18 ms). This arises as MatTAPs
algorithm denes the onset threshold as 0.2 V above zero whereas
the volunteers were likely to select the onset on the oscilloscope
at a point lower than this value. However, this bias is negligible in
relation to the asynchrony measurements, which are typically two
orders of magnitude larger (Aschersleben, 2002). Furthermore, this
bias is systematic, meaning that relative measures of asynchrony
are unaffected.

The le manager (Fig. 4; File page) enables the structured


control of the data les obtained from each experimental trial.
MatTAP automatically creates a new directory when a new experiment is created by the user, placing this new directory under
the current selected le path. The directory is identied by the
experiment name entered prexed by tt , allowing MatTAP to
recognise its own generated le structures. Further sub-directories
are created within the experimental directory to store raw data
and onset/analysis data. Files generated within these directories
are named identically to the experiment name post-xed with a
le type identier (rd, raw data; ons, onsets) and a trial number. All
previously dened experiments found on a chosen path are shown
in the Experiment/Subject list box (Fig. 4; C).
7. File contents
Initially, MatTAP generates an individual le for each completed
trial that is stored in the raw data folder, with each trial automatically numbered sequentially. Trial les are stored as MATLAB .mat
les that contain several variables. Primarily, the raw data captured by the data acquisition card is held in this le. This is the
unltered and unprocessed data from the primary metronome and
the data captured by the sensors recording subject responses. Second a struct variable is used to store all the metronome parameters
(Table 1) dened for the given trial. Finally, the generated synchronisation pulse vectors are stored for both the primary and, if used,
the secondary metronome.
Executing the analysis module generates another set of les,
each associated with the individual trials. These les are stored in
the onsets folder as .mat les. Each le contains the extracted onset
times for both the metronome pulses and corresponding subject
responses, the calculated asynchrony (timing error) between each
metronome and response onset and the inter-response intervals
between consecutive subject responses. Akin to the raw data les,
a struct variable is provided containing the metronome parameters
set for the trial.
Once all the trials of an experiment have been analysed, a further
le is produced containing summary statistics. Again, this is a .mat
le which contains two MATLAB struct variables: sp, data relating
to the synchronisation phase of the trials and cp, data relating to
the continuation phase of the trials. Each struct variable contains a
set of variables providing summary statistics for each trial. These
include mean and standard deviation values for asynchrony and
IRI together with important metronome parameters which may be
used for comparison across trials.
8. Results
Here we validate MatTAPs ability to generate metronomes, capture responses and analyse tap responses accurately by presenting
results from three validation experiments. We rst examine the
system as a whole, comparing the values obtained using the algorithms described previously to a method that was independent of
the hardware and software used by MatTAP. Second, we identify
metronome and tap onsets manually within MATLAB using a cursor
method on plots of the data. Finally, we replicate a published study

8.1. System accuracy

256

M.T. Elliott et al. / Journal of Neuroscience Methods 177 (2009) 250257

Table 2
Mean and S.D. of measurements between observers averaged over three trials.
Observers used a cursor method to pick event onsets from plots of data captured
using MatTAP and a National Instruments USB-6229 data acquisition card. The
results were compared to the onsets calculated using the MatTAP analysis module
(shown in italics).
Observer

ISI

IRI

Asynchrony

Mean (ms)

S.D. (ms)

Mean (ms)

S.D. (ms)

Mean (ms)

S.D. (ms)

1
2
3
4

0.00
0.00
0.00
0.00

1.33
2.18
1.03
1.19

0.03
0.08
0.05
0.16

5.61
4.48
4.62
4.79

1.66
0.62
1.14
2.17

4.13
3.69
3.58
3.72

MatTAP

0.00

0.77

0.04

3.44

1.74

2.64

8.2. Validating the analysis module


Having established the validity of the hardware and software
conguration, we wished to evaluate MatTAPs analysis module further. In particular, we used a common hardware setup (National
Instruments USB-6229), and analysed the data captured via MatTAP using both the MatTAP analysis module and a manual method
that involved using a mouse cursor to indicate the location of movement onsets (method implemented in MATLAB). As in the previous
experiment, experimental participants were required to tap their
index nger to an auditory metronome producing regular beats at
500 ms. Three raw data trial les were chosen at random from three
participants. Four volunteers were then asked to identify the onset
times of both the metronome and tap recordings using the cursor
function built into the MATLAB plotting window. The chosen onset
points were used to calculate the inter-stimulus intervals (ISI; the
metronome intervals which should remain constant across a trial),
inter-response intervals (IRI; the intervals between tap responses)
and the asynchronies. Having obtained these values, we considered
the differences between observers and the MatTAP analysis module (as described for the previous experiment), with the results
presented in Table 2. The obtained data suggested that the MatTAP
analysis module performed better than any of the human volunteers asked to classify movement onsets. In particular, humans had
larger asynchrony biases (means) and greater variability (S.D.). The
results show that the MatTAP analysis does not generate any greater
bias than using the cursor method and furthermore, the analysis
module has a lower variability than the observers for all calculations.
8.3. Replication of a previous study
As a nal test of MatTAP, we replicated a previously published
experiment that required ne control over both the metronome
and accurate data acquisition to capture subtle changes in the
synchronisation performance of human subjects tapping to an
auditory metronome. This experiment was based on that by Repp
(2000), who investigated the ability of participants to correct their
movement synchronisation following a subtle phase shift in the
metronome that could be detectable or subliminal. Repp used MIDI
equipment to run the experiment. Here we used MatTAP along
with a National Instruments USB-6229 data acquisition and a forcetransducer to capture the responses.
Six participants were requested to tap in synchrony to a
metronome (beats, 30; interval, 500 ms; tone frequency, 700 Hz;
tone duration, 30 ms) but were not informed that a phase perturbation would be inserted. Phase shifts of 6, 8, 10 and 25 ms were
inserted at a random point between the 10th and 20th metronome
onset, resulting in a single interval that was longer than those
previously presented, and requiring participants to adjust their

Fig. 6. Participants tapped in time to a regular metronome subjected to a single


phase shift (interval lengthened by either 6, 8, 10 or 25 ms). Relative asynchrony was
calculated by measuring the pre-shift mean asynchrony and subtracting this value
from all asynchrony values in a trial. The plots show relative asynchrony averaged
across participants for each phase shift condition. The effect of the phase shift and the
corresponding corrections are clear from the results and conrm MatTAPs ability
to generate accurate metronomes and concurrently record the responses with equal
precision.

movement synchronisation. Participants completed a total of forty


trials (i.e. ten trials per phase shift condition) for the experiment.
The MatTAP analysis module was used to extract the tap and
metronome onsets from the experimental data and from those,
calculate the asynchronies for each trial. To determine whether
participants corrected for the phase shift, we calculated relative
asynchrony by subtracting the pre-shift mean asynchrony from all
the asynchrony values for a trial (Repp, 2000). Fig. 6 shows the
resulting between-subject mean relative asynchrony for each condition. The effect of the phase shift on participants asynchrony at
the point of occurrence (referenced by the time 0) can be clearly
seen. Correction to the perturbations is evident across conditions,
with recovery occurring within the two proceeding taps, regardless

M.T. Elliott et al. / Journal of Neuroscience Methods 177 (2009) 250257

of the phase shift magnitude. The results show, from a methodology aspect, that MatTAP can accurately produce phase shifts down
to very small temporal magnitudes and record the response to the
manipulated stimulus with equal precision.

257

authors thank Dagmar Fraser for his technical input and testing
of the toolbox and Leif Johannson for his suggestion for the asynchrony calculation algorithm.
References

9. Discussion
Research into sensorimotor synchronisation is an active area
of investigation that lacks a widely available software tool which
allows researchers exibility in experimental control and analysis.
MatTAP has been provided as a free toolbox for MATLAB, a widely
used and understood programming tool in the research community. The toolbox has been designed to provide a high level of
exibility in producing a metronome output, uses external data
acquisition hardware to ensure timing accuracy is not impinged
upon by PC multi-tasking operating systems and provides a structured le management system. We have taken the protocols used
in previous studies to dene a set of parameters that has resulted
in a metronome generation tool that allows phase shift insertion
(Repp, 2000, 2001, 2002), adjustable tone duration (Vos et al., 1995),
adjustable tone pitch (Keller and Repp, 2005) and the option to
change the metronome reliability by adding jitter to the intervals (Repp and Penel, 2004). Furthermore, we provide the ability
to record up to two response channels (Drewing and Aschersleben,
2003; Chen et al., 2005; Doumas and Wing, 2007), as well the
option to generate up to two simultaneous metronomes, which
allow presentation in either single or dual modalities (Bertelson
and Aschersleben, 2003; Kato and Konishi, 2006). Finally, we have
demonstrated the validity of the MatTAP setup and in particular
shown that the analysis module provided will produce reliable
analysis of the data to the required sub-millisecond accuracy without adding any signicant measurement noise.
MatTAP currently has a few limitations, that mainly reect the
extent to which the MATLAB Data Acquisition Toolbox can communicate with the acquisition hardware. Notably, real-time response
feedback (Mates and Aschersleben, 2000; Finney and Warren,
2002) is not currently implemented in MatTAP thus, it is not possible to adapt metronome pulses within a trial (Repp and Knoblich,
2007). MatTAP is also dependent on the investigators access to
data acquisition hardware as the software cannot be run using a PC
alone. However, the cost of data acquisition hardware is currently
relatively low in relation to other items of lab equipment, and is
comparable to that of MIDI hardware and software investment. Further, the exibility of MatTAP allows a wide range of sensors to be
used, from simple switches to high accuracy force-transducers. The
nature of MATLAB means that in addition to the supplied functionality, users can change anything from a single value to the whole
analysis module to suit their requirements. It is hoped that this will
allow scalability of the toolbox, with the opportunity to interface to
other appropriate MATLAB toolboxes (e.g. The Psychophysics Toolbox, Brainard, 1997) or to develop further integrated modules in
the future.
Acknowledgments
This work was supported by grants from the Biotechnology
and Biological Sciences Research Council [C520620, EO09565]. The

Aschersleben G. Temporal control of movements in sensorimotor synchronization.


Brain Cogn 2002;48:6679.
Batalha A, Macara A. Rhythm capacity: comparison between professional dancers
and dance students. In: International Symposium on Performance Science; 2007.
p. 2934.
Bertelson P, Aschersleben G. Temporal ventriloquism: crossmodal interaction on the
time dimension: 1. Evidence from auditory-visual temporal order judgment. Int
J Psychophysiol 2003;50:14755.
Billon M, Semjen A, Cole J, Gauthier G. The role of sensory information in the production of periodic nger-tapping sequences. Exp Brain Res 1996;110:11730.
Brainard DH. The Psychophysics Toolbox. Spat Vis 1997;10:4336.
Chen JT, Lin YY, Shan DE, Wu ZA, Hallett M, Liao KK. Effect of transcranial magnetic
stimulation on bimanual movements. J Neurophysiol 2005;93:5363.
Collyer CE, Church RM. Interresponse intervals in continuation tapping. In: Rosenbaum DA, Collyer CE, editors. Timing of behavior: neural, psychological, and
computational. MIT Press; 1998.
Doumas M, Wing AM. Timing and trajectory in rhythm production. J Exp Psychol
Human 2007;33:44255.
Drewing K, Aschersleben G. Reduced timing variability during bimanual coupling:
a role for sensory information. Q J Exp Psychol-A 2003;56:32950.
Elliott MT, Welchman AE, Wing AM. Being discrete helps keep to the beat. Exp Brain
Res 2008, doi:10.1007/s00221-008-1646-8, in Press.
Finney SA. FTAP: A Linux-based program for tapping and music experiments. Behav
Res Methods Res Ins C 2001;33:6572.
Finney SA, Warren WH. Delayed auditory feedback and rhythmic tapping: evidence
for a critical interval shift. Percept Psychophys 2002;64:896908.
Gentry S, Feron E. Musicality experiments in lead and follow dance. In: Systems,
Man and Cybernetics, 2004 IEEE International Conference; 2004. p. 9848.
Heckroth J. Tutorial on MIDI and music synthesis; 2001. http://www.midi.org/aboutmidi/tutorial/tutor.shtml. Visited 5 Nov 2008.
Helmuth LL, Ivry RB. When two hands are better than one: reduced timing variability
during bimanual movements. J Exp Psychol Human 1996;22:27893.
Inui N, Ishida T, Katsura Y. Effects of sensory feedback on variations on intertap
interval and force in nger-tapping sequences. Percept Motor Skill 2001;92:
795802.
Kato M, Konishi Y. Auditory dominance in the error correction process: a synchronized tapping study. Brain Res 2006;1084:11522.
Keller PE, Knoblich G, Repp BH. Pianists duet better when they play with themselves:
on the possible role of action simulation in synchronization. Conscious Cogn
2007;16:10211.
Keller PE, Repp BH. Staying offbeat: sensorimotor syncopation with structured and
unstructured auditory sequences. Psychol Res 2005;69:292309.
Mates J, Aschersleben G. Sensorimotor synchronization: the impact of temporally
displaced auditory feedback. Acta Psychol 2000;104:2944.
Repp BH. Compensation for subliminal timing perturbations in perceptual-motor
synchronization. Psychol Res 2000;63:106.
Repp BH. Phase correction, phase resetting, and phase shifts after subliminal
timing perturbations in sensorimotor synchronization. J Exp Psychol Human
2001;27:60021.
Repp BH. Phase correction in sensorimotor synchronization: nonlinearities in voluntary and involuntary responses to perturbations. Hum Mov Sci 2002;21:137.
Repp BH. Sensorimotor synchronization: a review of the tapping literature. Psychon
B Rev 2005;12:96992.
Repp BH, Knoblich G. Toward a psychophysics of agency: detecting gain and loss of
control over auditory action effects. J Exp Psychol Human 2007;33:46982.
Repp BH, Penel A. Rhythmic movement is attracted more strongly to auditory than
to visual rhythms. Psychol Res 2004;68:25270.
Schulze HH, Cordes A, Vorberg D. Keeping synchrony while tempo changes:
accelerando and ritardando. Music Percept 2005;22:46177.
Stevens LT. On the time sense. Mind 1886;11:393404.
Thaut MH, Miller RA, Schauer LM. Multiple synchronization strategies in rhythmic
sensorimotor tasks: phase vs period correction. Biol Cybern 1998;79:24150.
Vos PG, Mates J, van Kruysbergen NW. The perceptual centre of a stimulus as the
cue for synchronization to a metronome: evidence from asynchronies. Q J Exp
Psychol-A 1995;48:102440.
Wing AM, Kristofferson AB. The timing of interresponse intervals. Percept Psychophys 1973;13:45560.

Vous aimerez peut-être aussi