<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Swinden</id>
	<title>BCI2000 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.bci2000.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Swinden"/>
	<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php/Special:Contributions/Swinden"/>
	<updated>2026-06-09T09:48:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:P3SpellerTask&amp;diff=5469</id>
		<title>User Reference:P3SpellerTask</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:P3SpellerTask&amp;diff=5469"/>
		<updated>2009-11-03T14:55:39Z</updated>

		<summary type="html">&lt;p&gt;Swinden: Fixed anchor link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; filter implements Donchin&#039;s matrix speller paradigm (Sellers, Donchin, Schalk, 2004).&lt;br /&gt;
Such a matrix speller presents a matrix of options; rows and columns of that matrix are flashed to elicit an evoked response  (ERP) whenever the user&#039;s attended matrix element is flashed.&lt;br /&gt;
From ERP classification results, the speller then derives which of the matrix elements was attended to, and executes the action corresponding to that matrix element. Typically, this action will consist in adding a character to a text window. &lt;br /&gt;
&lt;br /&gt;
Beyond the basic features, the &#039;&#039;P3SpellerTask&#039;&#039; provides the ability to handle multiple speller menus, saving and recovering the text buffer, and an option to exchange information with an external program.&lt;br /&gt;
&lt;br /&gt;
Typically, the &#039;&#039;P3SpellerTask&#039;&#039; is used in conjunction with the [[User Reference:P3TemporalFilter|P3TemporalFilter]] signal processing filter.&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; displays matrix of characters, where the 6 by 6 matrix is the most common size (see Figure 1). &lt;br /&gt;
The user&#039;s task is to focus attention on characters in a word that is prescribed by the investigator (i.e., one character at a time), and displayed on the user&#039;s screen.&lt;br /&gt;
Alternatively, the user may freely choose letters he attends to, using the speller as a true communication device.&lt;br /&gt;
&lt;br /&gt;
All rows and columns of this matrix are successively and randomly intensified.&lt;br /&gt;
For a full set of intensifications of rows or columns, two contain the desired character (i.e., one particular row and one particular column).&lt;br /&gt;
The responses evoked by these infrequent stimuli are different from those evoked by the stimuli that did not contain the desired character, in a manner similar to the classical P300 paradigm (Donchin, 1988).&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; will catch such responses and then determine the character that user had focused on, and will print the character to the screen (below the word to spell) for the user to verify.&lt;br /&gt;
&lt;br /&gt;
The entire set of stimuli is usually flashed several times before the &#039;&#039;P3SpellerTask&#039;&#039; calculates the desired character.&lt;br /&gt;
To ensure maximum efficiency of character prediction, it is important that the stimuli are infrequent even between sequences. Therefore, the &#039;&#039;P3SpellerTask&#039;&#039; avoids starting a sequence with the row or column that was intensified last in the previous sequence.&lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerScreen.PNG|center|frame|Figure1: A 6 by 6 speller matrix. Here, the user&#039;s task is to spell the word &amp;quot;SEND&amp;quot; (one character at a time).  For each character, all rows and columns in the matrix are intensified a number of times (here, the third row is shown intensified).]]&lt;br /&gt;
&lt;br /&gt;
===Visual Representation===&lt;br /&gt;
&lt;br /&gt;
The visual representation is divided into three parts (Figure 2):&lt;br /&gt;
*&#039;&#039;Text to Spell&#039;&#039; displays the text that the user needs to spell (only used in copy spelling mode).&lt;br /&gt;
*&#039;&#039;Text Result&#039;&#039; holds the letters spelled up to the current moment.&lt;br /&gt;
*&#039;&#039;Speller Display&#039;&#039; is the area that contains the speller matrix.  &lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerScreenElements.PNG|center|frame|Figure 2: Elements of the user&#039;s screen. &#039;&#039;Text To Spell&#039;&#039; indicates the pre-defined text. The speller will analyze evoked responses, and will append the selected text to &#039;&#039;Text Result&#039;&#039;.]]&lt;br /&gt;
&lt;br /&gt;
In addition to the text characters, it is possible to display icons (bitmaps) in the P3Speller matrix. This can be achieved by entering the appropriate file name for the icon in column 4 of the desired cell in the &#039;&#039;TargetDefinition&#039;&#039; parameter. The icon will be flashed (highlighted) using a number of methods (see the description of the &#039;&#039;IconHighlightMode&#039;&#039; parameter below).&lt;br /&gt;
&lt;br /&gt;
As new characters are added to the right, the &#039;&#039;Text Result&#039;&#039; area gets filled; once there is no space left, the text is scrolled to the left in order to accommodate for additional characters.&lt;br /&gt;
&lt;br /&gt;
It is also possible to play a sound file or to &amp;quot;speak&amp;quot; text (using a Text-to-Speech engine) when a cell is selected. To play a sound file, the sound file name should be entered in column 5 of the desired cell in the target definition matrix. To enable a text-to-speech function, the text to be &amp;quot;spoken&amp;quot; should be entered in column 5 of the desired cell in the target definition matrix within single quotes (e.g. &#039;text&#039;), as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerCommandExample.PNG|center|frame|TargetDefinitionMatrix]] &lt;br /&gt;
&lt;br /&gt;
The Text-to-Speech engine uses the system&#039;s &amp;quot;default voice&amp;quot; setting (Control Panel-&amp;gt;Speech-&amp;gt;TextToSpeech-&amp;gt;Voice Selection).  Male or female voices may be selected.&lt;br /&gt;
&lt;br /&gt;
===Nested Matrices Howto===&lt;br /&gt;
To allow for more flexibility in real-world applications, multiple speller matrices can be specified, and may be traversed in a &amp;quot;nested&amp;quot; manner.&lt;br /&gt;
For example, one of the cells in the first matrix may be tied to another matrix which is displayed when this cell is selected by the user. &lt;br /&gt;
This capability may be used to design a menu based user interface.&lt;br /&gt;
&lt;br /&gt;
To use the nested menu capability, the following steps need to be executed:&lt;br /&gt;
&lt;br /&gt;
====Set up the Target Definition matrix====&lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMatricesWindow.PNG|center|frame|Figure 3: Target Definition matrix for 4 nested menus]]&lt;br /&gt;
&lt;br /&gt;
To maintain backward compatibility and for ease of configuration, the application will not support nested functionality by simply converting one cell of the &#039;old&#039; target definition matrix to a sub-matrix. To define nested matrices, the &#039;&#039;TargetDefinition&#039;&#039; parameter must be defined with 1 column and each cell as a sub-matrix. If it has more than one column, the application will treat it as a single matrix and will ensure that each of its cells is defined as a single value.&lt;br /&gt;
&lt;br /&gt;
====Convert each cell to a sub-matrix====&lt;br /&gt;
In the GUI, this is done by right-clicking on each cell as shown in Figure 4, and choosing &amp;quot;Convert to sub-matrix&amp;quot; from the context menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMatricesConvert.PNG|center|frame|Figure 4: Converting cells to sub-matrices]]&lt;br /&gt;
&lt;br /&gt;
====Configure individual sub matrices====&lt;br /&gt;
Each cell in a nested matrix is a sub-matrix (as shown in Figure 3) and needs to be configured individually.  &lt;br /&gt;
In the GUI, clicking on a cell that is a sub-matrix will bring up that matrix in another window, as shown in Figure 5.&lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMatricesSubmatrix.PNG|center|frame|Figure 5: Configuring individual sub-matrices]]&lt;br /&gt;
&lt;br /&gt;
Each sub-matrix should be configured to have a minimum of 3 columns and can have up to 5 columns if it needs to display icons or play sounds.&lt;br /&gt;
&lt;br /&gt;
====Enable transition from one menu to another====&lt;br /&gt;
Special control codes (speller commands) allow transition from one matrix to another.&lt;br /&gt;
To go to a different matrix when an item is selected, enter the &amp;lt;GOTO#&amp;gt; command into its &amp;quot;Enter&amp;quot; column, replacing &amp;quot;#&amp;quot; with the (one-based) index of the corresponding matrix (menu).&lt;br /&gt;
The &amp;lt;BK&amp;gt; command will go back to the previous menu/matrix (see Figure 5).&lt;br /&gt;
&lt;br /&gt;
====Number of Rows and Columns of each nested menu (matrix)====&lt;br /&gt;
The number of rows and columns in each sub-matrix needs to be entered into the &#039;&#039;NumMatrixRows&#039;&#039; and &#039;&#039;NumMatrixColumns&#039;&#039; parameters.  There, individual entries are separated by space characters. &lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMenusRowsColumns.PNG|center|frame|Figure 6: Rows and Columns of each sub-matrix]]&lt;br /&gt;
&lt;br /&gt;
Figure 6 indicates that the first three sub-matrices are 2x2, while the sub-matrix at index 4 is a 6x6 matrix.&lt;br /&gt;
&lt;br /&gt;
In case of a single (non-nested) matrix, there will be only one entry in the NumMatrixRows and NumMatrixColumns parameters.&lt;br /&gt;
&lt;br /&gt;
====Select first menu to be displayed====&lt;br /&gt;
&lt;br /&gt;
The index of the menu to be displayed first (i.e. when the application is started) is entered in the &#039;&#039;FirstActiveMenu&#039;&#039; parameter. In case of non-nested matrix configuration, this parameter should be left at its default value of 1.&lt;br /&gt;
&lt;br /&gt;
The overall appearance of a nested matrix configuration is shown in Figure 7 below.&lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerMultipleMenus.PNG|center|frame|Figure 7:  Nested matrix Configuration]]&lt;br /&gt;
&lt;br /&gt;
===Testing Matrix Menus===&lt;br /&gt;
In order to test matrix menu configurations, the &#039;&#039;P3SpellerTask&#039;&#039; may be put into a [[#TestMode|test mode]].&lt;br /&gt;
In this mode, mouse clicks into matrix elements are registered during sequence presentation, and force selection of the respective matrix element.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please note that the [[#DisplayResults|DisplayResults]] parameter needs to be turned on in order to be able to select sub matrices.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Pause and Sleep===&lt;br /&gt;
There are two speller commands that allow the user to suspend operation of the &#039;&#039;P3SpellerTask&#039;&#039; either momentarily or for an extended period of time, &amp;lt;PAUSE&amp;gt; and &amp;lt;SLEEP&amp;gt;.&lt;br /&gt;
To associate speller commands with certain matrix elements, specify them in the &amp;quot;Enter&amp;quot; column of the desired matrix element in the target definition matrix.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;PAUSE&amp;gt; speller command pauses the &#039;&#039;P3SpellerTask&#039;&#039;: While the system is paused, the matrix will continue to flash but target selections shall be ignored until the user resumes system operation, which is achieved by selecting &amp;lt;PAUSE&amp;gt; again. &lt;br /&gt;
Data recording is also suspended while the system is paused. &lt;br /&gt;
The &amp;quot;goal text&amp;quot; line of the status bar indicates that the system is paused.&lt;br /&gt;
&lt;br /&gt;
For a matrix having N entries, one of which is &amp;lt;PAUSE&amp;gt;, the chance to erroneously resume system operation while paused is 1/N per selection. On average, this will happen after N selections in paused state. A second speller command, &amp;lt;SLEEP&amp;gt;, is provided as a safer option. Once in sleep state, the system will resume only after receiving two consecutive &amp;lt;SLEEP&amp;gt; selections, which requires N^2 selections on average to occur by chance.&lt;br /&gt;
When in sleep mode, the &amp;quot;goal text&amp;quot; line of the status bar will instruct the user to select the &amp;lt;SLEEP&amp;gt; command twice to restart.&lt;br /&gt;
&lt;br /&gt;
===Text Window===&lt;br /&gt;
The capability to display user selected text in a text window is available.&lt;br /&gt;
This feature can be activated by selecting the &#039;&#039;TextWindowEnabled&#039;&#039; parameter. &lt;br /&gt;
The text window can be enabled only in online (free spelling) mode. &lt;br /&gt;
Position and size of the window, as well as display font, are configurable.&lt;br /&gt;
&lt;br /&gt;
When the text window is enabled, any text that the user selects will appear in the text window, in addition to the text result area of the &#039;&#039;P3SpellerTask&#039;&#039; display. The text window will scroll automatically.&lt;br /&gt;
&lt;br /&gt;
Two speller commands are available to perform Save and Retrieve operations on the text window. When the &amp;lt;SAVE&amp;gt; command is selected, the text in the text window will get written to a file and be erased from the window. The file name will be auto generated with the date and time stamp. The directory to which the file gets sent is configured in the &#039;&#039;TextWindowFilePath&#039;&#039; parameter.  The &amp;lt;RETR&amp;gt; (retrieve) function reads the latest file that was saved by the user and recalls the text into the text window. &lt;br /&gt;
&lt;br /&gt;
A separate &amp;quot;clear&amp;quot; command has not been provided in the text window functions to prevent unintentional deletion of its contents. The only way to clear the contents of the text window is using &amp;lt;SAVE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{{ApplicationBaseParams}}&lt;br /&gt;
{{StimulusTaskParams}}&lt;br /&gt;
&lt;br /&gt;
====NumberOfSequences====&lt;br /&gt;
The number of intensification sequences performed prior to each classification (selection of matrix elements).&lt;br /&gt;
For an NxM speller matrix, a single intensification sequences comprises N+M intensifications, one for each row, and one for each column.&lt;br /&gt;
Usually, this parameter is set to the same value as the P3TemporalFilter&#039;s [[User Reference:P3TemporalFilter#EpochsToAverage|EpochsToAverage]] parameter.&lt;br /&gt;
&lt;br /&gt;
====TargetDefinitions====&lt;br /&gt;
A 5-column matrix defining elements of the speller matrix. &lt;br /&gt;
Each row corresponds to a single matrix element; matrix elements are enumerated row-wise, beginning with the top left matrix element.&lt;br /&gt;
&lt;br /&gt;
For each matrix element, the value in the first column, labeled &#039;&#039;&#039;Display&#039;&#039;&#039;, contains a text string to be displayed in the matrix element, i.e. the matrix element&#039;s caption.&lt;br /&gt;
&lt;br /&gt;
The second column, labeled &#039;&#039;&#039;Enter&#039;&#039;&#039;, specifies the speller action to be performed upon the item&#039;s selection; in most cases, this action consists in entering a text string, and is specified by that string.&lt;br /&gt;
E.g., for the top left matrix element to display the caption &amp;quot;A&amp;quot;, and also enter the letter &amp;quot;A&amp;quot; on selection, both the &#039;&#039;Display&#039;&#039; and &#039;&#039;Enter&#039;&#039; columns will contain the letter &amp;quot;A&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The third column is labeled &#039;&#039;&#039;Size&#039;&#039;&#039;. It allows to specify an individual size for the matrix element, relative to the size of the other matrix elements.&lt;br /&gt;
&lt;br /&gt;
The fourth and fifth columns, labeled &#039;&#039;&#039;Icon File&#039;&#039;&#039; and &#039;&#039;&#039;Sound&#039;&#039;&#039;, respectively, contain the path to an icon file to be displayed, and a sound to be played, when the matrix element is selected. For icon files, Windows BMP format is accepted. Sounds are given as a path to a Windows WAV file, or as a text enclosed in single quotes. When a text is given, it will be spoken using the system&#039;s Text-To-Speech engine. &lt;br /&gt;
{{FilePath}}&lt;br /&gt;
&lt;br /&gt;
=====Speller Commands=====&lt;br /&gt;
Speller commands are specified in the &#039;&#039;TargetDefinitions&#039;&#039; matrix&#039; second column.&lt;br /&gt;
Speller commands may be sequences of characters, which are added to the speller text when the respective item is selected. Additionally, speller commands may be &#039;&#039;speller control commands&#039;&#039; enclosed in a pair of &amp;lt;&amp;gt; characters.&lt;br /&gt;
Any combination of characters and commands is allowed, and will be executed in sequence.&lt;br /&gt;
&lt;br /&gt;
Available &#039;&#039;&#039;speller control commands&#039;&#039;&#039; are&lt;br /&gt;
*&amp;lt;BS&amp;gt; (backspace) -- delete the last character from the current text.&lt;br /&gt;
*&amp;lt;DW&amp;gt; (delete word) -- delete the last word from the current text.&lt;br /&gt;
*&amp;lt;UNDO&amp;gt; -- undo the effect of the previous speller action.&lt;br /&gt;
*&amp;lt;END&amp;gt; -- end spelling, put BCI2000 in suspended mode.&lt;br /&gt;
*&amp;lt;SLEEP&amp;gt; -- suspend spelling; resume when &amp;lt;SLEEP&amp;gt; is selected two additional times.&lt;br /&gt;
*&amp;lt;PAUSE&amp;gt; -- suspend spelling; resume when &amp;lt;PAUSE&amp;gt; is selected again.&lt;br /&gt;
*&amp;lt;GOTO x&amp;gt; -- go to speller menu #x (see [[#Multiple Menus|Multiple Menus]]).&lt;br /&gt;
*&amp;lt;BACK&amp;gt;, &amp;lt;BK&amp;gt; -- return to the previously active speller menu.&lt;br /&gt;
*&amp;lt;SAVE&amp;gt; -- write the text window&#039;s content into a file located at [[#TextWindowFilePath|TextWindowFilePath]].&lt;br /&gt;
*&amp;lt;RETR&amp;gt; -- load the text window&#039;s content from the most recently saved file.&lt;br /&gt;
&lt;br /&gt;
=====Multiple Menus=====&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; allows you to specify a number of speller menus, and to switch between them using the &amp;lt;GOTO&amp;gt; and &amp;lt;BACK&amp;gt; speller commands.&lt;br /&gt;
For multiple speller menus, the &#039;&#039;TargetDefinitions&#039;&#039; matrix needs to be configured as a list of matrices, rather than a single matrix.&lt;br /&gt;
Then, each submatrix should have the form described above.&lt;br /&gt;
Each of the submatrices may have an individual number of rows and columns, and its own set of matrix elements.&lt;br /&gt;
&lt;br /&gt;
Also, switching to Multiple Menus implies additional entries in the following parameters:&lt;br /&gt;
*NumMatrixColumns, NumMatrixRows&lt;br /&gt;
*AudioStimuliRowsFiles, AudioStimuliRowsFiles (additional columns)&lt;br /&gt;
*TargetWidth, TargetHeight, TargetTextHeight, BackgroundColor&lt;br /&gt;
*TextColor, TextColorIntensified, IconHighlightMode, IconHighlightFactor&lt;br /&gt;
&lt;br /&gt;
====NumMatrixColumns, NumMatrixRows====&lt;br /&gt;
The number of columns/rows in the speller matrix.&lt;br /&gt;
For [[#Multiple Menus|Multiple Menus]], a list of numbers representing each menu&#039;s number of columns/rows.&lt;br /&gt;
&lt;br /&gt;
====AudioStimuliOn====&lt;br /&gt;
Switches playback of audio stimuli on or off.&lt;br /&gt;
&lt;br /&gt;
====AudioStimuliRowsFiles, AudioStimuliColsFiles====&lt;br /&gt;
Each of these parameters is a single-column matrix specifying audio files associated with speller rows or columns, respectively.&lt;br /&gt;
Whenever a row/column is highlighted, the associated audio file is played back.&lt;br /&gt;
For audio files, Windows WAV format is expected.&lt;br /&gt;
{{FilePath}}&lt;br /&gt;
Rather than the path to an audio file, text may be given, enclosed in single quotes. In this case, the text is rendered using the system&#039;s Text-To-Speech engine.&lt;br /&gt;
&lt;br /&gt;
====TargetWidth, TargetHeight====&lt;br /&gt;
A single matrix element&#039;s width/height in percent of screen width/height.&lt;br /&gt;
&lt;br /&gt;
====TargetTextHeight====&lt;br /&gt;
Matrix elements&#039; text height in percent of screen height.&lt;br /&gt;
&lt;br /&gt;
====BackgroundColor====&lt;br /&gt;
Matrix elements&#039; background color, given in RGB encoding.&lt;br /&gt;
&lt;br /&gt;
====TextColor, TextColorIntensified====&lt;br /&gt;
Text color in standard and highlighted (intensified) mode, given in RGB encoding.&lt;br /&gt;
&lt;br /&gt;
====IconHighlightMode====&lt;br /&gt;
An enumerated value specifiying how icons are highlighted on stimulus presentation:&lt;br /&gt;
*0 Show/Hide: icons are only visible during stimulus presentation,&lt;br /&gt;
*1 Intensify: highlight by increasing icon brightness,&lt;br /&gt;
*2 Grayscale: display a grayscale version during stimulus presentation,&lt;br /&gt;
*3 Invert: invert color/brightness values during stimulus presentation,&lt;br /&gt;
*4 Dim: decrease brightness during presentation.&lt;br /&gt;
&lt;br /&gt;
====IconHighlightFactor====&lt;br /&gt;
If &#039;&#039;IconHighlightMode&#039;&#039; is 1 or 4, this parameter defines the brightness scaling factor.&lt;br /&gt;
Dimming is equivalent to intensifying with a scaling factor less than 1.&lt;br /&gt;
&lt;br /&gt;
====FirstActiveMenu====&lt;br /&gt;
For multiple menus, the index of the menu that should be active at the start of a run.&lt;br /&gt;
&lt;br /&gt;
====StatusBarSize, StatusBarTextHeight====&lt;br /&gt;
The size and text height of the status bar in percent of screen height.&lt;br /&gt;
The status bar is located on top of the screen, and displays a line of text currently spelled.&lt;br /&gt;
In [[#InterpretMode|copy mode]], it also displays the text that the user is supposed to spell.&lt;br /&gt;
&lt;br /&gt;
====TextToSpell====&lt;br /&gt;
In [[#InterpretMode|copy mode]], a string of characters defining the text to be spelled by the user.&lt;br /&gt;
This text is displayed in the status bar, above the actually spelled text.&lt;br /&gt;
From the difference between &#039;&#039;TextToSpell&#039;&#039;, and the actually spelled text, the speller automatically derives which matrix element the user will need to select next.&lt;br /&gt;
This information is then used to set the [[#StimulusType|StimulusType]] state.&lt;br /&gt;
&lt;br /&gt;
====TextResult====&lt;br /&gt;
At the beginning of a run, this parameter&#039;s content is copied into the lower part of the status bar.&lt;br /&gt;
At the end of a run, the status bar&#039;s content is copied back into this parameter.&lt;br /&gt;
&lt;br /&gt;
====TestMode====&lt;br /&gt;
If this is switched on, clicking on a matrix element with the mouse will select it once the current sequence of intensifications is finished.&lt;br /&gt;
This is useful to test speller matrix configurations.&lt;br /&gt;
&lt;br /&gt;
====DestinationAddress====&lt;br /&gt;
A network address to receive speller output, given in IP:port format, e.g. &amp;lt;tt&amp;gt;localhost:3582&amp;lt;/tt&amp;gt;.&lt;br /&gt;
To this address, a UDP socket is opened, and written into, such that an external application may connect and receive information about selected matrix elements.&lt;br /&gt;
For each selection, the speller will write whatever is contained in the selected matrix element&#039;s &#039;&#039;Enter&#039;&#039; field, preceded with &amp;lt;tt&amp;gt;P3Speller_Output&amp;lt;/tt&amp;gt; and a space character, and followed with a &amp;lt;tt&amp;gt;\r\n&amp;lt;/tt&amp;gt; sequence (i.e., an MSDOS style line ending). E.g., the output will be &amp;lt;tt&amp;gt;P3Speller_Output A\r\n&amp;lt;/tt&amp;gt; when a matrix element is selected that enters the letter &amp;quot;A&amp;quot;, and &amp;lt;tt&amp;gt;P3Speller_Output &amp;lt;BS&amp;gt;\r\n&amp;lt;/tt&amp;gt; for a matrix element corresponding to the backspace command.&lt;br /&gt;
&lt;br /&gt;
====TextWindowEnabled====&lt;br /&gt;
If this flag is switched on, a separate window is displayed.&lt;br /&gt;
Once the status bar is filled, text flows into the window, and back in case of text deletion.&lt;br /&gt;
&lt;br /&gt;
====TextWindowLeft, TextWindowTop, TextWindowWidth, TextWindowHeight====&lt;br /&gt;
Position and dimension of the text window in pixels.&lt;br /&gt;
&lt;br /&gt;
====TextWindowFontName, TextWindowFontSize====&lt;br /&gt;
Text window font name and size.&lt;br /&gt;
&lt;br /&gt;
====TextWindowFilePath====&lt;br /&gt;
A (relative or absolute) path to a directory.&lt;br /&gt;
Upon the &amp;lt;SAVE&amp;gt; and &amp;lt;RETR&amp;gt; speller commands, the text window&#039;s contents are saved to/retrieved from a file located in that directory.&lt;br /&gt;
Repeated &amp;lt;SAVE&amp;gt; commands do not result in overwriting existing files.&lt;br /&gt;
Rather, existing files are preserved, and the most recent file&#039;s name is written into a pointer file.&lt;br /&gt;
{{FilePath}}&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
{{ApplicationBaseStates}}&lt;br /&gt;
{{StimulusTaskStates}}&lt;br /&gt;
&lt;br /&gt;
===SelectedTarget, SelectedRow, SelectedColumn===&lt;br /&gt;
Upon classification, these states are set to the selected target&#039;s ID, and its associated row and column, respectively.&lt;br /&gt;
A target&#039;s ID matches its row number in the &#039;&#039;TargetDefinitions&#039;&#039; matrix.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
{{StimulusTaskTimeline}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:P3TemporalFilter]], [[User Reference:StimulusPresentationTask]], [[Programming Reference:StimulusTask Class]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Filters]][[Category:User Application]][[Category:Specification]]&lt;/div&gt;</summary>
		<author><name>Swinden</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:P3SpellerTask&amp;diff=5468</id>
		<title>User Reference:P3SpellerTask</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:P3SpellerTask&amp;diff=5468"/>
		<updated>2009-11-03T14:51:51Z</updated>

		<summary type="html">&lt;p&gt;Swinden: Added DisplayResults dependency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; filter implements Donchin&#039;s matrix speller paradigm (Sellers, Donchin, Schalk, 2004).&lt;br /&gt;
Such a matrix speller presents a matrix of options; rows and columns of that matrix are flashed to elicit an evoked response  (ERP) whenever the user&#039;s attended matrix element is flashed.&lt;br /&gt;
From ERP classification results, the speller then derives which of the matrix elements was attended to, and executes the action corresponding to that matrix element. Typically, this action will consist in adding a character to a text window. &lt;br /&gt;
&lt;br /&gt;
Beyond the basic features, the &#039;&#039;P3SpellerTask&#039;&#039; provides the ability to handle multiple speller menus, saving and recovering the text buffer, and an option to exchange information with an external program.&lt;br /&gt;
&lt;br /&gt;
Typically, the &#039;&#039;P3SpellerTask&#039;&#039; is used in conjunction with the [[User Reference:P3TemporalFilter|P3TemporalFilter]] signal processing filter.&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; displays matrix of characters, where the 6 by 6 matrix is the most common size (see Figure 1). &lt;br /&gt;
The user&#039;s task is to focus attention on characters in a word that is prescribed by the investigator (i.e., one character at a time), and displayed on the user&#039;s screen.&lt;br /&gt;
Alternatively, the user may freely choose letters he attends to, using the speller as a true communication device.&lt;br /&gt;
&lt;br /&gt;
All rows and columns of this matrix are successively and randomly intensified.&lt;br /&gt;
For a full set of intensifications of rows or columns, two contain the desired character (i.e., one particular row and one particular column).&lt;br /&gt;
The responses evoked by these infrequent stimuli are different from those evoked by the stimuli that did not contain the desired character, in a manner similar to the classical P300 paradigm (Donchin, 1988).&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; will catch such responses and then determine the character that user had focused on, and will print the character to the screen (below the word to spell) for the user to verify.&lt;br /&gt;
&lt;br /&gt;
The entire set of stimuli is usually flashed several times before the &#039;&#039;P3SpellerTask&#039;&#039; calculates the desired character.&lt;br /&gt;
To ensure maximum efficiency of character prediction, it is important that the stimuli are infrequent even between sequences. Therefore, the &#039;&#039;P3SpellerTask&#039;&#039; avoids starting a sequence with the row or column that was intensified last in the previous sequence.&lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerScreen.PNG|center|frame|Figure1: A 6 by 6 speller matrix. Here, the user&#039;s task is to spell the word &amp;quot;SEND&amp;quot; (one character at a time).  For each character, all rows and columns in the matrix are intensified a number of times (here, the third row is shown intensified).]]&lt;br /&gt;
&lt;br /&gt;
===Visual Representation===&lt;br /&gt;
&lt;br /&gt;
The visual representation is divided into three parts (Figure 2):&lt;br /&gt;
*&#039;&#039;Text to Spell&#039;&#039; displays the text that the user needs to spell (only used in copy spelling mode).&lt;br /&gt;
*&#039;&#039;Text Result&#039;&#039; holds the letters spelled up to the current moment.&lt;br /&gt;
*&#039;&#039;Speller Display&#039;&#039; is the area that contains the speller matrix.  &lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerScreenElements.PNG|center|frame|Figure 2: Elements of the user&#039;s screen. &#039;&#039;Text To Spell&#039;&#039; indicates the pre-defined text. The speller will analyze evoked responses, and will append the selected text to &#039;&#039;Text Result&#039;&#039;.]]&lt;br /&gt;
&lt;br /&gt;
In addition to the text characters, it is possible to display icons (bitmaps) in the P3Speller matrix. This can be achieved by entering the appropriate file name for the icon in column 4 of the desired cell in the &#039;&#039;TargetDefinition&#039;&#039; parameter. The icon will be flashed (highlighted) using a number of methods (see the description of the &#039;&#039;IconHighlightMode&#039;&#039; parameter below).&lt;br /&gt;
&lt;br /&gt;
As new characters are added to the right, the &#039;&#039;Text Result&#039;&#039; area gets filled; once there is no space left, the text is scrolled to the left in order to accommodate for additional characters.&lt;br /&gt;
&lt;br /&gt;
It is also possible to play a sound file or to &amp;quot;speak&amp;quot; text (using a Text-to-Speech engine) when a cell is selected. To play a sound file, the sound file name should be entered in column 5 of the desired cell in the target definition matrix. To enable a text-to-speech function, the text to be &amp;quot;spoken&amp;quot; should be entered in column 5 of the desired cell in the target definition matrix within single quotes (e.g. &#039;text&#039;), as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerCommandExample.PNG|center|frame|TargetDefinitionMatrix]] &lt;br /&gt;
&lt;br /&gt;
The Text-to-Speech engine uses the system&#039;s &amp;quot;default voice&amp;quot; setting (Control Panel-&amp;gt;Speech-&amp;gt;TextToSpeech-&amp;gt;Voice Selection).  Male or female voices may be selected.&lt;br /&gt;
&lt;br /&gt;
===Nested Matrices Howto===&lt;br /&gt;
To allow for more flexibility in real-world applications, multiple speller matrices can be specified, and may be traversed in a &amp;quot;nested&amp;quot; manner.&lt;br /&gt;
For example, one of the cells in the first matrix may be tied to another matrix which is displayed when this cell is selected by the user. &lt;br /&gt;
This capability may be used to design a menu based user interface.&lt;br /&gt;
&lt;br /&gt;
To use the nested menu capability, the following steps need to be executed:&lt;br /&gt;
&lt;br /&gt;
====Set up the Target Definition matrix====&lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMatricesWindow.PNG|center|frame|Figure 3: Target Definition matrix for 4 nested menus]]&lt;br /&gt;
&lt;br /&gt;
To maintain backward compatibility and for ease of configuration, the application will not support nested functionality by simply converting one cell of the &#039;old&#039; target definition matrix to a sub-matrix. To define nested matrices, the &#039;&#039;TargetDefinition&#039;&#039; parameter must be defined with 1 column and each cell as a sub-matrix. If it has more than one column, the application will treat it as a single matrix and will ensure that each of its cells is defined as a single value.&lt;br /&gt;
&lt;br /&gt;
====Convert each cell to a sub-matrix====&lt;br /&gt;
In the GUI, this is done by right-clicking on each cell as shown in Figure 4, and choosing &amp;quot;Convert to sub-matrix&amp;quot; from the context menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMatricesConvert.PNG|center|frame|Figure 4: Converting cells to sub-matrices]]&lt;br /&gt;
&lt;br /&gt;
====Configure individual sub matrices====&lt;br /&gt;
Each cell in a nested matrix is a sub-matrix (as shown in Figure 3) and needs to be configured individually.  &lt;br /&gt;
In the GUI, clicking on a cell that is a sub-matrix will bring up that matrix in another window, as shown in Figure 5.&lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMatricesSubmatrix.PNG|center|frame|Figure 5: Configuring individual sub-matrices]]&lt;br /&gt;
&lt;br /&gt;
Each sub-matrix should be configured to have a minimum of 3 columns and can have up to 5 columns if it needs to display icons or play sounds.&lt;br /&gt;
&lt;br /&gt;
====Enable transition from one menu to another====&lt;br /&gt;
Special control codes (speller commands) allow transition from one matrix to another.&lt;br /&gt;
To go to a different matrix when an item is selected, enter the &amp;lt;GOTO#&amp;gt; command into its &amp;quot;Enter&amp;quot; column, replacing &amp;quot;#&amp;quot; with the (one-based) index of the corresponding matrix (menu).&lt;br /&gt;
The &amp;lt;BK&amp;gt; command will go back to the previous menu/matrix (see Figure 5).&lt;br /&gt;
&lt;br /&gt;
====Number of Rows and Columns of each nested menu (matrix)====&lt;br /&gt;
The number of rows and columns in each sub-matrix needs to be entered into the &#039;&#039;NumMatrixRows&#039;&#039; and &#039;&#039;NumMatrixColumns&#039;&#039; parameters.  There, individual entries are separated by space characters. &lt;br /&gt;
&lt;br /&gt;
[[Image:NestedMenusRowsColumns.PNG|center|frame|Figure 6: Rows and Columns of each sub-matrix]]&lt;br /&gt;
&lt;br /&gt;
Figure 6 indicates that the first three sub-matrices are 2x2, while the sub-matrix at index 4 is a 6x6 matrix.&lt;br /&gt;
&lt;br /&gt;
In case of a single (non-nested) matrix, there will be only one entry in the NumMatrixRows and NumMatrixColumns parameters.&lt;br /&gt;
&lt;br /&gt;
====Select first menu to be displayed====&lt;br /&gt;
&lt;br /&gt;
The index of the menu to be displayed first (i.e. when the application is started) is entered in the &#039;&#039;FirstActiveMenu&#039;&#039; parameter. In case of non-nested matrix configuration, this parameter should be left at its default value of 1.&lt;br /&gt;
&lt;br /&gt;
The overall appearance of a nested matrix configuration is shown in Figure 7 below.&lt;br /&gt;
&lt;br /&gt;
[[Image:P3SpellerMultipleMenus.PNG|center|frame|Figure 7:  Nested matrix Configuration]]&lt;br /&gt;
&lt;br /&gt;
===Testing Matrix Menus===&lt;br /&gt;
In order to test matrix menu configurations, the &#039;&#039;P3SpellerTask&#039;&#039; may be put into a [[#TestMode|test mode]].&lt;br /&gt;
In this mode, mouse clicks into matrix elements are registered during sequence presentation, and force selection of the respective matrix element.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please note that the [[DisplayResults]] parameter needs to be turned on in order to be able to select sub matrices.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Pause and Sleep===&lt;br /&gt;
There are two speller commands that allow the user to suspend operation of the &#039;&#039;P3SpellerTask&#039;&#039; either momentarily or for an extended period of time, &amp;lt;PAUSE&amp;gt; and &amp;lt;SLEEP&amp;gt;.&lt;br /&gt;
To associate speller commands with certain matrix elements, specify them in the &amp;quot;Enter&amp;quot; column of the desired matrix element in the target definition matrix.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;PAUSE&amp;gt; speller command pauses the &#039;&#039;P3SpellerTask&#039;&#039;: While the system is paused, the matrix will continue to flash but target selections shall be ignored until the user resumes system operation, which is achieved by selecting &amp;lt;PAUSE&amp;gt; again. &lt;br /&gt;
Data recording is also suspended while the system is paused. &lt;br /&gt;
The &amp;quot;goal text&amp;quot; line of the status bar indicates that the system is paused.&lt;br /&gt;
&lt;br /&gt;
For a matrix having N entries, one of which is &amp;lt;PAUSE&amp;gt;, the chance to erroneously resume system operation while paused is 1/N per selection. On average, this will happen after N selections in paused state. A second speller command, &amp;lt;SLEEP&amp;gt;, is provided as a safer option. Once in sleep state, the system will resume only after receiving two consecutive &amp;lt;SLEEP&amp;gt; selections, which requires N^2 selections on average to occur by chance.&lt;br /&gt;
When in sleep mode, the &amp;quot;goal text&amp;quot; line of the status bar will instruct the user to select the &amp;lt;SLEEP&amp;gt; command twice to restart.&lt;br /&gt;
&lt;br /&gt;
===Text Window===&lt;br /&gt;
The capability to display user selected text in a text window is available.&lt;br /&gt;
This feature can be activated by selecting the &#039;&#039;TextWindowEnabled&#039;&#039; parameter. &lt;br /&gt;
The text window can be enabled only in online (free spelling) mode. &lt;br /&gt;
Position and size of the window, as well as display font, are configurable.&lt;br /&gt;
&lt;br /&gt;
When the text window is enabled, any text that the user selects will appear in the text window, in addition to the text result area of the &#039;&#039;P3SpellerTask&#039;&#039; display. The text window will scroll automatically.&lt;br /&gt;
&lt;br /&gt;
Two speller commands are available to perform Save and Retrieve operations on the text window. When the &amp;lt;SAVE&amp;gt; command is selected, the text in the text window will get written to a file and be erased from the window. The file name will be auto generated with the date and time stamp. The directory to which the file gets sent is configured in the &#039;&#039;TextWindowFilePath&#039;&#039; parameter.  The &amp;lt;RETR&amp;gt; (retrieve) function reads the latest file that was saved by the user and recalls the text into the text window. &lt;br /&gt;
&lt;br /&gt;
A separate &amp;quot;clear&amp;quot; command has not been provided in the text window functions to prevent unintentional deletion of its contents. The only way to clear the contents of the text window is using &amp;lt;SAVE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{{ApplicationBaseParams}}&lt;br /&gt;
{{StimulusTaskParams}}&lt;br /&gt;
&lt;br /&gt;
====NumberOfSequences====&lt;br /&gt;
The number of intensification sequences performed prior to each classification (selection of matrix elements).&lt;br /&gt;
For an NxM speller matrix, a single intensification sequences comprises N+M intensifications, one for each row, and one for each column.&lt;br /&gt;
Usually, this parameter is set to the same value as the P3TemporalFilter&#039;s [[User Reference:P3TemporalFilter#EpochsToAverage|EpochsToAverage]] parameter.&lt;br /&gt;
&lt;br /&gt;
====TargetDefinitions====&lt;br /&gt;
A 5-column matrix defining elements of the speller matrix. &lt;br /&gt;
Each row corresponds to a single matrix element; matrix elements are enumerated row-wise, beginning with the top left matrix element.&lt;br /&gt;
&lt;br /&gt;
For each matrix element, the value in the first column, labeled &#039;&#039;&#039;Display&#039;&#039;&#039;, contains a text string to be displayed in the matrix element, i.e. the matrix element&#039;s caption.&lt;br /&gt;
&lt;br /&gt;
The second column, labeled &#039;&#039;&#039;Enter&#039;&#039;&#039;, specifies the speller action to be performed upon the item&#039;s selection; in most cases, this action consists in entering a text string, and is specified by that string.&lt;br /&gt;
E.g., for the top left matrix element to display the caption &amp;quot;A&amp;quot;, and also enter the letter &amp;quot;A&amp;quot; on selection, both the &#039;&#039;Display&#039;&#039; and &#039;&#039;Enter&#039;&#039; columns will contain the letter &amp;quot;A&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The third column is labeled &#039;&#039;&#039;Size&#039;&#039;&#039;. It allows to specify an individual size for the matrix element, relative to the size of the other matrix elements.&lt;br /&gt;
&lt;br /&gt;
The fourth and fifth columns, labeled &#039;&#039;&#039;Icon File&#039;&#039;&#039; and &#039;&#039;&#039;Sound&#039;&#039;&#039;, respectively, contain the path to an icon file to be displayed, and a sound to be played, when the matrix element is selected. For icon files, Windows BMP format is accepted. Sounds are given as a path to a Windows WAV file, or as a text enclosed in single quotes. When a text is given, it will be spoken using the system&#039;s Text-To-Speech engine. &lt;br /&gt;
{{FilePath}}&lt;br /&gt;
&lt;br /&gt;
=====Speller Commands=====&lt;br /&gt;
Speller commands are specified in the &#039;&#039;TargetDefinitions&#039;&#039; matrix&#039; second column.&lt;br /&gt;
Speller commands may be sequences of characters, which are added to the speller text when the respective item is selected. Additionally, speller commands may be &#039;&#039;speller control commands&#039;&#039; enclosed in a pair of &amp;lt;&amp;gt; characters.&lt;br /&gt;
Any combination of characters and commands is allowed, and will be executed in sequence.&lt;br /&gt;
&lt;br /&gt;
Available &#039;&#039;&#039;speller control commands&#039;&#039;&#039; are&lt;br /&gt;
*&amp;lt;BS&amp;gt; (backspace) -- delete the last character from the current text.&lt;br /&gt;
*&amp;lt;DW&amp;gt; (delete word) -- delete the last word from the current text.&lt;br /&gt;
*&amp;lt;UNDO&amp;gt; -- undo the effect of the previous speller action.&lt;br /&gt;
*&amp;lt;END&amp;gt; -- end spelling, put BCI2000 in suspended mode.&lt;br /&gt;
*&amp;lt;SLEEP&amp;gt; -- suspend spelling; resume when &amp;lt;SLEEP&amp;gt; is selected two additional times.&lt;br /&gt;
*&amp;lt;PAUSE&amp;gt; -- suspend spelling; resume when &amp;lt;PAUSE&amp;gt; is selected again.&lt;br /&gt;
*&amp;lt;GOTO x&amp;gt; -- go to speller menu #x (see [[#Multiple Menus|Multiple Menus]]).&lt;br /&gt;
*&amp;lt;BACK&amp;gt;, &amp;lt;BK&amp;gt; -- return to the previously active speller menu.&lt;br /&gt;
*&amp;lt;SAVE&amp;gt; -- write the text window&#039;s content into a file located at [[#TextWindowFilePath|TextWindowFilePath]].&lt;br /&gt;
*&amp;lt;RETR&amp;gt; -- load the text window&#039;s content from the most recently saved file.&lt;br /&gt;
&lt;br /&gt;
=====Multiple Menus=====&lt;br /&gt;
The &#039;&#039;P3SpellerTask&#039;&#039; allows you to specify a number of speller menus, and to switch between them using the &amp;lt;GOTO&amp;gt; and &amp;lt;BACK&amp;gt; speller commands.&lt;br /&gt;
For multiple speller menus, the &#039;&#039;TargetDefinitions&#039;&#039; matrix needs to be configured as a list of matrices, rather than a single matrix.&lt;br /&gt;
Then, each submatrix should have the form described above.&lt;br /&gt;
Each of the submatrices may have an individual number of rows and columns, and its own set of matrix elements.&lt;br /&gt;
&lt;br /&gt;
Also, switching to Multiple Menus implies additional entries in the following parameters:&lt;br /&gt;
*NumMatrixColumns, NumMatrixRows&lt;br /&gt;
*AudioStimuliRowsFiles, AudioStimuliRowsFiles (additional columns)&lt;br /&gt;
*TargetWidth, TargetHeight, TargetTextHeight, BackgroundColor&lt;br /&gt;
*TextColor, TextColorIntensified, IconHighlightMode, IconHighlightFactor&lt;br /&gt;
&lt;br /&gt;
====NumMatrixColumns, NumMatrixRows====&lt;br /&gt;
The number of columns/rows in the speller matrix.&lt;br /&gt;
For [[#Multiple Menus|Multiple Menus]], a list of numbers representing each menu&#039;s number of columns/rows.&lt;br /&gt;
&lt;br /&gt;
====AudioStimuliOn====&lt;br /&gt;
Switches playback of audio stimuli on or off.&lt;br /&gt;
&lt;br /&gt;
====AudioStimuliRowsFiles, AudioStimuliColsFiles====&lt;br /&gt;
Each of these parameters is a single-column matrix specifying audio files associated with speller rows or columns, respectively.&lt;br /&gt;
Whenever a row/column is highlighted, the associated audio file is played back.&lt;br /&gt;
For audio files, Windows WAV format is expected.&lt;br /&gt;
{{FilePath}}&lt;br /&gt;
Rather than the path to an audio file, text may be given, enclosed in single quotes. In this case, the text is rendered using the system&#039;s Text-To-Speech engine.&lt;br /&gt;
&lt;br /&gt;
====TargetWidth, TargetHeight====&lt;br /&gt;
A single matrix element&#039;s width/height in percent of screen width/height.&lt;br /&gt;
&lt;br /&gt;
====TargetTextHeight====&lt;br /&gt;
Matrix elements&#039; text height in percent of screen height.&lt;br /&gt;
&lt;br /&gt;
====BackgroundColor====&lt;br /&gt;
Matrix elements&#039; background color, given in RGB encoding.&lt;br /&gt;
&lt;br /&gt;
====TextColor, TextColorIntensified====&lt;br /&gt;
Text color in standard and highlighted (intensified) mode, given in RGB encoding.&lt;br /&gt;
&lt;br /&gt;
====IconHighlightMode====&lt;br /&gt;
An enumerated value specifiying how icons are highlighted on stimulus presentation:&lt;br /&gt;
*0 Show/Hide: icons are only visible during stimulus presentation,&lt;br /&gt;
*1 Intensify: highlight by increasing icon brightness,&lt;br /&gt;
*2 Grayscale: display a grayscale version during stimulus presentation,&lt;br /&gt;
*3 Invert: invert color/brightness values during stimulus presentation,&lt;br /&gt;
*4 Dim: decrease brightness during presentation.&lt;br /&gt;
&lt;br /&gt;
====IconHighlightFactor====&lt;br /&gt;
If &#039;&#039;IconHighlightMode&#039;&#039; is 1 or 4, this parameter defines the brightness scaling factor.&lt;br /&gt;
Dimming is equivalent to intensifying with a scaling factor less than 1.&lt;br /&gt;
&lt;br /&gt;
====FirstActiveMenu====&lt;br /&gt;
For multiple menus, the index of the menu that should be active at the start of a run.&lt;br /&gt;
&lt;br /&gt;
====StatusBarSize, StatusBarTextHeight====&lt;br /&gt;
The size and text height of the status bar in percent of screen height.&lt;br /&gt;
The status bar is located on top of the screen, and displays a line of text currently spelled.&lt;br /&gt;
In [[#InterpretMode|copy mode]], it also displays the text that the user is supposed to spell.&lt;br /&gt;
&lt;br /&gt;
====TextToSpell====&lt;br /&gt;
In [[#InterpretMode|copy mode]], a string of characters defining the text to be spelled by the user.&lt;br /&gt;
This text is displayed in the status bar, above the actually spelled text.&lt;br /&gt;
From the difference between &#039;&#039;TextToSpell&#039;&#039;, and the actually spelled text, the speller automatically derives which matrix element the user will need to select next.&lt;br /&gt;
This information is then used to set the [[#StimulusType|StimulusType]] state.&lt;br /&gt;
&lt;br /&gt;
====TextResult====&lt;br /&gt;
At the beginning of a run, this parameter&#039;s content is copied into the lower part of the status bar.&lt;br /&gt;
At the end of a run, the status bar&#039;s content is copied back into this parameter.&lt;br /&gt;
&lt;br /&gt;
====TestMode====&lt;br /&gt;
If this is switched on, clicking on a matrix element with the mouse will select it once the current sequence of intensifications is finished.&lt;br /&gt;
This is useful to test speller matrix configurations.&lt;br /&gt;
&lt;br /&gt;
====DestinationAddress====&lt;br /&gt;
A network address to receive speller output, given in IP:port format, e.g. &amp;lt;tt&amp;gt;localhost:3582&amp;lt;/tt&amp;gt;.&lt;br /&gt;
To this address, a UDP socket is opened, and written into, such that an external application may connect and receive information about selected matrix elements.&lt;br /&gt;
For each selection, the speller will write whatever is contained in the selected matrix element&#039;s &#039;&#039;Enter&#039;&#039; field, preceded with &amp;lt;tt&amp;gt;P3Speller_Output&amp;lt;/tt&amp;gt; and a space character, and followed with a &amp;lt;tt&amp;gt;\r\n&amp;lt;/tt&amp;gt; sequence (i.e., an MSDOS style line ending). E.g., the output will be &amp;lt;tt&amp;gt;P3Speller_Output A\r\n&amp;lt;/tt&amp;gt; when a matrix element is selected that enters the letter &amp;quot;A&amp;quot;, and &amp;lt;tt&amp;gt;P3Speller_Output &amp;lt;BS&amp;gt;\r\n&amp;lt;/tt&amp;gt; for a matrix element corresponding to the backspace command.&lt;br /&gt;
&lt;br /&gt;
====TextWindowEnabled====&lt;br /&gt;
If this flag is switched on, a separate window is displayed.&lt;br /&gt;
Once the status bar is filled, text flows into the window, and back in case of text deletion.&lt;br /&gt;
&lt;br /&gt;
====TextWindowLeft, TextWindowTop, TextWindowWidth, TextWindowHeight====&lt;br /&gt;
Position and dimension of the text window in pixels.&lt;br /&gt;
&lt;br /&gt;
====TextWindowFontName, TextWindowFontSize====&lt;br /&gt;
Text window font name and size.&lt;br /&gt;
&lt;br /&gt;
====TextWindowFilePath====&lt;br /&gt;
A (relative or absolute) path to a directory.&lt;br /&gt;
Upon the &amp;lt;SAVE&amp;gt; and &amp;lt;RETR&amp;gt; speller commands, the text window&#039;s contents are saved to/retrieved from a file located in that directory.&lt;br /&gt;
Repeated &amp;lt;SAVE&amp;gt; commands do not result in overwriting existing files.&lt;br /&gt;
Rather, existing files are preserved, and the most recent file&#039;s name is written into a pointer file.&lt;br /&gt;
{{FilePath}}&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
{{ApplicationBaseStates}}&lt;br /&gt;
{{StimulusTaskStates}}&lt;br /&gt;
&lt;br /&gt;
===SelectedTarget, SelectedRow, SelectedColumn===&lt;br /&gt;
Upon classification, these states are set to the selected target&#039;s ID, and its associated row and column, respectively.&lt;br /&gt;
A target&#039;s ID matches its row number in the &#039;&#039;TargetDefinitions&#039;&#039; matrix.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
{{StimulusTaskTimeline}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:P3TemporalFilter]], [[User Reference:StimulusPresentationTask]], [[Programming Reference:StimulusTask Class]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Filters]][[Category:User Application]][[Category:Specification]]&lt;/div&gt;</summary>
		<author><name>Swinden</name></author>
	</entry>
</feed>