In this chapter we describe four examples: 1) a closed-set identification task, 2) an adaptive speech in noise identification task, 3) an adaptive just noticeable difference task (gap detection), and 4) same as 3, but modified to the attention span and interest of young children. Each example consists of 1) a general description, 2) the concept, and 3) the implementation in XML.
It is advised to run the experiment before reading the details. The experiment files are stored in the APEX 4 directory under in the APEX 4 folder, together with sound files and figures of the respective experiments. Note again: if the experiment file has the extension “.apx” it remains an XML file that can be edited with OxygenXML. The results file will automatically have the extension “.results”. (needs to be done).
Simple calibration use
The experiment shows how to calibrate using the calibration screen. You can calibrate the left and right channel seperately.
Use the calibration element with a calibration profile and an id for each channel (left and right)
example of automatic calibration with B&K SLM 2250 plugin
calibrate left and right ear at the start of the experiment
The <soundlevelmeter> block specifies how to use the sound level meter. If the sound level meter is not found, the regular calibration dialog is shown.
example of automatic calibration with dummy SLM plugin
Allow to experiment with automatic calibration without having a sound level meter handy
The <soundlevelmeter> block specifies how to use the sound level meter.
Automatic calibration using interface to sound level meter
13-loudspeaker sound source localisation experiment, with automatic calibration through the interface to the B&K SLM2250 Sound Level Meter
Each channel of the sound card has a gain. These gains are specified in the <calibration> element. Here the <soundlevelmeter> block specifies how to use the sound level meter. If the sound level meter is not found, the regular calibration dialog is shown.
Shows use of child mode: intro and outro movies, child panel
The experiment starts after a silent introductory movie. The child needs to find the animal in one of the three cars. One car has a different sound than the two other cars.
Flash elements are introduced that read movie files with extension .swf
Demonstration of extra movies (snail movie)
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three snails. One snail has a different sound than the two other snails. Childfriendly feedback is provided.
Flash elements of snails
Shows use of child mode: intro and outro movies, child panel, progressbar, shortcuts.
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. The progressbar and feedback are also childfriendly.
Flash elements are introduced that read movie files with extension.swf, child panel activated by <panel> in <childmode> (<screens>) + button shortcuts are introduced (button 1 = 1, button 2 = 2, button 3 = 3)
Shows use of child mode: intro and outro movies, child panel, progressbar for L34
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. The progressbar and feedback are also childfriendly.
Flash elements, L34 implementation in <devices>
Shows use of child mode: without intro and outro movies, but with the normal panel
The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. The same progressbar is used as in adult experiments, feedback is childfriendly.
Flash elements, same panel as adult experiments (no childmode selected in <screens>)
Shows use of flash movies, but without the actual childmode (no childpanel)
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. The same progressbar is used as in adult experiments. Feedback is childfriendly.
flash elements, same panel as adult experiments (no <panel>reinforcement.swf</panel> in childmode)
Shows use of child mode without special feedback movies
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs.
Flash elements, no special feedback with flash elements provided
Shows use of child mode: intro and outro movies, but without the actual childmode (no childpanel)
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. Feedback is childfriendly.
Flash elements, no panel or progressbar (<showpanel>false</showpanel> and <progressbar>false</progressbar>)
Shows use of child mode: intro and outro movies, but with the normal panel
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. The same progressbar is used as in adult experiments. Feedback is childfriendly.
Flash elements, same panel as adult experiments (no childmode selected in <screens>)
Shows use of child mode: instead of waiting a specific time, 0 is specified as length for intro, outro and feedback, which makes apex wait for the movies to finish.
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. The same progressbar is used as in adult experiments.
Flash elements, same panel as adult experiments (no childmode selected in <screens>), length of intro and outro is specified in <childmode>
Shows use of child mode with shortcut keys
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. The progressbar and feedback are also childfriendly.
Flash elements, button shortcuts are introduced (leftarrow = 1, downarrow = 2, rightarrow = 3)
Shows use of child mode: intro and outro movies, but without the child panel; also has button shortcuts to skip the intro or outro movie
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. Feedback is also childfriendly.
The F7 shortcut can be used to skip the intro and outro movies when <allowskip>true</allowskip> in <general>. Flash elements, button shortcuts are introduced (leftarrow = 1, downarrow = 2, rightarrow = 3, ’s’ = skipping intro or outro movie),
Skip intro or outro movie by hitting ’s’ on the keyboard is disabled.
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. Feedback is childfriendly.
Flash elements, skipping is disabled by setting <allowskip>false</allowskip> in <general>
Shows use of child mode: intro and outro movies, child panel, progressbar
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three snakes. One snake has a different sound than the two other snakes. The progressbar and feedback are also childfriendly.
Flash elements of snakes, child panel activated by <panel> in <childmode> (<screens>)
Shows use of child mode, with no shortcut keys and waiting for start before every trial
The experiment starts after a silent introductory movie. The child needs to find the stimulus in one of the three eggs. One egg has a different sound than the two other eggs. The next trial is only presented after selecting Start from the Experiment menu or pressing F5.
Flash elements + <waitforstart> function in <general>
The use of ALL connections
Monaural presentations of digit 1. Level is changed by clicking the buttons quieter and louder
Connections defines how the different datablocks and filters are routed to the output device
Try to autoconnect a stereo wavfile to a mono wavdevice by name
Digits are presented dichotically, you can give a verbal response
Connections are used to route different datablocks and filters to an output device
Try to autoconnect a stereo wavfile to a mono wavdevice using mode=regexp
Dichotic presentation of digits, you can give a verbal response
Connections are used to route different datablocks and filters to an output device
Try to autoconnect a stereo wavfile to a mono wavdevice using mode=wildcard
Dichotic presentation of digits, you can give a verbal response
Connections are used to route different datablocks and filters to an output device
Test the use of channel -1
If something is connected to channel -1 of the output device, it should be ignored, no output when button wrong is clicked
Connections are used to route filters to output devices
Plugincontroller
Gain of plugin controller varies according to user input
the democontroller is used here to demonstrate how a plugin controller can be implemented.
Combination of datablocks using sequential and simultaneous
Play datablocks similtaneously and sequentially
Using the <simultaneous> and <sequential> tags in <stimulus>, datablocks can be organised and reused.
Use the same datablock multiple times in a stimulus
The datablock wavfile “één” is played twice within one stimulus
set the number of replications of the datablock by setting the number of the loop, here it is <loop>2</loop>
demonstration of omission of device in datablock
When there is only one device in the experiment, it does not need to be explicitly mentioned in each datablock.
APEX will automatically assign the device to each datatblock
Use the same datablock multiple times in a stimulus
The datablock wavfile “één” is played four times within one stimulus
sequential datablocks within stimulus1
Combination of silence and signal for 1 stimulus presentation
The stimulus in this example contains first silence (a delay) before you hear “één”
Use sequential datablocks that include silence and wavfile/signals, e.g. also possible to put silence datablocks after the wavfile
Play datablocks simultaneously
Demonstrate the use of simultaneous datablocks in a stimulus
When datablocks are listed in the <simultaneous> element in <stimulu> they are played simultaneously
Show amplifier default parameters
the stimulus wd1.wav is played in the left ear, when you click the button ’play with default parameters’, the stimulus is played again with the same gain (=0) (10 trials)
fixed_parameters
Adapting device parameters: gain of device varies according to user input
the stimulus wd1.wav and noise are played simultaneously in the left ear, when you click the button ’higher’/’lower’, the stimulus and the noise are played again with a different gain for the noise (= gain + 2/- 2, see output box ’parameterlist’)
adaptiveProcedure: gain is adjusted with stepsize = 2
More complex processing, can be used for testing skips - 2 noise stimuli (sinus & wivineruis.wav) with different gains (filters)
When you click on ’wrong’ you hear in both ears two noise stimuli and in the left ear 2 times a sentence, the same happens when you click on the ’wrong’ button again
trainingProcedure, creating a sinus as noise-stimulus
Shows use of dataloop generator : uses the same datablock twice (for 2 different dataloops)
When you click on the button ’correct/wrong’, in both ears a noise stimulus is played and in the left ear ’one-two’(=stimulus1)/’silence-two’(=stimulus2) is presented - Dataloop: playing noise and according to the users input (correct/wrong) stimulus1 or stimulus2 is presented
2 dataloops: noise for trial1 and trial2
Shows use of dataloop generator - wivineruis.wav should play !not! continuously over trials (see filters - noisegen - apex:dataloop)
When you click on the button ’wrong/correct’, in both ears a noise stimulus is played and in the left ear ’silence-two(twee)’(=stimulus2)/’one-two(een-twee)’(=stimulus1) is presented
trainingProcedure - dataloop generator - continuous: false
Shows use of dataloop generator - wivineruis.wav should play continuously over trials (see filters - noisegen - apex:dataloop)
The noise is playing continuously over trials. When you click on the button ’dataloop - silence/dataloop - 1’, in both ears a noise stimulus is played and in the left ear ’silence-two(twee)’(=stimulus2)/’one-two(een-twee)’(=stimulus1) is presented
trainingProcedure - dataloop generator - continuous: true
Shows use of jump parameter of dataloop generator
Basegain of noise: 0 - Aapting device parameters - gain of device varies according to user input
Noise and a stimulus (one-een) are presented simultaneously in the left ear, when you click on ’higher/lower’, you hear again the noise and stimulus in the left ear but the gain of the noise is adjusted with +2/-2 (=stepsize, see output box)
adaptiveProcedure - stepsize of gain - adapt_parameter (Procedure)
example already somewhere else as well!
Example using the matlabfilter plugin.
The plugin will use matlab to process data, one buffer at a time. Note that you should make sure your system can find the Matlab eng library.
<plugin>matlabfilter</plugin> in <filters>.
Demonstrate scramblespectrum filter
The scramblespectrum filter will randomize the spectrum to reduce monaural spectral cues in a localisation experiment
parameters to the scramblespectrumfilter are specified in <filter>
Shows synchronisation for L34 using a soundcard pulse
When you click on send, a pulse is presented in your left ear
filters: generator makes a soundcard pulse => 2 channels of stereo file are mixed into output ch 0, the pulse goes to ch 1 (left ear)
Test of setting frequency parameter of sine generator - frequency of sinus varies according to user input
A sinus is playing in the left ear when you click on one of the 3 buttons. If you click on 100Hz/1000Hz/defaults, the frequency of the sinus changes to 100Hz/1000Hz/10 000Hz.
filter: 1 generator: sinus (10 000Hz) - 3 stimuli: 3x silence with adjusted parameters (frequency: 100Hz/1000Hz/no change) - continuous: false
Regression test for adapting device parameters - gain of device varies according to user input
A sinus is played in the left ear (sinus is played continuously over trials), when you click the button ’higher’/’lower’, the sinus is played again with a different frequency for the sinus (= frequency + 100Hz/- 100Hz, see output box ’parameterlist’)
adaptiveProcedure: frequency (adapt_parameter) is adjusted with stepsize = 100Hz - datablock/stimulus: silence
Regression test for adapting device parameters - gain of device varies according to user input
A sinus is played in the left ear. The sinus is played continuously over trial but when you click on ’higher/lower’ the sinus is played again but the gain of the sinus is adapted with +5/-5 dB.
adaptiveProcedure - datablock/stimulus: silence - filter: generator: sinus - continuous: true - adapt_parameter: gain - (!basegain has to be low enough otherwise there is clipping!)
Shows synchronisation using a soundcard pulse
When you click on ’play with default parameters’, a pulse is presented in your left ear simultaneously with a stimulus (wd1.wav - een/one)
datablock/stimulus + filter: generator makes a soundcard pulse (negative polarity)
Shows synchronisation for L34 using a soundcard pulse with a negative polarity (filter - pulsegen)
When you click on send, a pulse is presented in your left ear and a stimulus (datablock: _Input44_2.wav) is presented in your right ear
filters: generator makes a soundcard pulse with a negative polarity
Demonstration of vocoder plugin.
Play a sentence either vocoded or unvocoded
A vocoder-plugin filter has been added in the connections.
Regression test for training procedure - Output: number according to last input
When you click on the button ’play’: in the left ear/channel: “een”, is presented and in the right ear/channel: “twee”, 20dB louder compared to the left ear, is presented.
filter: amplifier => basegain (-10) + gain left channel(-10)/right channel(+10)
Regression test for fader (begin/end of stimulus is not abrupt)
When you click on the button ’play fade/play NO fade’, in both ears a sinus is presented with at the beginning of the stimulus a fade-in/NO fade-in (click)
filter: fader in begin (cosine) => length: 400ms, direction: in (fade-in: begin of stimulus)
Regression test for fader (begin/end of stimulus is not abrupt)
When you click on the button play fade/play NO fade’, in both ears a sinus is presented with at the beginning of the stimulus a fade-in/NO fade-in (click)
filter: fader(linear) => length: 400ms, direction: in (fade-in: begin of stimulus)
Regression test for fader (begin/end of stimulus is not abrupt)
When you click on the button ’play fade/play NO fade’, in both ears a sinus is presented with at the end of the stimulus a fade-out/NO fade-in (click)
filter: fader(cosine) => length: 400ms, direction: out (fade-out: end of stimulus)
Regression test for fader (begin/end of stimulus is not abrupt)
When you click on the button ’play fade/play NO fade’, in both ears a sinus is presented with at the end of the stimulus a fade-out/NO fade-in (click)
filter: fader(linear) => length: 400ms, direction: out (fade-out: end of stimulus)
Automatically save results to apr-file after experiment
Closed-set identification task with automatic saving of results
General - autosave
Exit experiment when finished
Closed-set identification task, exit after finish
General - exitafter=true
Get the datablock prefix from the absolute path
Closed-set identification task
datablocks uri_prefix full path
Get the datablock prefix from the main configfile
Closed-set identification task
source=apexconfig
Get the datablock prefix from the main configfile
Invalid prefix id specified: wavfile not found wd1.wav
source=apexconfig
Demonstrate the use of general/scriptparameters
Digits 1-7 are presented monaurally, you can click on a button to go to the next one
Scriptparameters - name=path, scriptparameters.js needed
Show results after experiment
When the experiment is finished and the results are saved, you can choose to see the results
Results - showafterexperiment=true
Error in XML file
Change small parameter right before the start of the experiment
GUI is shown with the element to be changed
Interactive
GUI to change some settings right before the experiment
GUI appears to set/change some settings
Interactive
GUI to change some settings right before the experiment
GUI appears to set/change some settings
The name of the subject, in <results>/<subject> is set from the interactive dialog that appears before the experiment is loaded.
Try to add wav filter to L34Device
Since it is not possible to add a wav filter to an L34Device, an error occurs
see filters and device
Test of synchronized bilateral CI setup
Test whether the stimuli are given from the first, the second or both L34 devices
Including two L34 devices, stimuli can be presented stimultaneously
Test of synchronized bilateral CI setup with pulse stimuli
Test whether the stimuli are given from the first, the second or both L34 devices
Including two L34 devices, stimuli can be presented stimultaneously
Try to parse invalid datablock, should return error
datablock does not exist in folder stimuli, running the experiment gives an error.
uri_prefix is used to find stimuli, invalid.aseq does not exist
Shows synchronisation for L34 using a soundcard pulse
2 channels of stereo file are mixed into output ch 0, the pulse goes to ch 1
use dummyDeviceType and wavDeviceType and check connections
Shows synchronisation for L34 using a soundcard pulse
2 channels of stereo file are mixed into output ch 0, the pulse goes to ch 1
use dummyDeviceType and wavDeviceType and check connections
Loudness balancing between two stimulation CI electrodes
Two signals are presented consecutively in the same CI, at two different stimulation electrodes. One electrode is the reference electrode and has a fixed current level, the comparison electrode has changing levels. The participant has to judge which signal is louder. An adaptive procedure is used to determine the balanced level.
Use of adaptiveProcedure, plugindatablocks, balancing.js needed
Use default map with current units between 1 and 255
See defaultmap
Use real map to check mapping
See defaultmap values
R126 is the clinical fitting software
Use <defaultmap> <from_r126/>
Test of synchronized bilateral CI setup with an RFGenXS
Test whether the stimuli are given on the first, the second or both channels
With an RFGenXS, stimuli can be presented stimultaneously
Change volume of CI stimuli (send simple XML file to L34 device)
Change the volume of the CI stimuli to 10,50,70 or 100 current units
Add variable parameter id=l34volume, see device: volume 100 is default
power-up test?
Closed-set identification of words in noise with figures
A word is presented in noise and the subject responds by clicking on one of the 4 figures on the screen, repeated 3 times. Initial SNR is set via interactive GUI.
full experiment
Gap detection
gap detection for children
Open set identification task
A word is presented in noise and the subject responds by typing the word, repeated 3 times. Initial SNR is set via interactive GUI.
Full experiment
Sentences in noise task
A sentence is presented in noise, the subject responds verbally, the test leader can indicatie whether the response was correct or incorrect, repeated 4 times. Initial SNR is set via interactive GUI.
Full experiment
Training for constant procedure
A stimulus is presented after the user had indicated the trial by pressing a button on the screen
apex:trainingProcedure
Change the channel of a connection + stimulus has gain
Click on the right (or left button) to hear the sound in your right ear (or left ear).
Training procedure, Fixed (stimulus) and variable parameters (channel) + possibility in code to change the gain of the stimuli with filter (amplifier)
Change the channel of a connection using a parameter
Click on the right (or left button) to hear the sound in your right ear (or left ear)
training procedure, Fixed (stimulus) and variable parameters (channel)
Change parameter (gain) of device channel
gain of device varies in BOTH channels according to user input (1 button = louder, 1 button = quieter)
adaptive procedure, fixed (stimulus) and variable (gain) parameters, stepsize of 2 dB
Change parameter (gain) of device channel
Gain of device varies in LEFT channel according to user input (1 button = louder, 1 button = quieter)
Adaptive procedure, fixed (stimulus) and variable (gain) parameters, stepsize of 2 dB
Change parameter (gain) of device channel
gain of device varies in BOTH channel according to user input (1 button = louder, 1 button = quieter) + gain is visible on the screen
adaptive procedure, fixed (stimulus) and variable (gain) parameters, stepsize of 2 dB, Parameterlists are introduced that show Left or Right gain on the screen
Change parameter (gain) of device channel
gain of device varies in RIGHT channel according to user input (1 button = louder, 1 button = quieter) + gain is visible on screen
adaptive procedure, fixed (stimulus) and variable (gain) parameters, stepsize of 2 dB, Parameterlists are introduced that show Left or Right gain on the screen
Change parameter (gain) of device channel
gain of device varies in LEFT channel according to user input (1 button = louder, 1 button = quieter) + gain is visible on screen
adaptive procedure, fixed (stimulus) and variable (gain) parameters, stepsize of 10 dB, Parameterlists are introduced that show Left or Right gain on the screen. Additionally there is a probe filter that saves the output to disk.
Demonstrate restoring parameter values
When a parameter is set from a stimulus, and subsequently a stimulus is played in which the parameter is not set, it should be restored to its default value
Parameter gain is set in stimulus1, and is not set in stimulus2. Therefore a gain of 0dB should be applied for stimulus2
Adjust noise manually while presenting speech and noise
gain of noise varies in right channel according to user input (1 button = arrow up, 1 button = arrow down) while the stimulus stays the same.
constant procedure, Fixed (stimulus) and variable (noise gain), stepsize of 1 dB, noise is generated by filter
Set parameters of fader
The fader filter allows to apply an up and down ramp to a channel
There are two faders in <filters, faderin and faderout. Their parameters are set from the stimuli.
1up-1down Adaptive procedure: Frequency of ups-downs is the same - Experiment stops after 6 reversals
When you click on the button ’correct or wrong’, you hear a stimulus ’wd1.wav (een/one)’ in both ears. When you click again, the gain of the stimulus decreases/increases according to the button (correct/false)
adaptiveProcedure - stop_after_type: reversals - nUp/nDown - adapt_parameter (gain: gain of stimulus) -
1up-2down Adaptive procedure: Frequency of ups-downs is NOT the same - Experiment stops after 6 reversals
When you click on the button ’correct or wrong’, you hear a stimulus ’wd1.wav (een/one)’ in both ears. When you click again, the gain of the stimulus StaysTheSame/Decreases/Increases according to the button (correct/false) and the number of ups and downs
adaptiveProcedure - stop_after_type: reversals - nUp/nDown - adapt_parameter (gain: gain of stimulus)
2up-1down Adaptive procedure: Frequency of ups-downs is NOT the same - Experiment stops after 6 reversals
When you click on the button ’correct or wrong’, you hear a stimulus ’wd1.wav (een/one)’ in both ears. When you click again, the gain of the stimulus StaysTheSame/Decreases/Increases according to the button (correct/false) and the number of ups and downs
adaptiveProcedure - stop_after_type: reversals - nUp/nDown - adapt_parameter (gain: gain of stimulus)
Stop after a specified number of presentations (3) - should in this case stop after 6 trials (presentation: every trial is presented once => 2 trials => 2x3 = 6)
When you click on the button ’correct or wrong’, you hear a stimulus ’wd1.wav (een/one)’ in both ears. When you click again, the gain of the stimulus StaysTheSame/Decreases/Increases according to the button (correct/false) and the number of ups and downs
adaptiveProcedure - stop_after_type: presentations - adapt_parameter (gain: gain of stimulus)
Error message because #presentations is not equal to #stop_after
Point of interest if you want to stop the experiment after some presentations! => #presentations = #stop_after
procedure: presentations - stop_after
Stop after a specified number of reversals (6) - changes between correct-false
When you click on the button ’correct or wrong’, you hear a stimulus ’wd1.wav (een/one)’ in both ears. When you click again, the gain of the stimulus Decreases/Increases according to the button (correct/false) and the stepsizes changes after 3 reversals
adaptiveProcedure - stop_after_type: reversals - adapt_parameter (gain: gain of stimulus) - stepsize: change_after: reversals
Stop after a specified number of trials (10)
When you click on the button ’correct or wrong’, you hear a stimulus ’wd1.wav (een/one)’ in the left ear. When you click again, the gain of the stimulus Decreases/Increases according to the button (correct/false)
adaptiveProcedure - stop_after_type: trials - adapt_parameter (gain: gain of stimulus)
Adjustment of stimuli with a pluginprocedure
There are 6 buttons:
adaptiveProcedure - stop_after_type: trials - adapt_parameter (gain: gain of stimulus)
Regression test for ADP - Experiment stops after 4 reversals
adaptive procedure, one of the following sequences are played: noise een noise, een noise noise, noise noise een => answer: one of the three sequences. Stepsize changes after 2 trials => stepsize determines the parameter ’snr’
adaptiveProcedure - adapt_parameter (snr: snr (order, not in dB) - intervals - stepsize determines the change in snr (1-2-3) not the value in dB
Regression test for ADP - Experiment stops after 10 reversals
adaptive procedure, one of the following sequences are played: noise een noise, een noise noise, noise noise een => answer: one of the three sequences. Stepsize changes after 2 trials => stepsize determines the parameter ’snr’
adaptiveProcedure - adapt_parameter (snr: snr (order, not in dB) - intervals - stepsize determines the change in snr (1-2-3) not the value in dB
Regression test - 4 Intervals - 4 Choices, select interval 2-3
Four intervals are possible= ’noise noise noise een’, ’noise noise een noise’, ’noise een noise noise’ and ’een noise noise noise’. However only possibility number “2” and “3” are selected
constantProcedure - intervals- count/possibilities: 4, select(ion): 2 and 3
Regression test for Intervals, Standard(reference signal), Uniquestandard(true/false = If uniquestandard is true and multiple standards are defined per trial, Apex will try to present another standard in each interval of the trial)
In each trial, the 3 standards should be used (uniquestandard = true)
constantProcedure - intervals- uniquestandard: true
Regression test - Different stimuli can occur during one trial (according to the difficulty of the experiment (’snr’) (- no connections or gain!)
adaptive procedure, one of the following stimuli are played: ’een’, ’twee’, ’drie’, ’vier’ or ’vijf’ => If you click correct/false the experiment becomes more difficult/easy corresponding with the ’snr’ parameter - the larger the values of snr, the easier the experiment
adaptiveProcedure - adapt_parameter (snr: snr (order, not in dB) - different stimuli (trial) - stepsize determines the change in snr (1-2-3-4-5) - changes afther 5 trials
Regression test - Different stimuli can occur during one trial (according to the difficulty of the experiment (’snr’)
adaptive procedure, one of the following stimuli are played: ’een’, ’twee’, ’drie’, ’vier’ or ’vijf’, each with a different gain => If you click correct/false the experiment becomes more difficult/easy corresponding with the ’snr’ parameter
adaptiveProcedure - adapt_parameter (snr: snr (order, not in dB) - different stimuli (trial) - stepsize determines the change in snr (1-2-3-4-5), gain(filters)
Shows how to start continuous filters etc before the first trial is presented
The noise is playing continuously over trials (dataloop) - the noise starts 5s before the first trial (presenting: wd1.wav: ’een’) begins
procedure: time_before_first_trial: in seconds - filters: dataloop - continuous: true
multiple stimuli per trial - one should be chosen randomly - 2 presentations (2trials => 2x2 = 4)
The experiment has 2 trials (trial1: button 1-2-3 - trial2: button a-b-c) => In trial1/trial2=> correct answer is always: button1,buttonb.
constantProcedure - 2 trials with !each! 3 different stimuli but with the !same! buttons
Click on the corresponding button - Stop after 2 presentations (2trials => 2x2 = 4)
The experiment has 2 trials with different stimuli (trial1: house - trial2: mouse) => In trial1/trial2 => correct answer is: house/mouse (stimulus is heard in the left ear)
constantProcedure - 2 trials with different stimuli corresponding with the buttons
Errormessage - fixed parameter with id=“test” not defined
example of an error message about an undefined fixed parameter of a stimulus
stimuli - fixed parameters
Regression test for heartrainprocedure.js
example of an error message about an undefined fixed parameter of a stimulus
stimuli - fixed parameters
Matching of stimuli and buttons - Different trials (+ answers) - 1 presentations (6 trials)
auditive stimulus 1 2 3 4 5 6 - input: buttons 1 2 3 4 5 6 => match the stimulus with the button
6 trials with each trial a different correct answer - 6 stimuli and 6 buttons - order: sequential
Matching of stimulus and button - 5 presentations (1 trial)
auditive stimulus in right ear ’1’ - input: buttons 1 2 3 4 5 6 => match the stimulus with the button (stimulus1 => button1)
1 trial - 6 stimuli and 6 buttons - 1 correct answer
skip = 2: Number of trials that will be presented before the actual presentations start.
skip=2 and presentations=2 => first 2 trials and then 2*6trials = 12 trials. If the order is sequential, the skipped trials will be the first skip trials from the trial list, repeated if necessary.
2 presentations - 6 trials - skip = 2 (6 stimuli - 6 buttons)
Demonstrate use of wait for start
The next trial is only presented after selecting Start from the Experiment menu or pressing F5.
<waitforstart> function in <general>
Matching of stimuli and buttons - Different trials (+ answers) - 1 presentations (6 trials)
auditive stimulus 1 2 3 4 5 6 - input: buttons 1 2 3 4 5 6 => match the stimulus with the button
6 trials with each trial a different correct answer - 6 stimuli and 6 buttons - order: random
skip = 3: Number of trials that will be presented before the actual presentations start.
skip=3 and presentations=2 => first 3 trials and then 2*6trials = 12 trials. If the order is random, the skipped trials will be picked from the trial list without replacement, repeating this procedure if necessary.
2 presentations - 6 trials - skip = 3 (6 stimuli - 6 buttons)
Input during stimulus is allowed
skip=3 and presentations=2 => first 3 trials and then 2*6trials = 12 trials. If the order is random, the skipped trials will be picked from the trial list without replacement, repeating this procedure if necessary.
Input during stimulus: true - trials with buttons (input) - stimuli (output)
1up-1down Kaernbach procedure: Frequency of ups-downs is the same - Up stepsize is 1, down stepsize is 7 - Experiment stops after 6 reversals
When you click on the button ’correct or wrong’, you hear a stimulus ’wd1.wav (een/one)’ in both ears. When you click again, the gain of the stimulus decreases/increases according to the button (correct/false)
adaptiveProcedure - stop_after_type: reversals - nUp/nDown - adapt_parameter (gain: gain of stimulus) -
Adaptation of multiple parameters (order(fixed) & gain(adapt))
Two buttons: louder - quieter => louder: increasing of order and gain with stepsize=2, quieter: decreasing of order and gain with stepsize=2 (see output box)
Adapt_parameter => order & gain - stepsize for gain(filter) & order(stimuli) = 2
Error message - parameter you want to be adapted is a fixed parameter (2nd adapt_parameter: order: is a fixed parameter)
error message: only first adaptive parameter can be a fixed parameter
Adapt_parameter => gain(adapt) & order(fixed)
Adaptation of multiple parameters: GainL & GainR
2 buttons: louder - quieter - when you click on louder/quieter the gain in right and left channel is increased/decreased with 2 dB (stepsize) - see output box
Adapt_parameter => gainL(adapt) & gainR(adapt)
Multiprocedure - 2 adaptiveprocedures with each their own parameters, procedure and trials
2 procedures => procedure1/procedure2: 1trial - button_correct/button_wrong - When you click correct, the experiment in the next trial of the same procedure becomes more difficult (you hear a higher number => larger value of snr = stimulus (twee, drie, vier, vijf: stepsize:1)
procedure => multiProcedure - larger_is_easier => snr(not in dB): larger value: easier (so if you click on the wrong_button => the experiment becomes easier)
Multiprocedure - 2 constantprocedures with each their own parameters, procedure and trials
2 procedures => procedure1/procedure2: 3 trials - button1/button4 - button2/button5 - button3/button6 but different stimuli in each trial (Match the stimulus with the button)
procedure => multiProcedure
Multiprocedure - 2 constantprocedures with each their own parameters, procedure and trials - 2 different choices of intervals
2 procedures => procedure1/procedure2: 1trial - 3intervals - Match the stimulus (place of stimulus within noise) with the correct button
procedure => multiProcedure - intervals/choices - 3 choices - standardstimulus:noise
Multiprocedure - 2 constantprocedures with each their own parameters, procedure and trials, #presentations
2 procedures => procedure1: 3presentations/1trial => 3x - 3intervals: Match the stimulus (place of stimulus within noise) with the correct button
procedure => multiProcedure - intervals/choices - standardstimulus:noise
Multiprocedure - 2procedures (1constant - 1training) with each their own parameters, procedure and trials
2 procedures => constantprocedure1: 4presentations/1trial => 4x - 3intervals: Match the stimulus (place of stimulus within noise) with the correct button
procedure => multiProcedure - intervals/choices - standardstimulus:noise - constantProcedure - TrainingProcedure
Multiprocedure - 2constantprocedures with each their own parameters, procedure and trials
2 procedures => constantprocedure1: order: onebyone - 4presentations/1trial => 4x - 3intervals: Match the stimulus (place of stimulus within noise) with the correct button
procedure => multiProcedure - intervals/choices - standardstimulus:noise - constantProcedure
Multiprocedure - 2constantprocedures with the SAME procedure, parameters and trials
2 procedures => constantprocedure1: 1presentations/3trials => 3x - 3buttons: 1-2-3 Match the stimulus (place of stimulus within noise) with the correct button
procedure => multiProcedure - constantProcedure
Multiprocedure-order! - 3constantprocedures with the SAME procedure, parameters and trials (different stimuli)
2 procedures => constantprocedure1: 2presentations/1trial => 2x - 2buttons: name of procedure & number: click on number (=1) if you have heard the stimulus (corresponding with the number)
procedure => multiProcedure: order: ONEBYONE - constantProcedure
Multiprocedure-order! - 3constantprocedures with the SAME procedure, parameters and trials (different stimuli)
2 procedures => constantprocedure1: 2presentations/1trial => 2x - 2buttons: name of procedure & number: click on number (=1) if you have heard the stimulus (corresponding with the number)
procedure => multiProcedure: order: RANDOM - constantProcedure
Multiprocedure-order - 2trainingProcedures with DIFFERENT procedure, parameters and trials (different stimuli)
2 procedures => trainingProcedure1: 3trials => 3x???? - 3buttons: click on a button and hear the corresponding stimulus
procedure => multiProcedure: order: ONEBYONE- trainingProcedure
Multiscreen - 1 procedure with for the first trials: screen 1 and the last trials: screen 2 => Same outcome as sequential Multiprocedure
6 trials - 1 presentation: 3 buttons(screen1): 1-2-3 and 3 buttons(screen2): 4-5-6 => Match the stimulus with the corresponding button
procedure => 1procedure but several screens: multiscreen- constantProcedure
Multiple standards - Unique standard
2 trials: trial1 = match one of the button with the noise-stimulus (standards/reference-signals = numbers)
2 trials - constantProcedure
Show warning if no answer is defined for a stimulus
Error message => Cannot show feedback because: no screen was found for (button turns red)
procedure - trial1 - no answer (see comment)
Show warning if no answer is defined for a stimulus
Error message => Cannot show feedback because: no screen was found for (button turns red)
procedure - trial1 - no answer (see comment)
Open set experiment - Constant stimuli
6 trials (1 presentation) - You hear a stimulus (1-2-3-4-5-6) in both ears - Typ the answer/stimulus (een, twee, drie, …) in the textbox below ’answer’.
trial - answer>ANSWER THAT THE SUBJECT HAS TO TYPE< - corrector xsi:type=“apex:isequal”
a pause of 500ms should be introduced between the stimulus and the standards
1 trials (10 presentations => 10x) - You hear a stimulus (1-2-3-4-5-6) in both ears - Typ the answer/stimulus (een, twee, drie, …) in the textbox below ’answer’.
pause between stimuli (in seconds)
Pluginprocedure => script: testprocedure
When you click on a button with a certain number, the next time you have to click on the number you just have heard - parameter: stepsize & startvalue
pluginProcedure with a certain script
Randomgenerator test
the stimulus “een” & “twee” are played simultaneously but randomly in the left or right channel according the value returnd by random1
trainingProcedure - randomgenerator - connections - stimuli:datablocks: simultaneous
The first selected trial (of the first presentation) shoud be repeatedly presented (stop after 5 presentations, several trials)
5 presentations x 5 trials = 25x - When you click correct => the next trial begins / When you click wrong, the first trial of the first presentation is repeated
repeat_first_until_correct: true
The first selected trial (of the first presentation) shoud be repeatedly presented (stop after 5 reversals, multiple trials)
5 trials, stop after 5 reversals - When you click correct => the next trial begins / When you click wrong, the first trial of the first presentation is repeated
adaptiveprocedure - REPEAT-FIRST-UNTIL-CORRECT: TRUE - adapt_parameter
The first selected trial shoud be repeatedly presented: DOESN’T WORK! => single trial + adapt_parameter
1 trial, stop after 5 reversals - When you click correct => the next trial begins / When you click wrong, the first trial begins
adaptiveprocedure - repeat_first_until_correct: true - ADAPT_PARAMETER
Test of random stimulus output when more than one stimulus defined in the experiment
Random selection of stimuli in a trial if there are more than one (=> sequential presentation of stimuli => more trials) - When you click on 1, ’een’, ’twee’, ’drie’ is presented randomly in both ears
constantprocedure - more than 1 stimulus in 1 trial => random selection of the stimulus
Randomgenerator test
the stimulus “house”/“mouse” are played in the left channel => click the right button (house/mouse)
constantProcedure - stimuli - datablocks
Interval - select element ok, number 2
Demonstrates the use of feedback to enforce a pauze between trials
If you click on a button, you hear a stimulus (1-2-3-4-5-6) in both ears => click on the button corresponding with the stimulus
feedback length (in ms)
Trainingprocedure: demonstrate the presentation of a stimulus with a number according to last input
when you click on 1/2/3/4/5/6 => you hear een/twee/drie/vier/vijf/zes
trainingProcedure with 6 trials and buttons
Show the presentation of a stimulus with a random number out of the possible choices according to last input
3 buttons: 1-2 3-4 5-6 => when you click on 5-6, you hear either 5 or 6
trainingProcedure - multiple trials => button5 is the answer of the trial corresponding with stimulus5 & stimulus6
Make a trial whithout a stimulus
when you click on stimulus => apex shuts down
no stimuli - datablock
Random generator test - gain of stimulus is randomly chosen
You hear ’een’ in your left ear - the gain of this stimulus changes randomly, each time you click the button ’1’
random generator - type: DOUBLE (fractional number, e.g. 0.1) - parameter => see filter
Random generator test - gain of stimulus is randomly chosen
You hear ’een’ in your left ear - the gain of this stimulus changes randomly, each time you click the button ’1’
random generator - type: WHOLE(fractional number, e.g. -5) - parameter => see filter
Randomgenerator: random gain of each datablock of a multi-interval stimulus
The stimulus “één één één” is heard each time by pressing on the “1” button, and the gain of each “één” has a random gain
The id of the gain is set to be the parameter of the randomgenerator, three intervals are defined in procedure
Randomgenerator: random channel for stimulus
The stimulus “één” is played on randomly the left or right channel
The value returnd by random1 decides whether it is channel 0 or channel 1, see <randomgenerators>
Randomgenerator: random gain of stimulus presented in 1 channel, possibility to use non-integer values (double type)
The stimulus “één” is heard in the right channel each time by pressing on the “1” button, and the gain of “één” has a random gain
See <randomgenerators>, the id of the gain is set to be the parameter of the randomgenerator, minimum value contains a decimal value
Randomgenerator: random gain of stimulus presented in 1 channel, only possible to use integer values
The stimulus “één” is heard in the left channel each time by pressing on the “1” button, and the gain of “één” has a random gain
See <randomgenerators>, the id of the gain is set to be the parameter of the randomgenerator, minimum and maximum values are integers
Randomgenerator should have integer values, similar to uniform-int.apx
Warning (no error) appears in messages window because random generator limits are not integer
Randomgenerator max value is 2.5
Randomgenerator: random gain of stimulus presented in 1 channel, only possible to use integer values, only small range is used
The stimulus “één” is heard in the left channel each time by pressing on the “1” button, and the gain of “één” has a random gain (small range in this case)
See <randomgenerators>, the id of the gain is set to be the parameter of the randomgenerator, minimum and maximum values are integers
Demonstrate the use of a confusionmatrix
Results are converted into a confusionmatrix
Default results file for a confusionmatrix
Demonstrate the use of result parameters
Results are shown after the experiment is done.
Results: show results after experiment
Demonstrate the use of real-time results
Real-time results are shown during the experiment in a separate window
Results: show results during experiment
Demonstrate the use of resultparameters
Resultparameters specified in <results>/<resultparameters> will be passed on to the resultviewer
These parameters will be made available in a hash params.
Demonstrate how you can add the subjects name to the results file
When the subject types his/her name in the interactive, this will automatically appear in the results file and be appended to the results filename
subject function in ’results’, ’interactive’ entry is added
shows how to use shortcuts to answer
The screen shows different buttons: you can either click on them, or use a predefined shortcut button on the keyboard
shortcuts are implemented for the buttons
highlighting of the played stimulus
the currently playing stimulus/button is highlighted
<showcurrent>true
feedback with picture and highlighting of the CLICKED element
When clicking a button, a feedback picture (thumb up or down) is shown in the right panel and the CLICKED button is highlighted.
<feedback_on> clicked
highlighted stimulus + feedback with picture and highlighting
The currently playing stimulus/button is highlighted. When clicking a button, a feedback picture (thumb up or down) is shown in the right panel and the correct button is highlighted.
<showcurrent> true, <feedback> true
highlighted stimulus + feedback with picture and highlighting for multiple stimuli
The currently playing stimulus/button is highlighted. When clicking a button, a feedback picture (thumb up or down) is shown in the right panel and the correct button is highlighted.
<showcurrent> true, <feedback> true
feedback with picture and highlighting for multiple stimuli
When clicking a button, a feedback picture (thumb up or down) is shown in the right panel and the correct button is highlighted.
<feedback> true
highlighted stimulus for multiple stimuli
the currently playing stimulus/button is highlighted
<showcurrent> true
feedback without highlighting
When clicking a button, a feedback picture (thumb up or down) is shown in the right panel and NO elements are highlighted.
<feedback_on>: none
feedback with picture and highlighting
When clicking a button, a feedback picture (thumb up or down) is shown in the right panel and the correct button is highlighted.
<feedback> true
no visual feedback
No feedback is given after clicking the correct/wrong button (no highlighting/picture). Subject has to wait between trials.
<feedback length= …> false
Feedback using a plugin
Own feedback can be tested if dummyfeedbackplugin is changed
dummyfeedbackplugin
highlighted stimulus
the currently playing stimulus/button is highlighted
<showcurrent> true
shows how to change the font color of a button/label
A label and button with a different font color are shown on the screen
<fgcolor>
Shows full use of flash movies, but without the actual childmode. Shows how to disable a button.
the middle egg should not be clickable (disabled)
<disabled>true
Shows full use of flash movies, but without the actual childmode
Corresponding flash movies are shown during presentation of the stimuli and after clicking the correct/wrong button.
introduce flash elements: <flash>, <uri>, <feedback>
Pictures instead of buttons
Three eggs instead of buttons are shown.
flashelements for screen
shows how to conduct an experiment in full screen modus
A typical experiment is shown, but the Windows titlebar/taskbar/… is hidden
<fullscreen>true<fullscreen>
shows how to use an intertrial screen
A screen is shown between two trials.
<screens> <general> <intertrialscreen>iti
shows how to use an intertrial picture
A picture is shown between two trials.
<screens> <general> <intertrialscreen>iti
example of different arc layouts for buttons
Buttons are placed in several semi-circles on the screen
<arcLayout> upper, lower, left, right, full
Shows problems with arc layout for buttons
Error when loading the experiment: something went wrong with the placing of the buttons.
<arcLayout> The number of x-values can’t exceed the width of the arc. In this case, the width has to be changed to 9 (instead of 2)
example of different arc layouts for buttons
Buttons are placed in several semi-circles on the screen
<arcLayout> upper, lower, left, right, full
example of simple archwise organisation of buttons
Buttons are placed archwise/in a semi-circle on the screen.
<arcLayout> upper, lower, left or right
example of gridlayout
buttons are placed in a grid
<gridLayout>
example of nested gridlayout
buttons are placed in nested grids
<gridLayout> in <gridLayout>
shows the use of the row and col attributes instead of x and y
first screen you see is made with col & row, second screen with x & y
<gridLayout> replacing “x” & “y” by “row” & “col”. col = column in the grid, is the same as x. row = row in the grid, is the same as y
shows wrong usage of the row and col attributes
first screen you see is made with col & row, second screen with x & y
<gridLayout> col should not be used together with x! col is the same as x, refers to column in the grid
shows how to change the size of the buttons
Buttons showed on the screen have different sizes/stretchfactors.
Stretch factor for the columns/rows: a list of integers separated by comma’s. The width of the columns/rows will be proportional to the numbers.
Shows problems with changing the size of the buttons
Error when loading the experiment: something went wrong when changing the size of the buttons.
The number of the column stretch factors has to be equal to its width.
shows horizontal layout
buttons are placed next to each other, in a horizontal layout
<hLayout>
example of mixed layouts
buttons are placed in semi-circles and grids on the screen
<arcLayout>, <gridLayout>
shows how to hide the menu bar
A typical experiment is shown, but the menu bar on top of the screen is hidden.
<showmenu>false<showmenu>
shows how to implement a feedback picture, other than the traditional thumb
A green square is shown as feedback when clicking the correct button, a red square is shown when you give a wrong answer
<feedback_picture_positive> & <feedback_picture_negative>
shows error message for feedback picture
Experiment doesn’t load, because the feedback pictures are not found.
Wrong naming of feedback pictures / pictures don’t exist
shows how to hide the panel
A typical experiment is shown, but the panel on the right side is hidden. Start the experiment by pressing F5.
<showpanel>false<showpanel>
shows the use of a repeatbutton
A repeatbutton is shown on the screen, just above the progressbar. When clicking the button, the last stimulus is repeated.
<repeatbutton>true<repeatbutton>
shows the use of a statuspicture
A statuspicture (dot) is shown, just above the progress bar. The dot changes color: red when presenting the stimulus, green when waiting for an answer
<statuspicture>true<statuspicture>
shows how to use a stopbutton & repeatbutton
A red stopbutton and a repeatbutton are displayed on the screen, just above the progressbar. When clicking the stopbutton, all output is immediately stopped & apex is shut down. When clicking the repeatbutton, the last stimulus is repeated.
<stopbutton> & <repeatbutton>
shows how to use the stopbutton
A red stopbutton is displayed on the screen, just above the progressbar. When clicking this button, all output is immediately stopped & apex is shut down
<stopbutton>true>stopbutton>
shows how to use an ’apexconfig’ as a prefix for a filename
idem
<uri_prefix source=“apexconfig”>pictures</uri_prefix>
shows how to use an ’inline’ as a prefix for a filename
idem
<uri_prefix>../../pictures</uri_prefix>
example of a multitude of screenelements
assembly of different kinds of screenelements
Different labels and buttons are shown on the screen. First row containg a button and answerlabel, second row containing a label and a parameterlist, last row a textedit and picture
<button>, <answerlabel>, <label>, <parameterlist>, <textEdit>, <picture>
shows the use of an answerlabel
An answerlabel is shown on the screen, containing the correct answer for the current trial.
add <answerlabel> to <gridLayout>
shows how to disable a button
Two buttons are shown on the screen: nothing happens when clicking the disabled one
<disabled> true
shows how to use a checkbox
Checkboxes are shown on the screen: if a checkbox is clicked, the subject is assumed to have responded to the trial
<checkBox>
how to use a html page
a html page is shown on the screen
<html> <page>
shows how to add text to a label
screen shows a large label filled with text
<label> <text>
shows how to change background and font color of a label/button
screen shows different labels/buttons with a different background color or font color
<bgcolor> changes the background color, <fgcolor> changes the font color
shows how to use a bold font by using html code
screen shows the text written in html code
<b> text </b>
shows how to resize the text on a label
screen shows different labels, with and without resizing of the text
<text> split text into different lines with ’enter’ & ’
example of a matrix layout for buttons
Screen shows buttons in a 2x2 matrix. After listening to the stimulus, you have to select one button in each column before clicking OK.
<matrix>
shows how to implement a parameterlabel on the screen
A parameterlabel is shown on the screen, i.e. a label containg the value of a parameter.
screen: <parameterlabel>, stimuli: define parameter
shows how to implement a parameterlist on the screen
Parameters of the played stimuli are shown on the screen. This example shows two different parameterlists (two different trials).
<parameterlist>
example of a picture-button
Click the picture after listening to the stimulus
<picture>
shows error message for picture
experiment doesn’t load, error message: picture not found
wrong <uri> (’abc’-picture doesn’t exist, can’t be found in the pictures-folder)
shows how to implement different pictures in the screen
4 pictures are shown
<picture>
shows how to disable a picture-button
4 pictures are shown on the screen, one is disabled (number 4)
<picturelabel> instead of <picture> + picture 4 is not included in the button group
shows error message for picture
experiment doesn’t load, error message: picture invalid
wrong file extension for picture (xxx in stead of .png)
example of screen layout with pictures
Screen shows 4 pictures, after hearing a stimulus you should click one
<picture>
example of screen layout with pictures
Screen shows 4 pictures, after hearing a stimulus you should click one
<picture>
Check whether everything is OK when two screenelements in different screens have the same name
/
/
shows how to implement a vertical slider on the screen
Slider is shown on the screen. Sliding the bar doens’t change anything to the presented stimuli.
<slider>
shows how to implement a horizontal slider on the screen
Slider is shown on the screen. Sliding the bar doens’t change anything to the presented stimuli.
<slider>
example of a spinbox
a spinbox is an input field that only accepts numbers and has 2 buttons to respectively increase or decrease its value
add <spinBox> to Layout, define: startvalue, minimum & maximum
example of a spinbox with adjustable parameter
a spinbox is an input field that only accepts numbers and has 2 buttons to respectively increase or decrease its value
add <spinBox> to Layout, define: startvalue, minimum & maximum, parameter to be adjusted
shows example of error message
Demonstrate a screen generated by javascript, show error message because of invalid xml
wrong naming of source <pluginscreens>
example of a different screenstyle
screen has an other background color, buttons changed color, highlighting changed, …
<style_apex>
example of font input
screen shows two ’input fields’ with different fonts
<textEdit> <font>
example of various restricted inputs
Screen shows four ’entry fields’, but input is restricted (for example, only numbers allowed)
<textEdit>, <inputmask> (Defined in the Qt documentation!)
example of restricted input
Screen shows two ’entry fields’, but input is restricted (for example, only numbers allowed)
<textEdit>, <inputmask> numbers = only numeric input will be allowed
Demonstrate the usage of multiple soundcards
two soundcards are defined in <devices>
an extra soundcard is defined in <devices>, each with their own parameters
Specify the name of the sound card to be used
Specify the sound card to be used.
The name of the sound card to be used can be specified in devices/device/card. A list of devices in your system can be obtained by running apex from the commandline with parameter –soundcards
Demonstrate what happens when the output clips
The output clips of the first two trials of this experiment
In the results file, the following will be shown to indicate clipping occured: <device id=“soundcard”> <clipped channel=“0”/> </device>
Demonstrate default wavdevice settings
Shows default settings in ’devices’
Devices: type of soundcard, number of channels (2), gain (0), samplerate (44100)
Demonstrate the usage of different drivers and their parameters
In this example asio is used as a driver (basicwav-coreaduio/jack/portaudio show examples of different drivers)
Devices: <driver>asio</driver>
Demonstrate the usage of different drivers and their parameters
In this example coreaudio is used as a driver (basicwav-asio/jack/portaudio show examples of different drivers)
Devices: <driver>coreaudio</driver>
Demonstrate the usage of different drivers and their parameters
In this example jack is used as a driver (basicwav-coreaduio/asio/portaudio show examples of different drivers)
Devices: <driver>jack</driver>
Demonstrate the usage of different drivers and their parameters
In this example portaudio is used as a driver (basicwav-coreaduio/jack/asio show examples of different drivers)
Devices: <driver>asio</driver>
Demonstrate the misapplication of adjusting gain to the wrong channel
Gain is applied to the wrong channel (channel = 10, when there are only 2 channels)
Devices: <gain channel=“10”>0</gain> -> it should be channel=“0” of channel=“1”, because there are only 2 channels defined.
Demonstrate what happens when you use wavdevice with one channel not connected
When you only use one of two defined channels you will not get an error, only a message: “not every inputchannel of soundcard is connected”
Devices: 2 channels defined, only 1 used in <connections>
Demonstrate the usage of multiple channels
Add more channels to your experiment
set more channels (e.g. <channels>6</channels, for 6 channels> and make connections with them so that the right stimulus is send to the right channel
<buffersize>8192</buffersize> is used
Demonstrate the misapplication of <card>
<card> specifies the name of the sound card. If you use the wrong cardname, you will get an error when you try to open your experiment in apex.
wrong card name used in <card> -> ’Soundmax’ should be default or Soundmax should be defined in apexconfig.xml
Demonstrate the misapplication of <card>
<card> specifies the name of the sound card to be used. If you use the wrong cardname, you will get an error when you try to open your experiment in apex.
wrong card name used in <card> -> ’invalid’ should be default or an other name defined in apexconfig.xml
Demonstrate the use of padzero
Add the given number of empty (filled with zero’s) buffers to the output on the end of a stream. This avoids dropping of the last frames on some soundcards.
Devices: Add padzero function (e.g. <padzero>2</padzero>)
Demonstrate datablocks and stimuli generated by javascript
The datablocks and stimuli are automatically generated in this experiment using javascript
using plugindatablocks and pluginstimuli, setting the pluginparameters and referring to the wanted javascript in <general> (here autostimulus.js)
Demonstrate trials, datablocks and stimuli generated by javascript
The trials, datablocks and stimuli are automatically generated in this experiment using javascript
using plugintrials, plugindatablocks and pluginstimuli, setting the pluginparameters and referring to the wanted javascript in <general> (here autostimulus.js)
Demonstrate a datablock generated by javascript
The datablock is automatically generated in this experiment using javascript
using plugindatablocks and referring to the wanted javascript in <datablocks> (here datablockgenerator.js)
Demonstrate generating XML code for L34 directly from plugindatablocks and pluginstimuli
The datablocks are automatically generated in this experiment using javascript
using plugindatablocks, pluginstimuli, setting the pluginparameters and referring to the wanted javascript in <datablocks> and <stimuli> (here datablockgenerator_l34.js)
Demonstrate a screen generated by javascript
The screen is automatically generated in this experiment using javascript
using pluginscreens, setting the pluginparameters and referring to the wanted javascript in <screens> (here screengenerator.js)
Demonstrate the misapplication of a screen generated by javascript
The screen is not generated in this experiment because the script source is invalid. You will get an error message when you try to open the experiment.
script source refers to <general> instead of the script itself. It should be: <script source=“screengenerator-library”/> in <screens> OR <scriptlibrary>screengenerator-library.js</scriptlibrary> in <general>
Demonstrate the misapplication of a screen generated by javascript
The screen is not generated in this experiment because the defined javascript is empty.
invalidxml.js is an empty/invalid javascript so no screen can be generated.
Demonstrate the misapplication of a screen generated by javascript
The screen is not generated in this experiment because the defined javascript is empty. You will get an error when you try to open the experiment.
the javascript contains an error so no screen can be generated.
Demonstrate a screen generated by javascript
The screen is automatically generated in this experiment using javascript
using pluginscreens, setting the pluginparameters and referring to the wanted javascript in <screens> (here screengenerator-multiscreen.js)
Demonstrate stimuli generated by javascript
The stimuli are automatically generated in this experiment using javascript
using pluginstimuli, setting the pluginparameters and referring to the wanted javascript in <stimuli> (here stimulusgenerator.js)
See . This is an example of a closed-set identification test for children. A word (wave file) is presented and the child responds by clicking on one of four figures on the screen (figure [fig:closedset]). Subsequently, a new set of figures is shown, and again, a word corresponding to one of these figures is routed to the sound card. This is repeated three times. The three words are embedded in noise at a certain signal-to-noise ratio. In this example the level of the noise is fixed and the level of the word varies. At the beginning of the experiment APEX 4 queries for the SNR (signal to noise ratio, in dB). After having entered this value four figures will appear. Press Start to start the experiment and to hear the first stimulus (speech in noise). After the experiment has finished the results are written to a results file and the percentage correct is determined.
The experiment as described in the previous paragraph should first be translated to concepts understood by APEX 4. The main concepts in this example are datablock, stimulus, screen and procedure. For each of the 3 words to be presented to the subject, a wave file is available on disk. For each wave file, a datablock is defined, and for each resulting datablock a stimulus is defined. Everything that is defined is assigned an ID, to be able to refer to it later on. Therefore, now we have 3 stimuli with IDs , and .
We should also define the things to be shown on the screen during the experiment. This is done by defining a screen for each word. Each screen contains 4 pictures, of which one corresponds to the word. Each screen again gets an ID, in this case we name the screen by the pictures it contains. Therefore we now have 3 screens with ID , and .
To indicate the order in which the words should be presented, and together with which screen, a procedure is defined. In the procedure a number of trials is defined. Recall that a trial is the combination of a screen, a stimulus and a correct answer. Therefore a trial is a way to link each of our stimuli with a screen.
Now only the output logic remains to be defined. The idea is to continuously present a noise signal and to set the level of the words such that a certain SNR is obtained. To achieve this, we define 2 filters, the first one is a generator (i.e., a filter without input channels) that will generate the noise signal. The other one is an amplifier, which will amplify or attenuate the words to obtain the desired SNR.
In the following sections each of the elements of the file necessary to implement the latter concepts will be described in detail. The first one is .
<procedure xsi:type="apex:constantProcedure">
<parameters>
<presentations>1</presentations>
<order>sequential</order>
</parameters>
<trials>
<trial id="trial_star">
<answer>picturestar</answer>
<screen id="screenstar_horse_vase_moon"/>
<stimulus id="stimulus_star"/>
</trial>
<trial id="trial_fly">
<answer>picturefly</answer>
<screen id="screenknee_fly_mouse_star"/>
<stimulus id="stimulus_fly"/>
</trial>
<trial id="trial_mouse">
<answer>picturemouse</answer>
<screen id="screenmouse_fly_star_moon"/>
<stimulus id="stimulus_mouse"/>
</trial>
</trials>
</procedure>
The attribute indicates that a constant stimuli procedure is used. This means that the procedure will select the next trial from the trial list and that it completes after every trial has been presented a certain number of times.
defines the behavior of the procedure
every trial is presented once
the three trials are presented sequentially, in the order that is specified in the experiment file
contains different elements to specify a trial. After selecting a trial the will show the specified screen and send the stimulus to the device. Each trial is given an ID (arbitrary name), eg , such that it can be referred to later on or viewed in the results file.
the correct answer, to be used by APEX 4 to determine whether the subject’s response is correct. Here, the subject gets the opportunity to click on one of four pictures. The result from the screen (the subject’s response) will be the ID of the element of the screen that was clicked. Therefore, in this example, we specify the ID of the picture corresponding to the stimulus that is presented.
A trial must be defined for all the words of the experiment.
<corrector xsi:type="apex:isequal"/>
The corrector checks whether the response is correct or not. The attribute compares whether the two input values are exactly the same. In this example compares the answer specified under trial and the ID corresponding to the picture that has been clicked.
<screens>
<uri_prefix>closedset</uri_prefix>
<reinforcement>
<progressbar>true</progressbar>
<feedback length="600">false</feedback>
</reinforcement>
<screen id="screenstar_horse_vase_moon">
<gridLayout height="2" width="2">
<picture id="picturestar" row="1" col="1">
<path>star.jpg</path>
</picture>
<picture id="picturehorse" row="2" col="1">
<path>horse.jpg</path>
</picture>
<picture id="picturevase" row="1" col="2">
<path>vase.jpg</path>
</picture>
<picture id="picturemoon" row="2" col="2">
<path>moon.jpg</path>
</picture>
</gridLayout>
<buttongroup id="buttongroup1">
<button id="picturestar"/>
<button id="picturehorse"/>
<button id="picturevase"/>
<button id="picturemoon"/>
</buttongroup>
<default_answer_element>buttongroup1</default_answer_element>
</screen>
<screen id="screenknee_fly_mouse_star">
<gridLayout height="2" width="2">
<picture id="pictureknee" row="1" col="1">
<path>knee.jpg</path>
</picture>
<picture id="picturefly" row="2" col="1">
<path>fly.jpg</path>
</picture>
<picture id="picturemouse" row="1" col="2">
<path>mouse.jpg</path>
</picture>
<picture id="picturestar" row="2" col="2">
<path>star.jpg</path>
</picture>
</gridLayout>
<buttongroup id="buttongroup2">
<button id="pictureknee"/>
<button id="picturefly"/>
<button id="picturemouse"/>
<button id="picturestar"/>
</buttongroup>
<default_answer_element>buttongroup2</default_answer_element>
</screen>
<screen id="screenmouse_fly_star_moon">
<gridLayout height="2" width="2">
<picture id="picturemouse" row="1" col="1">
<path>mouse.jpg</path>
</picture>
<picture id="picturefly" row="2" col="1">
<path>fly.jpg</path>
</picture>
<picture id="picturestar" row="1" col="2">
<path>star.jpg</path>
</picture>
<picture id="picturemoon" row="2" col="2">
<path>moon.jpg</path>
</picture>
</gridLayout>
<buttongroup id="buttongroup3">
<button id="picturemouse"/>
<button id="picturefly"/>
<button id="picturestar"/>
<button id="picturemoon"/>
</buttongroup>
<default_answer_element>buttongroup3</default_answer_element>
</screen>
</screens>
contains several elements that can be referred to elsewhere in the experiment file (e.g., in above).
a relative path is specified here (relative with respect to the experiment file). Since APEX 4 knows the location of the experiment file, only the folder containing the wave files and pictures must be specified. It is also possible to give the absolute path, starting at the root. There are three ways to specify a prefix: by directly specifying an absolute path, by directly specifying a path relative to the experiment file or by referring to a prefix stored in . Please refer to Using prefixes for more information.
includes
As the value is a progressbar will be displayed in the right hand bottom corner of the screen that indicates the percentage of trials that have been completed.
duration of time after response (in msec) that APEX 4 waits before presenting the next trial. During this interval, feedback can be displayed. In this case, no feedback (thumb up, thumb down) is given as the value is .
For each word to be presented, a screen is defined. Each screen has an ID by which it can be referred to elsewhere in the experiment file (e.g. in to associate it with a stimulus).
specifies how the four figures will be arranged on the screen. A GridLayout creates a regular grid on the screen with the specified number of rows and columns. In this example there are 2 rows and 2 columns. Each figure is defined by means of a element. Such a definition can be seen as associating a graphics file with an ID and specifying at what position of the layout it should be shown. In this case, jpeg files are used, but other formats are also possible (e.g., png, bmp, gif).
defines a group of screen elements, namely those (four figures) that are displayed on the screen. The ID is defined before.
As many elements can be defined in a screen, APEX 4 has no way to know which element contains the subject’s response. If, for example, a text box is shown and 2 buttons, it is unclear which is to be used to determine whether the answer is correct or not. Therefore, in the element is designated that contains the subject’s response. In the case of screen elements that are clicked in order to respond, the example is further complicated by the fact that we cannot specify just one of the elements (buttons, pictures), but the response rather comes from a group of elements. This is when a can be used to group together different screen elements.
<datablocks>
<uri_prefix>closedset/</uri_prefix>
<datablock id="datablock_star">
<device>wavdevice</device>
<uri>star.wav</uri>
</datablock>
<datablock id="datablock_fly">
<device>wavdevice</device>
<uri>fly.wav</uri>
</datablock>
<datablock id="datablock_mouse">
<device>wavdevice</device>
<uri>mouse.wav</uri>
</datablock>
<datablock id="noisedata">
<device>wavdevice</device>
<uri>noise.wav</uri>
</datablock>
<datablock id="silence">
<device>wavdevice</device>
<uri>silence:500</uri>
</datablock>
</datablocks>
A datablock must be made for all wave files used in the experiment, including the noise (that will be used by the noise generator). In this example 5 datablocks are defined, 3 for the word files, 1 for the noise and 1 for silence. contains 5 elements and a prefix.
a relative path is specified here. It is also possible to give the absolute path, starting at the root (see Using prefixes).
For each wave file a datablock is made, with an ID. In datablock the special syntax is demonstrated for creating a datablock containing only silence (i.e., all samples are zeros). This is done to put silence before and after the word, to prevent the speech and noise from starting at the same time. The length of the silence datablock is specified in ms after the prefix . It is added before the signal (in element ), not before the noise.
Each datablock is associated to a (by means of the ID of the device).
In the next sections, the output logic will be defined. Figure [fig:ex1-output] gives an overview of the building blocks that are used in this example. On the left hand side the datablocks are shown. In the middle the noise generator and the amplifier and on the right hand side the sound card. As the words are to be amplified or attenuated according to the desired SNR, the corresponding datablocks are routed through the amplifier.
In the next element the output device is specified.
<devices>
<device id="wavdevice" xsi:type="apex:wavDeviceType">
<driver>portaudio</driver>
<card>default</card>
<channels>1</channels>
<samplerate>44100</samplerate>
</device>
</devices>
All devices defined in the experiment file are grouped in . In this example there is only 1 element. Its ID is set to . As an ID is unique for an entire experiment file, it can be used later on to refer to this device.
The attribute tells APEX 4 that a sound card is used. The experiment only starts if all devices can be opened.
specifies the software driver to be used for sound output. If unsure, set it to .
specifies the name of the sound card to be used. The system default card can be used by specifying as a card name. Other card names can be defined in .
specifies the number of channels of the sound card to be used. The number of channels is restricted to the selected sound card, with a maximum of 2 for portaudio.
the sampling rate of the sound card; Not all sampling rates are supported by all devices, and some drivers automatically convert the sampling rate. Check your sound card documentation. The sample rate of the sound card should correspond to the sampling rates of all datablocks used with it. If not, an error message will be shown.
Filters must be defined whenever the signal (or noise) is manipulated. In this example the level of the noise remains constant and the signal is amplified or attenuated using an amplifier filter (loop of ).
<filters>
<filter xsi:type="apex:dataloop" id="noisegen"> (*@\label{xml:filter1}@*)
<device>wavdevice</device>
<channels>1</channels>
<continuous>false</continuous>
<datablock>noisedata</datablock>
<basegain>-5</basegain>
<gain id="noisegain">0</gain>
<randomjump>true</randomjump>
</filter>
<filter xsi:type="apex:amplifier" id="amplifier"> (*@\label{xml:filter2}@*)
<device>wavdevice</device>
<channels>1</channels>
<basegain>-5</basegain>
<gain id="gain">0</gain>
</filter>
</filters>
contains individual elements, which specify a filter, or as a special case a generator (i.e., a filter without input channels).
on line [xml:filter1] the attribute tells APEX 4 that a dataloop generator has to be created. This is a generator that takes a datablock and loops it infinitely. The datablock to be looped is specified by its ID . The dataloop generator itself is assigned the ID .
on line [xml:filter2] the attribute tells APEX 4 that an amplifier has to be created. The gain of this amplifier will be varied to change the amplitude of the words and thus the SNR. It is assigned ID . The gain of the amplifier is made a variable parameter by assigning it ID
The device with which the filter is associated
The number of channels of the filter. The available number of channels is dependent on the type of filter. An amplifier can have any number of channels.
If is set to , the filter or generator will keep on running in between two trials (i.e., when the subject is responding). In this example it stops when the stimulus stops playing ().
The datablock with ID noisedata, specified under will be looped.
the total gain of the amplifier is basegain+gain. Basegain cannot be a parameter, gain can be a parameter. The total gain of the complete output system should not be larger than 0 to avoid clipping of the signal. This is why basegain = -5.
extent to which the signal is amplified.
If is set to , when the dataloop is started, it will jump to a random sample in the datablock. Thereafter it is looped.
<stimuli>
<stimulus id="stimulus_star">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_star"/>
<datablock id="silence"/>
</sequential>
</datablocks>
</stimulus>
<stimulus id="stimulus_fly">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_fly"/>
<datablock id="silence"/>
</sequential>
</datablocks>
</stimulus>
<stimulus id="stimulus_mouse">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_mouse"/>
<datablock id="silence"/>
</sequential>
</datablocks>
</stimulus>
</stimuli>
contains different , each with an ID.
This is repeated for all the stimuli in the experiment.
<connections>
<connection>
<from>
<id>_ALL_</id>
<channel>0</channel>
</from>
<to>
<id>amplifier</id>
<channel>0</channel>
</to>
</connection>
<connection> (*@\label{xml:cha}@*)
<from>
<id>amplifier</id>
<channel>0</channel>
</from>
<to>
<id>wavdevice</id>
<channel>0</channel>
</to>
</connection> (*@\label{xml:chb}@*)
<connection> (*@\label{xml:chc}@*)
<from>
<id>noisegen</id>
<channel>0</channel>
</from>
<to>
<id>wavdevice</id>
<channel>0</channel>
</to>
</connection> (*@\label{xml:chd}@*)
</connections>
defines how the different datablocks and filters are routed to the output device. The ID stands for all the datablocks. In this example they are routed to the first channel of the filter with ID amplifier (defined under ). In the amplifier the signal is amplified or attenuated and sent to the wavdevice on lines [xml:cha] to [xml:chb]. At the same time the noise, generated by a generator with ID noisegen, is sent to the same channel of the wavdevice. The channels are numbered from 0 onwards. The level of the noise remains constant and does not pass through an amplifier (lines [xml:chc] to [xml:chd]).
A visual representation of connections (see Figure [fig:ex1-output]) can be obtained by choosing “Show stimulus connections” under “Experiment”in the main APEX 4 menu (top left menu bar).
<results>
<page>apex:resultsviewer.html</page>
<resultparameters/>
<showduringexperiment>false</showduringexperiment>
<showafterexperiment>true</showafterexperiment>
</results>
Even if is not specified in the experiment file APEX 4 will deliver a results file in XML.
URL of the html page to show in the results window. The page should have the appropriate java script methods embedded. More example pages can be found in the APEX 4 resultsviewer folder.
Parameters to be passed to the results page. Each parameter will be set in hash params.
If true, an extra window will be created which will show the results of the current experiment while the experiment is being executed. Javascript embedded in the page will be executed upon each new trial.
If true, when the experiment is finished, a dialog box will appear querying whether results should be shown. If the answer is affirmative, a new window will be opened and the results will be shown after javascript processing.
<interactive>
<entry type="int" description="SNR in dB"
expression="/apex:apex/filters/filter[@id='amplifier']/gain"
default="0"/>
</interactive>
If a small part of an experiment file has to be changed right before the start of an experiment (e.g. a start value, a gain value, the subject’s name), APEX 4 can show the experimenter a small containing the elements to be changed. This is accomplished by defining the element in the experiment file.
In this example we will modify the gain of the filter with ID to a value that is entered by the experimenter at the start of the experiment.
It is only possible to change the value of an existing element of the experiment file, elements cannot be added. For each element to be changed, an should be defined under . has four attributes that should be defined:
specifies the type of input element that will be shown. If it is , a spinbox1 will be shown. If it is a plain text box will be shown. In this case a spinbox will be shown as a gain is always numeric.
defines the text to be shown in the next to the input element, such that the experimenter knows exactly what to fill in.
defines the element of the experiment file to be changed. It is specified by a so-called XPath expression 2. For a description of XPath, we refer to the according standard or a good XML book.
specifies the default value to be shown in the input element.
See . This is an example of an adaptive speech in noise test. It determines the , the 50 percent correct point, using the 1-down, 1-up method described by @PM79. In this adaptive procedure the first sentence is repeated with increasing level until it is identified correctly. Subsequently, the SRT is determined by increasing or decreasing the level in steps of 2 dB, according to the last response. Other decision procedures (eg 2-down 1-up) can also be implemented using APEX 4. In this example the 5 sentences are scored on the basis of their keywords. The keywords are indicated in bold on the screen. The experimenter/clinician is seated in front of the screen and decides whether the subject has repeated the keywords (of the sentence) correctly, after which the correct or incorrect button is clicked(figure [fig:sentencenoise]). No feedback is provided. The starting level is given in signal-to noise ratio (the level of the noise remains the same, that of the signal varies). In this example speech and noise are routed to the same channel, i.e. one speaker or one earpiece of the headphone. The results are written to a results file.
The experiment as described in the previous paragraph should first be translated to concepts understood by APEX 4. The main concepts in this example are datablock, stimulus, screen, procedure, a variable parameter (to change the gain) and fixed Parameter to show a sentence on the screen. For each sentence a datablock is defined, and for each resulting datablock a stimulus is defined. As always, everything that is defined, is assigned an ID, to be able to refer to it later on. In this example there are 5 stimuli with IDs , , , and . The procedure defines a number of trials. Recall that a trial is the combination of a screen (always the same in this example), a stimulus and a response.
As we are dealing with an adaptive procedure a fixed or variable parameter is adapted. In this example a variable parameter is adapted to change the gain of the sentence, and a fixed parameter is used to show a sentence on the screen. The screen also shows the signal-to-noise ratio (SNR) under test and the response alternatives “correct” and “incorrect”.
Now only the output logic remains to be defined. The idea is to continuously present a noise signal and to vary the level of the sentences adaptively. To achieve this, we define 2 filters, the first one is a generator (i.e., a filter without input channels) that will generate the noise signal. The other one is an amplifier, which will amplify or attenuate the sentences to obtain the desired SNR. Both are connected to one channel of the wavdevice.
In the following sections each of the elements of the XML file necessary to implement the latter concepts will be described in detail.
<procedure xsi:type="apex:adaptiveProcedure">
<parameters>
<presentations>1</presentations>
<order>sequential</order>
<corrector xsi:type="apex:isequal"/>
<nUp>1</nUp>
<nDown>1</nDown>
<adapt_parameter>gain</adapt_parameter>
<start_value>0</start_value>
<stop_after_type>presentations</stop_after_type>
<stop_after>1</stop_after>
<larger_is_easier>true</larger_is_easier>
<repeat_first_until_correct>true</repeat_first_until_correct>
<stepsizes><stepsize begin="0" size="2"/></stepsizes>
</parameters>
<trials>
<trial id="trial_sentence1">
<answer>button_correct</answer>
<screen id="screen"/>
<stimulus id="stimulus_sentence1"/>
</trial>
<trial id="trial_sentence2">
<answer>button_correct</answer>
<screen id="screen"/>
<stimulus id="stimulus_sentence2"/>
</trial>
<trial id="trial_sentence3">
<answer>button_correct</answer>
<screen id="screen"/>
<stimulus id="stimulus_sentence3"/>
</trial>
<trial id="trial_sentence4">
<answer>button_correct</answer>
<screen id="screen"/>
<stimulus id="stimulus_sentence4"/>
</trial>
<trial id="trial_sentence5">
<answer>button_correct</answer>
<screen id="screen"/>
<stimulus id="stimulus_sentence5"/>
</trial>
</trials>
</procedure>
The attribute of refers to a procedure in which a parameter is changed according to the response of the subject. In this example the gain of the amplifier is adapted. The procedure selects the next trial from the trial list and it completes after every trial has been presented a certain number of times.
defines the behavior of the procedure
every trial is presented once
the trials are presented sequentially, in the order that is specified in the experiment file (if would be specified, they would be presented in random order).
the corrector checks whether the response is correct or not. The attribute compares whether the two input values are exactly the same. In this example compares the answer specified under trial () and the ID corresponding to the picture that has been clicked (either or ).
the level is increased after n (here 1) incorrect response(s); cf
the level is decreased after n (here 1) correct response(s); cf
to be adapted
the experiment starts with gain=0 (input of user). The value here will be replaced by the entry value. Please refer to section [sec:Interactive] for more information.
the experiment stops after a specified number of presentations of each trial is completed (it is also possible to stop after .
the experiment stops after 1 presentation of each trial
If , then larger values of the parameter are easier than smaller values. It is used to determine and .
the first trial is repeated with increasing gain until it is identified correctly.
from the beginning of the experiment (begin=0) the stepsize is 2 dB.
contains different elements to specify a trial. Once a trial is selected, will show the specified screen and send the stimulus to the device. Each trial is given an ID (arbitrary name), eg , such that it can be referred to later on or viewed in the results file. A trial must be defined for all the sentences of the experiment.
the correct answer, to be used by APEX 4 to determine whether the subject’s response is correct. In this example the experimenter will click on “correct” or “incorrect”. The result from the screen will be the ID of the element of the screen that was clicked ( or ).
<screens>
<reinforcement>
<progressbar>true</progressbar>
<feedback length="600">false</feedback>
</reinforcement>
<screen id="screen">
<gridLayout height="2" width="1" id="main_layout" rowstretch="1,2">
<gridLayout width="4" height="4" columnstretch="1,4,2,2"
rowstretch="1,1,2,2" id="parameter_layout" row="1" col="1">
<label id="snrlabel" row="1" col="1">
<text>snr</text>
</label>
<parameterlabel id="snr" row="2" col="1">
<parameter>gain</parameter>
</parameterlabel>
<label id="sentence" row="1" col="2">
<text>sentence</text>
</label>
<parameterlabel id="sentence" row="2" col="2">
<fontsize>12</fontsize>
<parameter>sentence</parameter>
</parameterlabel>
</gridLayout>
<gridLayout height="1" width="2" id="answer_layout" x="1" y="2">
<button x="1" y="1" id="button_correct">
<text>Correct</text>
</button>
<button x="2" y="1" id="button_wrong">
<text>Incorrect</text>
</button>
</gridLayout>
</gridLayout>
<buttongroup id="buttongroup">
<button id="button_correct"/>
<button id="button_wrong"/>
</buttongroup>
<default_answer_element>buttongroup</default_answer_element>
</screen>
</screens>
contains element that is referred to in .
includes elements on progress and feedback
If the value is a progress bar will be displayed in the right hand bottom corner of the screen that indicates the percentage of trials that have been completed.
duration of the time after response (in msec) that APEX 4 waits before presenting the next trial. During this interval feedback can be displayed. In this example, no feedback (thumb up, thumb down) is given as the value is .
the screen has an ID by which it can be referred to in each trial. In this example the screen displays four blocks in the top left corner to indicate the SNR and the sentence. In addition, the labels “Correct” and “Incorrect” are displayed on the buttons at the bottom of the screen (cfr screenshot, figure…).
places elements in an irregular grid. The screen is divided into sections according to the values. In this example there are two nested layouts. The main layout divides the screen in two main rows (height = 2, width = 1). The parameter layout divides the first of these rows in four rows and four columns, of which only the two first ones are filled. The answer layout divides the second main row in two columns, each with one button. The stretch factor for the columns is a list of integers, separated by comma’s. There should be as many integers as columns. The width of the columns is proportional to the numbers. With , and implies that the second row will be twice as wide as the first one. If , and and the second column will be four times as wide as the first and two times as wide as the 3rd and 4th. With the 3rd and 4th rows will be twice as wide as the 1st and 2nd.
the labels on the left are fixed and display the “SNR” and “Sentence”. The button “Correct” and “Incorrect” are indicated at the bottom of the screen
the blocks on the right display the values of the fixed parameters. Gain is the (variable) SNR level, and sentence is a fixed parameter, defined in
can be specified in points
defines a group of screen elements (those that are displayed on the screen). As many elements can be defined in a screen, APEX 4 has no way to know which element contains the subject’s response. Therefore, in the element is designated that contains the subject’s response. In the case of screen elements that are clicked in order to respond, the example is further complicated by the fact that we cannot specify just one of the elements (one button, one picture), but that the response rather comes from a group of elements. This is when a can be used to group together different screen elements.
<datablocks>
<uri_prefix>sentences/</uri_prefix>
<datablock id="datablock_sentence1">
<device>wavdevice</device>
<uri>sent1.wav</uri>
</datablock>
<datablock id="datablock_sentence2">
<device>wavdevice</device>
<uri>sent2.wav</uri>
</datablock>
<datablock id="datablock_sentence3">
<device>wavdevice</device>
<uri>sent3.wav</uri>
</datablock>
<datablock id="datablock_sentence4">
<device>wavdevice</device>
<uri>sent4.wav</uri>
</datablock>
<datablock id="datablock_sentence5">
<device>wavdevice</device>
<uri>sent5.wav</uri>
</datablock>
<datablock id="noisedata">
<device>wavdevice</device>
<uri>noise.wav</uri>
</datablock>
<datablock id="silence">
<device>wavdevice</device>
<uri>silence:500</uri>
</datablock>
</datablocks>
contains a list of elements and a prefix.
a relative path is specified here (relative with respect to the experiment file). Since APEX 4 knows the location of the experiment file, only the folder containing the wave files and pictures must be specified. It is also possible to give the absolute path, starting at the root. There are 3 ways to specify a prefix: by directly specifying an absolute path, by directly specifying a path relative to the experiment file or by referring to a prefix stored in . Please refer to Using prefixes for more information.
for each wave file a datablock is made, with an ID.
In datablock the special syntax is demonstrated for creating a datablock containing only silence (i.e., zeros). This is done to put silence before and after the sentence, to prevent the speech and noise from starting at the same time. The length of the silence datablock is specified in ms after the prefix . It is added before the signal (in element ), not before the noise.
the datablock is associated with the sound card with ID , as defined in the section.
the URI is appended to the prefix defined above
<devices>
<device id="wavdevice" xsi:type="apex:wavDeviceType">
<driver>portaudio</driver>
<card>default</card>
<channels>1</channels>
<samplerate>44100</samplerate>
</device>
</devices>
All devices defined in the experiment file are grouped in .The ID is set to . As an ID is unique for an entire experiment file, it can be used later on to refer to this device (eg in datablocks).
the attribute tells APEX 4 that a sound card is used. The experiment only starts if all devices can be opened.
specifies the software driver to be used for sound output. If unsure, set it to .
specifies the name of the sound card to be used. The system default card can be used by specifying as a card name. Other card names can be defined in .
the sampling frequency of the sound card. Not all sampling rates are supported by all devices, and some drivers automatically convert the sampling rate. Check your sound card documentation. The sample rate of the sound card should correspond to the sampling rates of all used with it.
<filters>
<filter xsi:type="apex:dataloop" id="noisegen">
<device>wavdevice</device>
<channels>1</channels>
<continuous>false</continuous>
<datablock>noisedata</datablock>
<basegain>-5</basegain>
<gain>0</gain>
<randomjump>true</randomjump>
</filter>
<filter xsi:type="apex:amplifier" id="amplifier" >
<device>wavdevice</device>
<channels>1</channels>
<basegain>-5</basegain>
<gain id="gain">0</gain>
</filter>
</filters>
contains individual elements, which specify a filter, or as a special case a generator (i.e., a filter without input channels).
The attribute tells APEX 4 that a dataloop generator has to be created. This is a generator that takes a datablock and loops it infinitely. The datablock to be looped is specified by its ID .
on line [xml:filter2] the attribute tells APEX 4 that an amplifier has to be created. The gain of this amplifier will be varied to change the amplitude of the words and thus the SNR. It is assigned ID . The gain of the amplifier is made a variable parameter by assigning it ID
the device with which the filter is associated
The number of channels of the filter. The available number of channels depends on the type of filter. An amplifier can have any number of channels.
If set to the noise is presented during the speech, but not during the subject’s response.
the datablock with ID noisedata, specified under will be looped.
: the total gain of the amplifier is basegain+gain. The total gain of the complete output system should not be larger than 0 to avoid clipping of the signal. This is why basegain = -5.
the gain value that is changed. E.g. if the targetamplitude is 65 dB SPL (see Calibration) the signal and noise have equal amplitude if gain = 0. Gain is changed by other modules.
If is set to , when the dataloop is started, it will jump to a random sample in the datablock. Thereafter it is looped.
<stimuli>
<fixed_parameters>
<parameter id="sentence"/>
</fixed_parameters>
<stimulus id="stimulus_sentence1">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_sentence1"/>
<datablock id="silence"/>
</sequential>
</datablocks>
<fixedParameters>
<parameter id="sentence">This is <b> sentence </b> <b>one</b></parameter>
</fixedParameters>
</stimulus>
<stimulus id="stimulus_sentence2">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_sentence2"/>
<datablock id="silence"/>
</sequential>
</datablocks>
<fixedParameters>
<parameter id="sentence">This is <b> sentence </b> <b>two</b></parameter>
</fixedParameters> </stimulus>
<stimulus id="stimulus_sentence3">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_sentence3"/>
<datablock id="silence"/>
</sequential>
</datablocks>
<fixedParameters>
<parameter id="sentence">This is <b> sentence </b> <b>three</b></parameter>
</fixedParameters>
</stimulus>
<stimulus id="stimulus_sentence4">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_sentence4"/>
<datablock id="silence"/>
</sequential>
</datablocks>
<fixedParameters>
<parameter id="sentence">This is <b> sentence </b> <b>four</b></parameter>
</fixedParameters>
</stimulus>
<stimulus id="stimulus_sentence5">
<datablocks>
<sequential>
<datablock id="silence"/>
<datablock id="datablock_sentence5"/>
<datablock id="silence"/>
</sequential>
</datablocks>
<fixedParameters> <parameter id="sentence">This is <b> sentence
</b> <b>five</b> </parameter> </fixedParameters> </stimulus>
</stimuli>
contains different , each with an ID.
is used here to be able to show the sentence under test on the Screen. Fixed parameters are discussed in section [sec:Parameters].
Each stimulus gets an ID (referred to in )
here one refers to the described before; it includes the sentence file.
sets the fixed parameter for each .
indicates which words (the keywords) should appear in bold on screen.
This is repeated for all the sentences.
<connections>
<connection>
<from>
<id>_ALL_</id>
<channel>0</channel>
</from>
<to>
<id>amplifier</id>
<channel>0</channel>
</to>
</connection>
<connection> (*@\label{xml:ch1}@*)
<from>
<id>amplifier</id>
<channel>0</channel>
</from>
<to>
<id>wavdevice</id>
<channel>0</channel>
</to>
</connection> (*@\label{xml:ch2}@*)
<connection> (*@\label{xml:ch3}@*)
<from>
<id>noisegen</id>
<channel>0</channel>
</from>
<to>
<id>wavdevice</id>
<channel>0</channel>
</to>
</connection> (*@\label{xml:ch4}@*)
</connections>
A visual representation of connections can be obtained by choosing “Show stimulus connections” under “Experiment”in the main APEX 4 menu (top left menu bar).
<results>
<page>apex:resultsviewer.html</page>
<resultparameters>
<parameter name="reversals for mean">4</parameter>
</resultparameters>
<showduringexperiment>false</showduringexperiment>
<showafterexperiment>true</showafterexperiment>
</results>
Even if is not specified in the experiment file APEX 4 will save a results file in XML.
URL of the html page to show in the results window. The page should have the appropriate java script methods embedded. More example pages can be found in the APEX 4 resultsviewer folder.
Parameters to be passed to the results page. Each parameter will be set in hash params. In this example, the result will be calculated as the mean of the variable parameter (gap) at the last 4 reversals.
If true, an extra window will be created which will show the results of the current experiment while the experiment is being executed. Javascript embedded in the page will be executed upon each new trial.
If true, when the experiment is finished, a dialog box will appear querying whether results should be shown. If the answer is affirmative, a new window will be opened and the results will be shown after javascript processing.
<interactive> <entry type="int" description="SNR start value"
expression="/apex:apex/procedure/parameters/start_value" default="4" />
</interactive>
If a small part of an experiment file has to be changed right before the start of an experiment (e.g. a start value, a gain value, the subject’s name), APEX 4 can show the experimenter a small containing the elements to be changed. This is accomplished by defining the element in the experiment file.
In this example we will modify the gain of the filter with ID to a value that is entered by the experimenter at the start of the experiment.
a value is entered, here corresponding to SNR in dB. It is also possible to enter a string, e.g. name of the subject (see Reference Manual).
the interactive window will show 4 as default value; more than one entry may be defined.
See . This is an example of a gap detection task: two stimuli are presented to the listener in random order, a stationary noise and an interrupted noise. During the presentation the intervals are highlighted. The subject’s task is to indicate the interval with the interruption(figure [fig:gapdetection]). Feedback is provided (thumb up, thumb down) and the minimal detectable gap is determined by means of an adaptive procedure (here 2-down, 1-up). Stimuli (wave files) are generated off line. This example only includes 5 wave files. Usually many more are generated. The results are written to a text file.
The experiment as described in the previous paragraph should first be translated to concepts understood by APEX 4. The main concepts used here are procedure, screens, datablocks and stimuli.
For each wave file (noise with or without a gap) a is defined, and for each datablock a is defined. In this example there are 5 wave files, with gap sizes ranging between 1 and 5 ms. Their IDs are , , , and . In an adaptive procedure either a fixed or variable parameter is defined. In this example a fixed parameter is used, i.e. the gap size in the stimulus. The wave files with different gap sizes are stored on disk, and are assigned a certain gap value. This gap value is used to determine the gap threshold. Also, a is defined that shows the two response intervals indicating “1” and “2”.
To indicate the order in which the stimuli should be presented a is defined. An adaptive procedure is defined containing 1 with five variable stimuli (with gap) and the standard stimulus without the gap. Recall that a is the combination of a (always the same in this example), a stimulus and a correct answer. The standard and stimuli occur randomly in one of both intervals.
Now only the output logic remains to be defined. The idea is to present the standard and a variable stimulus after each other, and the stimulus to be presented depends on the response of the subject. Filters are not used since the signals are not changed.
In the following sections each of the elements of the XML file necessary to implement the latter concepts will be described in detail.
<procedure xsi:type="apex:adaptiveProcedure">
<parameters>
<presentations>1</presentations>
<order>sequential</order>
<intervals count="2">
<interval number="1" element="button1"/>
<interval number="2" element="button2"/>
</intervals>
<pause_between_stimuli>1000</pause_between_stimuli>
<nUp>1</nUp>
<nDown>2</nDown>
<adapt_parameter>gap</adapt_parameter>
<start_value>5</start_value>
<stop_after_type>reversals</stop_after_type>
<stop_after>5</stop_after>
<min_value>0</min_value>
<max_value>5</max_value>
<larger_is_easier>true</larger_is_easier>
<stepsizes>
<change_after>reversals</change_after>
<stepsize begin="0" size="2"/>
<stepsize begin="2" size="1"/>
</stepsizes>
</parameters>
<trials>
<trial id="trial1" >
<screen id="screen1" />
<stimulus id="stimulus1" />
<stimulus id="stimulus2"/>
<stimulus id="stimulus3"/>
<stimulus id="stimulus4"/>
<stimulus id="stimulus5"/>
<standard id="standard"/>
</trial>
</trials>
</procedure>
The attribute refers to a procedure in which a parameter is changed according to the response of the subject. In this example 1 trial is defined with different stimuli from which the adaptive procedure chooses.
defines the behavior of the procedure (eg., nr of presentations, order of presentation, response strategy).
every trial is presented once.
applies to the order of the trials. Since there is only 1 , it does not matter here wether the order is specified as or .
the corrector checks whether the response is correct or not. In this example the number of choices in was 2. This means that will present the target stimulus in either interval 1 or 2. informs about the correct interval. also receives the clicked button from the screen and looks up the corresponding number in the element above and compares it with the number it received from .
number of alternatives to choose from (here: 2 intervals) and the IDs of the buttons (defined under they correspond to.
a pause of 1000 ms will be introduced between successive wave files;
number of items after incorrect trials to increase the gap
number of items after correct trials to decrease the gap
the gap size cannot be smaller than 0.
the gap size cannot be larger than 5
the parameter to change, here the “gap”, see also
the gap at which to start, here 5, see under
reversals (it can also stop after a number of presentations or trials)
number of reversals after which the procedure is stopped
the number of reversals that are used for the average threshold
here (the smaller the gap, the more difficult the task)
the stepsize
only 1 trial is defined
the ID of the trial
the ID of the screen
the ID of the stimulus
the ID of the standard
<screens>
<reinforcement>
<progressbar>true</progressbar>
<feedback length="300">true</feedback>
<showcurrent>true</showcurrent>
</reinforcement>
<screen id="screen1" >
<gridLayout height="1" width="2" id="main_layout">
<button x="1" y="1" id="button1" >
<text>1</text>
</button>
<button x="2" y="1" id="button2" >
<text>2</text>
</button>
</gridLayout>
<buttongroup id="buttongroup1">
<button id="button1"/>
<button id="button2"/>
</buttongroup>
<default_answer_element>buttongroup1</default_answer_element>
</screen>
</screens>
contains several screen elements that can be referred to elsewhere in the experiment file (e.g. in above).
includes elements on progress and feedback
if a progress bar will be displayed in the right hand bottom corner of the screen. The progress bar can indicate the percentage of trials that have been done or it shows when a reversal occurs in an adaptive procedure. In the latter case the progress bar will increase at every reversal while the number of trials varies.
duration of the time after response (in msec) that APEX 4 waits before presenting the next trial. During this interval feedback can be displayed.
if the interval is highlighted while a signal is presented.
each screen has an ID by which it can be referred to elsewhere in the experiment. In this example the screen displays two intervals.
places elements in an irregular grid. The screen is divided into sections according to the values. In this example there is an equal number of rows (x) and columns (y).
Gridlayout defines a group of screen elements (those that are displayed on the screen).
for each interval a button is specified; this button (interval) displays a number on the screen
the left interval denotes “1”, the right one denotes “2”.
defines a group of screen elements (those that are displayed on the screen). As many elements can be defined in a screen, APEX 4 has no way to know which element contains the subject’s response. Therefore, in the element is designated that contains the subject’s response. In the case of screen elements that are clicked in order to respond, the example is further complicated by the fact that we cannot specify just one of the elements (one button, one picture), but that the response rather comes from a group of elements. This is when a can be used to group together different screen elements.
<datablocks>
<uri_prefix>Gapfiles</uri_prefix>
<datablock id="g5ms" >
<device>wavdevice</device>
<uri>g5.wav</uri>
</datablock>
<datablock id="g4ms" >
<device>wavdevice</device>
<uri>g4.wav</uri>
</datablock>
<datablock id="g3ms" >
<device>wavdevice</device>
<uri>g3.wav</uri>
</datablock>
<datablock id="g2ms" >
<device>wavdevice</device>
<uri>g2.wav</uri>
</datablock>
<datablock id="g1ms" >
<device>wavdevice</device>
<uri>g1.wav</uri>
</datablock>
<datablock id="datablockref">
<device>wavdevice</device>
<uri>ref500.wav</uri>
</datablock>
</datablocks>
contains a list of elements and a prefix.
: a relative path is specified here. Since APEX 4 knows the location of the experiment file, only the folder containing the wave files and pictures must be specified.
for each wave file a unique datablock is defined by an ID. The standard signal (uninterrupted noise) must also be specified here.
each datablock includes the audio device to which the signal is routed
since the path is defined in it is not necessary to specify the entire path again
<devices>
<device id="wavdevice" xsi:type="apex:wavDeviceType">
<driver>portaudio</driver>
<card>default</card>
<channels>2</channels>
<gain>0</gain>
<samplerate>44100</samplerate>
</device>
</devices>
all devices defined in the experiment file are grouped in the . Only 1 is used in this example. The ID is set to soundcard. As an ID is unique for an entire experiment file, it can be used later on to refer to this device.
the attribute tells APEX 4 that a sound card is used. The experiment only starts if all devices can be opened.
specifies the software driver to be used for sound output. If unsure, set it to .
specifies the name of the sound card to be used. The system default card can be used by specifying as a card name. Other card names can be defined in ApexConfig.
2 channels are specified here, because the signal is stereo.
the sampling frequency of the wave files. Not all sampling rates are supported by all devices, and some drivers automatically convert the sampling rate. Check your sound card documentation. The sample rate of the sound card should correspond to the sampling rates of all datablocks used with it.
<stimuli>
<fixed_parameters>
<parameter id="gap"/>
</fixed_parameters>
<stimulus id="stimulus1" >
<description>noisewithgap1</description>
<datablocks>
<datablock id="g5ms" />
</datablocks>
<fixedParameters>
<parameter id="gap">5</parameter>
</fixedParameters>
</stimulus>
<stimulus id="stimulus2" >
<description>noisewithgap2</description>
<datablocks>
<datablock id="g4ms" />
</datablocks>
<fixedParameters>
<parameter id="gap">4</parameter>
</fixedParameters>
</stimulus>
<stimulus id="stimulus3" >
<description>noisewithgap3</description>
<datablocks>
<datablock id="g3ms" />
</datablocks>
<fixedParameters>
<parameter id="gap">3</parameter>
</fixedParameters>
</stimulus>
<stimulus id="stimulus4" >
<description>noisewithgap4</description>
<datablocks>
<datablock id="g2ms" />
</datablocks>
<fixedParameters>
<parameter id="gap">2</parameter>
</fixedParameters>
</stimulus>
<stimulus id="stimulus5" >
<description>noisewithgap5</description>
<datablocks>
<datablock id="g1ms" />
</datablocks>
<fixedParameters>
<parameter id="gap">1</parameter>
</fixedParameters>
</stimulus>
<stimulus id="standard">
<datablocks>
<datablock id="datablockref"/>
</datablocks>
<fixedParameters>
<parameter id="gap">0</parameter>
</fixedParameters>
</stimulus>
</stimuli>
defines the auditory events, e.g. noise with gap and noise without gap.
this element includes a description of the (variable) stimulus
<connections>
<connection>
<from>
<id>_ALL_</id>
<channel>0</channel>
</from>
<to>
<id>wavdevice</id>
<channel>1</channel>
</to>
</connection>
</connections>
A visual representation of connections can be obtained by choosing “Show stimulus connections” under “Experiment”in the main APEX 4 menu (top left menu bar).
<results>
<page>apex:resultsviewer.html</page>
<resultparameters>
<parameter name="reversals for mean">3</parameter>
</resultparameters>
<showduringexperiment>false</showduringexperiment>
<showafterexperiment>true</showafterexperiment>
</results>
Even if is not specified in the experiment file APEX 4 will save a results file in XML. The results file will display the correct answers, the reversals, the entire sequence of responses, and the average threshold based on the number of reversals and the magnitude of the corresponding gap parameter specified in the experiment file.
URL of the html page to show in the results window. The page should have the appropriate java script methods embedded. More example pages can be found in the APEX 4 resultsviewer folder.
Parameters to be passed to the results page. Each parameter will be set in hash params.
If , an extra window will be created which will show the results of the current experiment while the experiment is being executed. Javascript embedded in the page will be executed upon each new trial.
If , when the experiment is finished, a dialog box will appear querying whether results should be shown. If the answer is affirmative, a new window will be opened and the results will be shown after javascript processing.
<general>
<exitafter>true</exitafter>
</general>
defines some general parameters.
See . This is an example of a gap detection task adapted to the interest of children: two stimuli are presented to the listener in random order, a stationary noise and an interrupted noise. It is the same experiment as example 3, but pictures (movies) of cars replace buttons on the screen, and a smiley panel is shown (figure [fig:gapchild]). During the presentation of stimuli the cars are animated. The child’s task is to indicate the stimulus with the interruption. Feedback is provided by smileys and the minimal detectable gap is determined by means of an adaptive procedure (here 2-down, 1-up). Only those elements that are specific to the child mode are described in this example.
The main concepts illustrated in this example are childmode, and reinforcement. Child mode involves a different panel, and intro/outro movies.
<screens>
<uri_prefix>car/</uri_prefix>
<general>
<showpanel>true</showpanel>
</general>
<reinforcement>
<progressbar>true</progressbar>
<feedback length="300">true</feedback>
<showcurrent>true</showcurrent>
</reinforcement>
<childmode>
<panel>reinforcement.swf</panel>
</childmode>
<screen id="screen1">
<gridLayout height="1" width="2" id="main_layout">
<flash row="1" col="1" id="button1">
<path>stillcar.swf</path>
<feedback>
<highlight>rijden.swf</highlight>
<positive>goodcar.swf</positive>
<negative>badcar.swf</negative>
</feedback>
</flash>
<flash row="1" col="2" id="button2">
<path>stillcar.swf</path>
<feedback>
<highlight>rijden.swf</highlight>
<positive>goodcar.swf</positive>
<negative>badcar.swf</negative>
</feedback>
</flash>
</gridLayout>
<buttongroup id="buttongroup1">
<button id="button1"/>
<button id="button2"/>
</buttongroup>
<default_answer_element>buttongroup1</default_answer_element>
</screen>
</screens>
a relative path is specified here (relative with respect to the experiment file). This only applies to the movies in . There are 3 ways to specify a prefix: by directly specifying an absolute path, by directly specifying a path relative to the experiment file or by referring to a prefix stored in . Please refer to Using prefixes for more information.
If a progress bar will be displayed on the right hand side with smileys. The progress bar shows when a reversal occurs in an adaptive procedure (while the number of trials varies).
duration of the time after response (in msec) that APEX 4 waits before presenting the next trial. During this interval feedback can be displayed
the interval is highlighted while a signal is presented. In this childfriendly example, the car corresponding to the present interval is moving.
replaces the “standard” panel, sets some defaults, enables intro/outro movies and changes the background colour
Each screen has an ID by which it can be referred to elsewhere in the experiment. In this example the screen displays two movies, each containing a car.
places elements in an irregular grid. The screen is divided into sections according to the values. In this example there are two columns and one row.
replaces of the standard version
the name of the flash movie file on disk, for the case without animation (still car).
the name of the movie file indicating the present interval is active (here the moving car)
the name of the movie file following a correct response (here a monkey waving)
the name of the movie file following an incorrect response (the trunk of an elephant)
defines a group of screen elements (those that are displayed on the screen). As many elements can be defined in a screen, APEX 4 has no way to know which element contains the subject’s response. Therefore, in the element is designated that contains the subject’s response. In the case of screen elements that are clicked in order to respond, the example is further complicated by the fact that we cannot specify just one of the elements (buttons, pictures), but that the response rather comes from a group of elements. This is when a can be used to group together different screen elements.
A spinbox is an input field that only accepts numbers and has 2 buttons to respectively increase or decrease its value ↩