<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bci2000.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gmilsap</id>
	<title>BCI2000 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.bci2000.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gmilsap"/>
	<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php/Special:Contributions/Gmilsap"/>
	<updated>2026-06-09T04:46:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7605</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7605"/>
		<updated>2016-03-27T00:51:03Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* NSPInstances */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the &amp;quot;cbsdk&amp;quot; C++ API.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V3.2 -- Enabled Firmware 6.05+ to function through a silly hack&lt;br /&gt;
*V3.1 -- Digital output implementation&lt;br /&gt;
*V3.0 -- Multi-NSP support with hardware synchronization&lt;br /&gt;
*V2.0 -- Auto-config based implementation, enhanced usability and stability&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 5304&lt;br /&gt;
*Known to compile under: 5304&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from Blackrock NSP systems using CBSDK as provided through official Blackrock channels, or through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===System Setup===&lt;br /&gt;
Building the Blackrock module should copy .bat files for standard experiments into the batch directory.&lt;br /&gt;
&lt;br /&gt;
Ensure your machine is connected to a switch or router that the NSP is also connected to.  This module communicates to the NSP using UDP, and is susceptible to packet loss.  Ensure you have a commercial grade switch to avoid dropping packets.  You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.&lt;br /&gt;
&lt;br /&gt;
You will also need to change your interface&#039;s network configuration ([http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ Windows]):&lt;br /&gt;
* IP address: 192.168.137.XXX where XXX is less than 128.  &amp;lt;u&amp;gt;This number needs to be below 16 and not 10.&amp;lt;/u&amp;gt;  Ensure no other computers have this same address on this switch.&lt;br /&gt;
* Subnet Mask: 255.255.255.0&lt;br /&gt;
* Default Gateway: &amp;lt;Blank&amp;gt;&lt;br /&gt;
To test your network configuration, open a terminal or command prompt and type &#039;&#039;&#039;ping 192.168.137.128&#039;&#039;&#039;. This is the NSP&#039;s default network address.  If you can ping the NSP, you should be able to run the module.&lt;br /&gt;
&lt;br /&gt;
For more details on the network setup for a multi-NSP system, please refer to the official NSP documentation&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
This should work out of the box with standard parameters.  &lt;br /&gt;
====Linux====&lt;br /&gt;
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions.  NSP 6.03 and previous opens port 1002 and 1001 to communicate packets.  This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems.  NSP Firmware 6.04+ uses higher port numbers to avoid this problem.  If you&#039;re running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges.  One way to accomplish this is to comment out the &amp;quot;Start Blackrock&amp;quot; line in your batch file, and launch the Blackrock module from a separate terminal with &amp;quot;sudo ./Blackrock&amp;quot;, executed from the bci2000/prog directory.  &lt;br /&gt;
&lt;br /&gt;
You may also receive an error complaining about the size of your network buffer size:&lt;br /&gt;
    Socket memory assignment error&lt;br /&gt;
    Consider using sysctl -w net.core.rmem_max=8388608&lt;br /&gt;
    or sysctl -w kern.ipc.maxsockbuf=8388608&lt;br /&gt;
&lt;br /&gt;
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges.  You will need to do this once every time the computer reboots.  There may be a way to do this on boot using some config file somewhere.  If you have any ideas, edit this section.  net.core.rmem_max is the proper key to use for Fedora 17.&lt;br /&gt;
&lt;br /&gt;
==Blackrock Firmware/CBSDK/Cerelink Notes==&lt;br /&gt;
When you install the Central &amp;quot;NeuroPort Windows Suite&amp;quot; software on a PC, it comes with a firmware, and a CBSDK distribution.  Unfortunately, these components have individual versioning.  The version of Central appears to match the NSP Firmware version.  Most of the development of this module has been done with Central/NSP Firmware 6.04.03.  CBSDK (hardware library) 3.9 is the compatible SDK for this particular firmware/version.  You can find out what version of central/firmware you&#039;re running by clicking the Windows-&amp;gt;About Cerebus Suite button in Central when the NSP is on and active.&lt;br /&gt;
&lt;br /&gt;
The BCI2000 Blackrock module relies on cbsdk.dll to operate. The cbsdk.dll itself relies on a few Qt dlls (QtCore4.dll, QtXml4.dll) to function.  As a best-practice, you shouldn&#039;t copy these dlls into the BCI2000 prog directory, but instead add the directories that these files are found in to the system path.  [https://www.java.com/en/download/help/path.xml Here is a helpful tutorial for how to change the system path in Windows (you&#039;ll need to restart BCI2000 after doing it)].  You&#039;ll want to add:&lt;br /&gt;
&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite\cbsdk\lib (for cbsdk.dll)&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite (for the Qt dlls)&lt;br /&gt;
&lt;br /&gt;
To further complicate things, a GPLV2 spinoff/fork of CBSDK is available in the [http://github.com/dashesy/CereLink Cerelink repository] and is maintained by a non-Blackrock employee.  The source code there is available under GPLV2 (still copyrighted by Blackrock Microsystems), but it should be considered a fork of the official CBSDK code provided by Blackrock.  The code in CereLink currently contains a 3.9 compatible hardware library, and you *can* compile a cbsdk.dll from the code in this repository.  This dll will be similar, &#039;&#039;but not identical&#039;&#039; to the official 3.9 release.  If you want to rock a Linux Blackrock Source module, you&#039;ll need to compile this repository to generate a cbsdk.so for BCI2000 to use.  Blackrock doesn&#039;t provide an official Linux release.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, Blackrock introduced a non-backward-compatible change to the ABI between CBSDK 3.9 and 3.10.  CBSDK 3.10 is *required* for firmware 6.05.XX+. Because this change isn&#039;t backward compatible, we had to make a choice as to what protocol version the module will currently support.  As of r5304, the Blackrock module is using CBSDK (hardware library) 3.9 and is only compatible with firmware version 6.04 and below.  &#039;&#039;&#039;There is an experimental &amp;quot;hack&amp;quot; that enables this module to work with firmware 6.05+,&#039;&#039;&#039; but use it at your own risk.  It seems to be quite stable, but it could result in undefined behavior.  Consider yourself warned.&lt;br /&gt;
&lt;br /&gt;
To make this module ONLY work with Firmware 6.05+:&lt;br /&gt;
* Download BCI2000 SVN HEAD and use CMake to generate the build files, as detailed in [[Programming Reference:Build System]].  Make sure you enable Contributed source modules.&lt;br /&gt;
* Edit src/contrib/SignalSource/Blackrock/lib/cbhwlib.h and make sure cbVERSION_MINOR is set to 10 (instead of 9)&lt;br /&gt;
* Recompile the Blackrock module.&lt;br /&gt;
&lt;br /&gt;
The module will eventually default to using official hardware library 3.10 once the author updates his system to firmware 6.05.&lt;br /&gt;
&lt;br /&gt;
==Multi-NSP Synchronization==&lt;br /&gt;
The NSP systems can be daisy-chained to provide access to more channels and more fun.  Although a hardware &amp;quot;sync&amp;quot; cable is provided by Blackrock Microsystems, the authors are a bit confused as to what it actually does, because it does not appear to synchronize the systems on a sample by sample basis.  CBSDK opens a separate instance for each NSP and the module is just communicating with both the systems simultaneously and attempting to match up the data streams as closely as possible.  To facilitate this, there is a hardware synchronization built into the module which requires a bit of hardware setup to use.  This system pulses one of the digital outputs high and provided that output is connected to the correct analog input on both NSPs, the streams will be resynchronized every time NSPSyncState is set to a value of 1.&lt;br /&gt;
&lt;br /&gt;
In order to enable NSP Hardware Synchronization:&lt;br /&gt;
* Connect Digital Output 1 on any &#039;&#039;&#039;one&#039;&#039;&#039; of the NSPs to Analog Input 16 on all the NSPs.  You&#039;ll probably need BNC T-Connectors for this.&lt;br /&gt;
* Ensure Analog Input 16 is in the same SampleGroup as the channels you wish to acquire using BCI2000.&lt;br /&gt;
* If BCI2000 recognizes that Analog Input 16 is being acquired at the correct SamplingRate on all NSPs and that there is more than 1 NSP, hardware synchronization will occur automatically upon SetConfig.&lt;br /&gt;
&lt;br /&gt;
A hardware synchronization procedure strobes digital output 0 on the NSPs, consumes 100 ms worth of samples, then realigns the ringbuffers for each NSP to the rising edge of analog input 16.  A log message will tell you which instance was corrected by how many samples.  Throughout the course of a recording, dropped packets and clock skew will slowly throw the NSPs out of synchronization.  On the author&#039;s system, it takes about 10 minutes for a 100 ms desynchronization to occur.  At any time, NSPSyncState can be set to 1 (Especially handy as an operator function button -- see [[User_Reference:Operator_Module#Function_Buttons]]), and the re-synchronization procedure will consume 100ms of data and resynchronize.  Its important to keep in mind that if the desynchronization is already greater than 100ms, the procedure will fail, due to there not being a rising edge in one of the signals.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
This module used to fully-configure the NSPs directly from BCI2000.  The NSP system is sooo configurable that this became a big source of headaches.  In the most recent version, you will configure the recording setup using the Blackrock &amp;quot;Central&amp;quot; software, and BCI2000 will auto-configure to match the SampleGroup dictated by the SamplingRate parameter.  The NSPs always acquire data at 30Khz, but channels can be added to a SampleGroup which is downsampled (with antialiasing) in real-time by the NSP before being streamed over ethernet to receivers.  You can add channels to these channel groups in the Central software by enabling continuous streaming on individual channels, and selecting the sampling rate.&lt;br /&gt;
&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SamplingRate===&lt;br /&gt;
In standard use, this is one of two parameters you need to play with.  This is where you select the sample group you want BCI2000 to record from.  Valid sampling rates are 500 Hz, 1000 Hz, 2000 Hz, 10000 Hz, and 30000 Hz.  When the SetConfig button is pressed, BCI2000 will collect all channels that are members of that SampleGroup and configure to acquire from those channels.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
There are a bunch of default SampleBlockSizes for the different SamplingRates, which you will get if you use &#039;auto&#039; as the value of this parameter.  They are roughly set to clock BCI2000 at about 50 Hz. Depending on the processing you&#039;re doing, you may want to lengthen the block size. Any number of samples is valid here: even 1.  You may want to not do that, however.  Clocking the system above 50 Hz [http://www.youtube.com/watch?v=2FM3Em7FIOc is a bad choice].  The default block size for different sample groups is as follows:&lt;br /&gt;
&lt;br /&gt;
    int gGroupRates[] = { 0, 500, 1000, 2000, 10000, 30000 }; // samples per second&lt;br /&gt;
    int gBlockSizes[] = { 0, 10,  20,   40,   200,   600   }; // samples per block (50 Hz)&lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
These will be pulled from the Channel Label property set in the Central Software.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset/SourceChGain===&lt;br /&gt;
Again, these are populated automatically.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===NSPInstances===&lt;br /&gt;
This parameter determines how many NSPs you intend to record from.  This is the other parameter that you might want to play with, but only if you have more than one NSP.  Setting this parameter to &#039;2&#039; enables the hardware synchronization described earlier, and using more than 2 NSPs is untested.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutput===&lt;br /&gt;
This parameter specifies a matrix of expressions that will be evaluated once per SampleBlock to set the digital output channels.  Each row of this matrix defines an expression for one digital output.  If that expression evaluates true for that block, the associated digital output will be set high, and vice versa for false.  See [[User Reference:Expression Syntax]] for help with BCI2000 Expressions.  An example matrix is provided below.&lt;br /&gt;
&lt;br /&gt;
    Instance Output Expression&lt;br /&gt;
    1        1      StimulusCode!=0 // Will set output 1 on NSP1 high whenever a stimulus is on screen&lt;br /&gt;
    2        3      KeyDown!=0 // Will set output 3 on NSP2 high whenever a key is pressed.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===NSPSyncState===&lt;br /&gt;
This state records the current status of the multi-NSP hardware synchronization described earlier.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7604</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7604"/>
		<updated>2016-03-27T00:49:47Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the &amp;quot;cbsdk&amp;quot; C++ API.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V3.2 -- Enabled Firmware 6.05+ to function through a silly hack&lt;br /&gt;
*V3.1 -- Digital output implementation&lt;br /&gt;
*V3.0 -- Multi-NSP support with hardware synchronization&lt;br /&gt;
*V2.0 -- Auto-config based implementation, enhanced usability and stability&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 5304&lt;br /&gt;
*Known to compile under: 5304&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from Blackrock NSP systems using CBSDK as provided through official Blackrock channels, or through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===System Setup===&lt;br /&gt;
Building the Blackrock module should copy .bat files for standard experiments into the batch directory.&lt;br /&gt;
&lt;br /&gt;
Ensure your machine is connected to a switch or router that the NSP is also connected to.  This module communicates to the NSP using UDP, and is susceptible to packet loss.  Ensure you have a commercial grade switch to avoid dropping packets.  You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.&lt;br /&gt;
&lt;br /&gt;
You will also need to change your interface&#039;s network configuration ([http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ Windows]):&lt;br /&gt;
* IP address: 192.168.137.XXX where XXX is less than 128.  &amp;lt;u&amp;gt;This number needs to be below 16 and not 10.&amp;lt;/u&amp;gt;  Ensure no other computers have this same address on this switch.&lt;br /&gt;
* Subnet Mask: 255.255.255.0&lt;br /&gt;
* Default Gateway: &amp;lt;Blank&amp;gt;&lt;br /&gt;
To test your network configuration, open a terminal or command prompt and type &#039;&#039;&#039;ping 192.168.137.128&#039;&#039;&#039;. This is the NSP&#039;s default network address.  If you can ping the NSP, you should be able to run the module.&lt;br /&gt;
&lt;br /&gt;
For more details on the network setup for a multi-NSP system, please refer to the official NSP documentation&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
This should work out of the box with standard parameters.  &lt;br /&gt;
====Linux====&lt;br /&gt;
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions.  NSP 6.03 and previous opens port 1002 and 1001 to communicate packets.  This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems.  NSP Firmware 6.04+ uses higher port numbers to avoid this problem.  If you&#039;re running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges.  One way to accomplish this is to comment out the &amp;quot;Start Blackrock&amp;quot; line in your batch file, and launch the Blackrock module from a separate terminal with &amp;quot;sudo ./Blackrock&amp;quot;, executed from the bci2000/prog directory.  &lt;br /&gt;
&lt;br /&gt;
You may also receive an error complaining about the size of your network buffer size:&lt;br /&gt;
    Socket memory assignment error&lt;br /&gt;
    Consider using sysctl -w net.core.rmem_max=8388608&lt;br /&gt;
    or sysctl -w kern.ipc.maxsockbuf=8388608&lt;br /&gt;
&lt;br /&gt;
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges.  You will need to do this once every time the computer reboots.  There may be a way to do this on boot using some config file somewhere.  If you have any ideas, edit this section.  net.core.rmem_max is the proper key to use for Fedora 17.&lt;br /&gt;
&lt;br /&gt;
==Blackrock Firmware/CBSDK/Cerelink Notes==&lt;br /&gt;
When you install the Central &amp;quot;NeuroPort Windows Suite&amp;quot; software on a PC, it comes with a firmware, and a CBSDK distribution.  Unfortunately, these components have individual versioning.  The version of Central appears to match the NSP Firmware version.  Most of the development of this module has been done with Central/NSP Firmware 6.04.03.  CBSDK (hardware library) 3.9 is the compatible SDK for this particular firmware/version.  You can find out what version of central/firmware you&#039;re running by clicking the Windows-&amp;gt;About Cerebus Suite button in Central when the NSP is on and active.&lt;br /&gt;
&lt;br /&gt;
The BCI2000 Blackrock module relies on cbsdk.dll to operate. The cbsdk.dll itself relies on a few Qt dlls (QtCore4.dll, QtXml4.dll) to function.  As a best-practice, you shouldn&#039;t copy these dlls into the BCI2000 prog directory, but instead add the directories that these files are found in to the system path.  [https://www.java.com/en/download/help/path.xml Here is a helpful tutorial for how to change the system path in Windows (you&#039;ll need to restart BCI2000 after doing it)].  You&#039;ll want to add:&lt;br /&gt;
&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite\cbsdk\lib (for cbsdk.dll)&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite (for the Qt dlls)&lt;br /&gt;
&lt;br /&gt;
To further complicate things, a GPLV2 spinoff/fork of CBSDK is available in the [http://github.com/dashesy/CereLink Cerelink repository] and is maintained by a non-Blackrock employee.  The source code there is available under GPLV2 (still copyrighted by Blackrock Microsystems), but it should be considered a fork of the official CBSDK code provided by Blackrock.  The code in CereLink currently contains a 3.9 compatible hardware library, and you *can* compile a cbsdk.dll from the code in this repository.  This dll will be similar, &#039;&#039;but not identical&#039;&#039; to the official 3.9 release.  If you want to rock a Linux Blackrock Source module, you&#039;ll need to compile this repository to generate a cbsdk.so for BCI2000 to use.  Blackrock doesn&#039;t provide an official Linux release.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, Blackrock introduced a non-backward-compatible change to the ABI between CBSDK 3.9 and 3.10.  CBSDK 3.10 is *required* for firmware 6.05.XX+. Because this change isn&#039;t backward compatible, we had to make a choice as to what protocol version the module will currently support.  As of r5304, the Blackrock module is using CBSDK (hardware library) 3.9 and is only compatible with firmware version 6.04 and below.  &#039;&#039;&#039;There is an experimental &amp;quot;hack&amp;quot; that enables this module to work with firmware 6.05+,&#039;&#039;&#039; but use it at your own risk.  It seems to be quite stable, but it could result in undefined behavior.  Consider yourself warned.&lt;br /&gt;
&lt;br /&gt;
To make this module ONLY work with Firmware 6.05+:&lt;br /&gt;
* Download BCI2000 SVN HEAD and use CMake to generate the build files, as detailed in [[Programming Reference:Build System]].  Make sure you enable Contributed source modules.&lt;br /&gt;
* Edit src/contrib/SignalSource/Blackrock/lib/cbhwlib.h and make sure cbVERSION_MINOR is set to 10 (instead of 9)&lt;br /&gt;
* Recompile the Blackrock module.&lt;br /&gt;
&lt;br /&gt;
The module will eventually default to using official hardware library 3.10 once the author updates his system to firmware 6.05.&lt;br /&gt;
&lt;br /&gt;
==Multi-NSP Synchronization==&lt;br /&gt;
The NSP systems can be daisy-chained to provide access to more channels and more fun.  Although a hardware &amp;quot;sync&amp;quot; cable is provided by Blackrock Microsystems, the authors are a bit confused as to what it actually does, because it does not appear to synchronize the systems on a sample by sample basis.  CBSDK opens a separate instance for each NSP and the module is just communicating with both the systems simultaneously and attempting to match up the data streams as closely as possible.  To facilitate this, there is a hardware synchronization built into the module which requires a bit of hardware setup to use.  This system pulses one of the digital outputs high and provided that output is connected to the correct analog input on both NSPs, the streams will be resynchronized every time NSPSyncState is set to a value of 1.&lt;br /&gt;
&lt;br /&gt;
In order to enable NSP Hardware Synchronization:&lt;br /&gt;
* Connect Digital Output 1 on any &#039;&#039;&#039;one&#039;&#039;&#039; of the NSPs to Analog Input 16 on all the NSPs.  You&#039;ll probably need BNC T-Connectors for this.&lt;br /&gt;
* Ensure Analog Input 16 is in the same SampleGroup as the channels you wish to acquire using BCI2000.&lt;br /&gt;
* If BCI2000 recognizes that Analog Input 16 is being acquired at the correct SamplingRate on all NSPs and that there is more than 1 NSP, hardware synchronization will occur automatically upon SetConfig.&lt;br /&gt;
&lt;br /&gt;
A hardware synchronization procedure strobes digital output 0 on the NSPs, consumes 100 ms worth of samples, then realigns the ringbuffers for each NSP to the rising edge of analog input 16.  A log message will tell you which instance was corrected by how many samples.  Throughout the course of a recording, dropped packets and clock skew will slowly throw the NSPs out of synchronization.  On the author&#039;s system, it takes about 10 minutes for a 100 ms desynchronization to occur.  At any time, NSPSyncState can be set to 1 (Especially handy as an operator function button -- see [[User_Reference:Operator_Module#Function_Buttons]]), and the re-synchronization procedure will consume 100ms of data and resynchronize.  Its important to keep in mind that if the desynchronization is already greater than 100ms, the procedure will fail, due to there not being a rising edge in one of the signals.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
This module used to fully-configure the NSPs directly from BCI2000.  The NSP system is sooo configurable that this became a big source of headaches.  In the most recent version, you will configure the recording setup using the Blackrock &amp;quot;Central&amp;quot; software, and BCI2000 will auto-configure to match the SampleGroup dictated by the SamplingRate parameter.  The NSPs always acquire data at 30Khz, but channels can be added to a SampleGroup which is downsampled (with antialiasing) in real-time by the NSP before being streamed over ethernet to receivers.  You can add channels to these channel groups in the Central software by enabling continuous streaming on individual channels, and selecting the sampling rate.&lt;br /&gt;
&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SamplingRate===&lt;br /&gt;
In standard use, this is one of two parameters you need to play with.  This is where you select the sample group you want BCI2000 to record from.  Valid sampling rates are 500 Hz, 1000 Hz, 2000 Hz, 10000 Hz, and 30000 Hz.  When the SetConfig button is pressed, BCI2000 will collect all channels that are members of that SampleGroup and configure to acquire from those channels.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
There are a bunch of default SampleBlockSizes for the different SamplingRates, which you will get if you use &#039;auto&#039; as the value of this parameter.  They are roughly set to clock BCI2000 at about 50 Hz. Depending on the processing you&#039;re doing, you may want to lengthen the block size. Any number of samples is valid here: even 1.  You may want to not do that, however.  Clocking the system above 50 Hz [http://www.youtube.com/watch?v=2FM3Em7FIOc is a bad choice].  The default block size for different sample groups is as follows:&lt;br /&gt;
&lt;br /&gt;
    int gGroupRates[] = { 0, 500, 1000, 2000, 10000, 30000 }; // samples per second&lt;br /&gt;
    int gBlockSizes[] = { 0, 10,  20,   40,   200,   600   }; // samples per block (50 Hz)&lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
These will be pulled from the Channel Label property set in the Central Software.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset/SourceChGain===&lt;br /&gt;
Again, these are populated automatically.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===NSPInstances===&lt;br /&gt;
This parameter determines how many NSPs you intend to record from.  Setting this parameter to &#039;2&#039; enables the hardware synchronization described earlier, and using more than 2 NSPs is untested.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutput===&lt;br /&gt;
This parameter specifies a matrix of expressions that will be evaluated once per SampleBlock to set the digital output channels.  Each row of this matrix defines an expression for one digital output.  If that expression evaluates true for that block, the associated digital output will be set high, and vice versa for false.  See [[User Reference:Expression Syntax]] for help with BCI2000 Expressions.  An example matrix is provided below.&lt;br /&gt;
&lt;br /&gt;
    Instance Output Expression&lt;br /&gt;
    1        1      StimulusCode!=0 // Will set output 1 on NSP1 high whenever a stimulus is on screen&lt;br /&gt;
    2        3      KeyDown!=0 // Will set output 3 on NSP2 high whenever a key is pressed.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===NSPSyncState===&lt;br /&gt;
This state records the current status of the multi-NSP hardware synchronization described earlier.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7603</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7603"/>
		<updated>2016-03-27T00:46:34Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Multi-NSP Synchronization */ clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the &amp;quot;cbsdk&amp;quot; C++ API.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V3.2 -- Enabled Firmware 6.05+ to function through a silly hack&lt;br /&gt;
*V3.1 -- Digital output implementation&lt;br /&gt;
*V3.0 -- Multi-NSP support with hardware synchronization&lt;br /&gt;
*V2.0 -- Auto-config based implementation, enhanced usability and stability&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 5304&lt;br /&gt;
*Known to compile under: 5304&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from Blackrock NSP systems using CBSDK as provided through official Blackrock channels, or through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===System Setup===&lt;br /&gt;
Building the Blackrock module should copy .bat files for standard experiments into the batch directory.&lt;br /&gt;
&lt;br /&gt;
Ensure your machine is connected to a switch or router that the NSP is also connected to.  This module communicates to the NSP using UDP, and is susceptible to packet loss.  Ensure you have a commercial grade switch to avoid dropping packets.  You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.&lt;br /&gt;
&lt;br /&gt;
You will also need to change your interface&#039;s network configuration ([http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ Windows]):&lt;br /&gt;
* IP address: 192.168.137.XXX where XXX is less than 128.  &amp;lt;u&amp;gt;This number needs to be below 16 and not 10.&amp;lt;/u&amp;gt;  Ensure no other computers have this same address on this switch.&lt;br /&gt;
* Subnet Mask: 255.255.255.0&lt;br /&gt;
* Default Gateway: &amp;lt;Blank&amp;gt;&lt;br /&gt;
To test your network configuration, open a terminal or command prompt and type &#039;&#039;&#039;ping 192.168.137.128&#039;&#039;&#039;. This is the NSP&#039;s default network address.  If you can ping the NSP, you should be able to run the module.&lt;br /&gt;
&lt;br /&gt;
For more details on the network setup for a multi-NSP system, please refer to the official NSP documentation&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
This should work out of the box with standard parameters.  &lt;br /&gt;
====Linux====&lt;br /&gt;
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions.  NSP 6.03 and previous opens port 1002 and 1001 to communicate packets.  This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems.  NSP Firmware 6.04+ uses higher port numbers to avoid this problem.  If you&#039;re running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges.  One way to accomplish this is to comment out the &amp;quot;Start Blackrock&amp;quot; line in your batch file, and launch the Blackrock module from a separate terminal with &amp;quot;sudo ./Blackrock&amp;quot;, executed from the bci2000/prog directory.  &lt;br /&gt;
&lt;br /&gt;
You may also receive an error complaining about the size of your network buffer size:&lt;br /&gt;
    Socket memory assignment error&lt;br /&gt;
    Consider using sysctl -w net.core.rmem_max=8388608&lt;br /&gt;
    or sysctl -w kern.ipc.maxsockbuf=8388608&lt;br /&gt;
&lt;br /&gt;
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges.  You will need to do this once every time the computer reboots.  There may be a way to do this on boot using some config file somewhere.  If you have any ideas, edit this section.  net.core.rmem_max is the proper key to use for Fedora 17.&lt;br /&gt;
&lt;br /&gt;
==Blackrock Firmware/CBSDK/Cerelink Notes==&lt;br /&gt;
When you install the Central &amp;quot;NeuroPort Windows Suite&amp;quot; software on a PC, it comes with a firmware, and a CBSDK distribution.  Unfortunately, these components have individual versioning.  The version of Central appears to match the NSP Firmware version.  Most of the development of this module has been done with Central/NSP Firmware 6.04.03.  CBSDK (hardware library) 3.9 is the compatible SDK for this particular firmware/version.  You can find out what version of central/firmware you&#039;re running by clicking the Windows-&amp;gt;About Cerebus Suite button in Central when the NSP is on and active.&lt;br /&gt;
&lt;br /&gt;
The BCI2000 Blackrock module relies on cbsdk.dll to operate. The cbsdk.dll itself relies on a few Qt dlls (QtCore4.dll, QtXml4.dll) to function.  As a best-practice, you shouldn&#039;t copy these dlls into the BCI2000 prog directory, but instead add the directories that these files are found in to the system path.  [https://www.java.com/en/download/help/path.xml Here is a helpful tutorial for how to change the system path in Windows (you&#039;ll need to restart BCI2000 after doing it)].  You&#039;ll want to add:&lt;br /&gt;
&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite\cbsdk\lib (for cbsdk.dll)&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite (for the Qt dlls)&lt;br /&gt;
&lt;br /&gt;
To further complicate things, a GPLV2 spinoff/fork of CBSDK is available in the [http://github.com/dashesy/CereLink Cerelink repository] and is maintained by a non-Blackrock employee.  The source code there is available under GPLV2 (still copyrighted by Blackrock Microsystems), but it should be considered a fork of the official CBSDK code provided by Blackrock.  The code in CereLink currently contains a 3.9 compatible hardware library, and you *can* compile a cbsdk.dll from the code in this repository.  This dll will be similar, &#039;&#039;but not identical&#039;&#039; to the official 3.9 release.  If you want to rock a Linux Blackrock Source module, you&#039;ll need to compile this repository to generate a cbsdk.so for BCI2000 to use.  Blackrock doesn&#039;t provide an official Linux release.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, Blackrock introduced a non-backward-compatible change to the ABI between CBSDK 3.9 and 3.10.  CBSDK 3.10 is *required* for firmware 6.05.XX+. Because this change isn&#039;t backward compatible, we had to make a choice as to what protocol version the module will currently support.  As of r5304, the Blackrock module is using CBSDK (hardware library) 3.9 and is only compatible with firmware version 6.04 and below.  &#039;&#039;&#039;There is an experimental &amp;quot;hack&amp;quot; that enables this module to work with firmware 6.05+,&#039;&#039;&#039; but use it at your own risk.  It seems to be quite stable, but it could result in undefined behavior.  Consider yourself warned.&lt;br /&gt;
&lt;br /&gt;
To make this module ONLY work with Firmware 6.05+:&lt;br /&gt;
* Download BCI2000 SVN HEAD and use CMake to generate the build files, as detailed in [[Programming Reference:Build System]].  Make sure you enable Contributed source modules.&lt;br /&gt;
* Edit src/contrib/SignalSource/Blackrock/lib/cbhwlib.h and make sure cbVERSION_MINOR is set to 10 (instead of 9)&lt;br /&gt;
* Recompile the Blackrock module.&lt;br /&gt;
&lt;br /&gt;
The module will eventually default to using official hardware library 3.10 once the author updates his system to firmware 6.05.&lt;br /&gt;
&lt;br /&gt;
==Multi-NSP Synchronization==&lt;br /&gt;
The NSP systems can be daisy-chained to provide access to more channels and more fun.  Although a hardware &amp;quot;sync&amp;quot; cable is provided by Blackrock Microsystems, the authors are a bit confused as to what it actually does, because it does not appear to synchronize the systems on a sample by sample basis.  CBSDK opens a separate instance for each NSP and the module is just communicating with both the systems simultaneously and attempting to match up the data streams as closely as possible.  To facilitate this, there is a hardware synchronization built into the module which requires a bit of hardware setup to use.  This system pulses one of the digital outputs high and provided that output is connected to the correct analog input on both NSPs, the streams will be resynchronized every time NSPSyncState is set to a value of 1.&lt;br /&gt;
&lt;br /&gt;
In order to enable NSP Hardware Synchronization:&lt;br /&gt;
* Connect Digital Output 1 on any &#039;&#039;&#039;one&#039;&#039;&#039; of the NSPs to Analog Input 16 on all the NSPs.  You&#039;ll probably need BNC T-Connectors for this.&lt;br /&gt;
* Ensure Analog Input 16 is in the same SampleGroup as the channels you wish to acquire using BCI2000.&lt;br /&gt;
* If BCI2000 recognizes that Analog Input 16 is being acquired at the correct SamplingRate on all NSPs and that there is more than 1 NSP, hardware synchronization will occur automatically upon SetConfig.&lt;br /&gt;
&lt;br /&gt;
A hardware synchronization procedure strobes digital output 0 on the NSPs, consumes 100 ms worth of samples, then realigns the ringbuffers for each NSP to the rising edge of analog input 16.  A log message will tell you which instance was corrected by how many samples.  Throughout the course of a recording, dropped packets and clock skew will slowly throw the NSPs out of synchronization.  On the author&#039;s system, it takes about 10 minutes for a 100 ms desynchronization to occur.  At any time, NSPSyncState can be set to 1 (Especially handy as an operator function button -- see [[User_Reference:Operator_Module#Function_Buttons]]), and the re-synchronization procedure will consume 100ms of data and resynchronize.  Its important to keep in mind that if the desynchronization is already greater than 100ms, the procedure will fail, due to there not being a rising edge in one of the signals.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
This module used to fully-configure the NSPs directly from BCI2000.  The NSP system is sooo configurable that this became a big source of headaches.  In the most recent version, BCI2000 will auto-configure everything based on the currently selected SampleGroup.  The NSPs always acquire data at 30Khz, but channels can be added to a SampleGroup which is downsampled (with antialiasing) in real-time by the NSP before being streamed over ethernet to receivers.  You can add channels to these channel groups in the Central software by enabling continuous streaming on individual channels, and selecting the sampling rate.&lt;br /&gt;
&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SamplingRate===&lt;br /&gt;
In standard use, this is one of two parameters you need to play with.  This is where you select the sample group you want BCI2000 to record from.  Valid sampling rates are 500 Hz, 1000 Hz, 2000 Hz, 10000 Hz, and 30000 Hz.  When the SetConfig button is pressed, BCI2000 will collect all channels that are members of that SampleGroup and configure to acquire from those channels.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
There are a bunch of default SampleBlockSizes for the different SamplingRates, which you will get if you use &#039;auto&#039; as the value of this parameter.  They are roughly set to clock BCI2000 at about 50 Hz. Depending on the processing you&#039;re doing, you may want to lengthen the block size. Any number of samples is valid here: even 1.  You may want to not do that, however.  Clocking the system above 50 Hz [http://www.youtube.com/watch?v=2FM3Em7FIOc is a bad choice].  The default block size for different sample groups is as follows:&lt;br /&gt;
&lt;br /&gt;
    int gGroupRates[] = { 0, 500, 1000, 2000, 10000, 30000 }; // samples per second&lt;br /&gt;
    int gBlockSizes[] = { 0, 10,  20,   40,   200,   600   }; // samples per block (50 Hz)&lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
These will be pulled from the Channel Label property set in the Central Software.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset/SourceChGain===&lt;br /&gt;
Again, these are populated automatically.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===NSPInstances===&lt;br /&gt;
This parameter determines how many NSPs you intend to record from.  Setting this parameter to &#039;2&#039; enables the hardware synchronization described earlier, and using more than 2 NSPs is untested.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutput===&lt;br /&gt;
This parameter specifies a matrix of expressions that will be evaluated once per SampleBlock to set the digital output channels.  Each row of this matrix defines an expression for one digital output.  If that expression evaluates true for that block, the associated digital output will be set high, and vice versa for false.  See [[User Reference:Expression Syntax]] for help with BCI2000 Expressions.  An example matrix is provided below.&lt;br /&gt;
&lt;br /&gt;
    Instance Output Expression&lt;br /&gt;
    1        1      StimulusCode!=0 // Will set output 1 on NSP1 high whenever a stimulus is on screen&lt;br /&gt;
    2        3      KeyDown!=0 // Will set output 3 on NSP2 high whenever a key is pressed.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===NSPSyncState===&lt;br /&gt;
This state records the current status of the multi-NSP hardware synchronization described earlier.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7602</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7602"/>
		<updated>2016-03-27T00:40:09Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the &amp;quot;cbsdk&amp;quot; C++ API.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V3.2 -- Enabled Firmware 6.05+ to function through a silly hack&lt;br /&gt;
*V3.1 -- Digital output implementation&lt;br /&gt;
*V3.0 -- Multi-NSP support with hardware synchronization&lt;br /&gt;
*V2.0 -- Auto-config based implementation, enhanced usability and stability&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 5304&lt;br /&gt;
*Known to compile under: 5304&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from Blackrock NSP systems using CBSDK as provided through official Blackrock channels, or through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===System Setup===&lt;br /&gt;
Building the Blackrock module should copy .bat files for standard experiments into the batch directory.&lt;br /&gt;
&lt;br /&gt;
Ensure your machine is connected to a switch or router that the NSP is also connected to.  This module communicates to the NSP using UDP, and is susceptible to packet loss.  Ensure you have a commercial grade switch to avoid dropping packets.  You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.&lt;br /&gt;
&lt;br /&gt;
You will also need to change your interface&#039;s network configuration ([http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ Windows]):&lt;br /&gt;
* IP address: 192.168.137.XXX where XXX is less than 128.  &amp;lt;u&amp;gt;This number needs to be below 16 and not 10.&amp;lt;/u&amp;gt;  Ensure no other computers have this same address on this switch.&lt;br /&gt;
* Subnet Mask: 255.255.255.0&lt;br /&gt;
* Default Gateway: &amp;lt;Blank&amp;gt;&lt;br /&gt;
To test your network configuration, open a terminal or command prompt and type &#039;&#039;&#039;ping 192.168.137.128&#039;&#039;&#039;. This is the NSP&#039;s default network address.  If you can ping the NSP, you should be able to run the module.&lt;br /&gt;
&lt;br /&gt;
For more details on the network setup for a multi-NSP system, please refer to the official NSP documentation&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
This should work out of the box with standard parameters.  &lt;br /&gt;
====Linux====&lt;br /&gt;
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions.  NSP 6.03 and previous opens port 1002 and 1001 to communicate packets.  This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems.  NSP Firmware 6.04+ uses higher port numbers to avoid this problem.  If you&#039;re running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges.  One way to accomplish this is to comment out the &amp;quot;Start Blackrock&amp;quot; line in your batch file, and launch the Blackrock module from a separate terminal with &amp;quot;sudo ./Blackrock&amp;quot;, executed from the bci2000/prog directory.  &lt;br /&gt;
&lt;br /&gt;
You may also receive an error complaining about the size of your network buffer size:&lt;br /&gt;
    Socket memory assignment error&lt;br /&gt;
    Consider using sysctl -w net.core.rmem_max=8388608&lt;br /&gt;
    or sysctl -w kern.ipc.maxsockbuf=8388608&lt;br /&gt;
&lt;br /&gt;
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges.  You will need to do this once every time the computer reboots.  There may be a way to do this on boot using some config file somewhere.  If you have any ideas, edit this section.  net.core.rmem_max is the proper key to use for Fedora 17.&lt;br /&gt;
&lt;br /&gt;
==Blackrock Firmware/CBSDK/Cerelink Notes==&lt;br /&gt;
When you install the Central &amp;quot;NeuroPort Windows Suite&amp;quot; software on a PC, it comes with a firmware, and a CBSDK distribution.  Unfortunately, these components have individual versioning.  The version of Central appears to match the NSP Firmware version.  Most of the development of this module has been done with Central/NSP Firmware 6.04.03.  CBSDK (hardware library) 3.9 is the compatible SDK for this particular firmware/version.  You can find out what version of central/firmware you&#039;re running by clicking the Windows-&amp;gt;About Cerebus Suite button in Central when the NSP is on and active.&lt;br /&gt;
&lt;br /&gt;
The BCI2000 Blackrock module relies on cbsdk.dll to operate. The cbsdk.dll itself relies on a few Qt dlls (QtCore4.dll, QtXml4.dll) to function.  As a best-practice, you shouldn&#039;t copy these dlls into the BCI2000 prog directory, but instead add the directories that these files are found in to the system path.  [https://www.java.com/en/download/help/path.xml Here is a helpful tutorial for how to change the system path in Windows (you&#039;ll need to restart BCI2000 after doing it)].  You&#039;ll want to add:&lt;br /&gt;
&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite\cbsdk\lib (for cbsdk.dll)&lt;br /&gt;
* C:\Program Files (x86)\Blackrock Microsystems\NeuroPort Windows Suite (for the Qt dlls)&lt;br /&gt;
&lt;br /&gt;
To further complicate things, a GPLV2 spinoff/fork of CBSDK is available in the [http://github.com/dashesy/CereLink Cerelink repository] and is maintained by a non-Blackrock employee.  The source code there is available under GPLV2 (still copyrighted by Blackrock Microsystems), but it should be considered a fork of the official CBSDK code provided by Blackrock.  The code in CereLink currently contains a 3.9 compatible hardware library, and you *can* compile a cbsdk.dll from the code in this repository.  This dll will be similar, &#039;&#039;but not identical&#039;&#039; to the official 3.9 release.  If you want to rock a Linux Blackrock Source module, you&#039;ll need to compile this repository to generate a cbsdk.so for BCI2000 to use.  Blackrock doesn&#039;t provide an official Linux release.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, Blackrock introduced a non-backward-compatible change to the ABI between CBSDK 3.9 and 3.10.  CBSDK 3.10 is *required* for firmware 6.05.XX+. Because this change isn&#039;t backward compatible, we had to make a choice as to what protocol version the module will currently support.  As of r5304, the Blackrock module is using CBSDK (hardware library) 3.9 and is only compatible with firmware version 6.04 and below.  &#039;&#039;&#039;There is an experimental &amp;quot;hack&amp;quot; that enables this module to work with firmware 6.05+,&#039;&#039;&#039; but use it at your own risk.  It seems to be quite stable, but it could result in undefined behavior.  Consider yourself warned.&lt;br /&gt;
&lt;br /&gt;
To make this module ONLY work with Firmware 6.05+:&lt;br /&gt;
* Download BCI2000 SVN HEAD and use CMake to generate the build files, as detailed in [[Programming Reference:Build System]].  Make sure you enable Contributed source modules.&lt;br /&gt;
* Edit src/contrib/SignalSource/Blackrock/lib/cbhwlib.h and make sure cbVERSION_MINOR is set to 10 (instead of 9)&lt;br /&gt;
* Recompile the Blackrock module.&lt;br /&gt;
&lt;br /&gt;
The module will eventually default to using official hardware library 3.10 once the author updates his system to firmware 6.05.&lt;br /&gt;
&lt;br /&gt;
==Multi-NSP Synchronization==&lt;br /&gt;
The NSP systems can be daisy-chained to provide access to more channels and more fun.  Although a hardware &amp;quot;sync&amp;quot; cable is provided by Blackrock Microsystems, the authors are a bit confused as to what it actually does, because it does not appear to synchronize the systems on a sample by sample basis.  CBSDK opens a separate instance for each NSP and the module is just communicating with both the systems simultaneously and attempting to match up the data streams as closely as possible.  To facilitate this, there is a hardware synchronization built into the module which requires a bit of hardware setup to use.  This system pulses one of the digital outputs high and provided that output is connected to the correct analog input on both NSPs, the streams will be resynchronized every time NSPSyncState is set to a value of 1.&lt;br /&gt;
&lt;br /&gt;
In order to enable NSP Hardware Synchronization:&lt;br /&gt;
* Connect Digital Output 1 on any of the NSPs to Analog Input 16 on all the NSPs.  You&#039;ll probably need BNC T-Connectors for this.&lt;br /&gt;
* Ensure Analog Input 16 is in the same SampleGroup as the channels you wish to acquire using BCI2000.&lt;br /&gt;
* If BCI2000 recognizes that Analog Input 16 is being acquired at the correct SamplingRate on all NSPs and that there is more than 1 NSP, hardware synchronization will occur automatically upon SetConfig.&lt;br /&gt;
&lt;br /&gt;
A hardware synchronization procedure strobes digital output 0 on the NSPs, consumes 100 ms worth of samples, then realigns the ringbuffers for each NSP to the rising edge of analog input 16.  A log message will tell you which instance was corrected by how many samples.  Throughout the course of a recording, dropped packets and clock skew will slowly throw the NSPs out of synchronization.  On the author&#039;s system, it takes about 10 minutes for a 100 ms desynchronization to occur.  At any time, NSPSyncState can be set to 1 (Especially handy as an operator function button -- see [[User_Reference:Operator_Module#Function_Buttons]]), and the re-synchronization procedure will consume 100ms of data and resynchronize.  Its important to keep in mind that if the desynchronization is already greater than 100ms, the procedure will fail, due to there not being a rising edge in one of the signals.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
This module used to fully-configure the NSPs directly from BCI2000.  The NSP system is sooo configurable that this became a big source of headaches.  In the most recent version, BCI2000 will auto-configure everything based on the currently selected SampleGroup.  The NSPs always acquire data at 30Khz, but channels can be added to a SampleGroup which is downsampled (with antialiasing) in real-time by the NSP before being streamed over ethernet to receivers.  You can add channels to these channel groups in the Central software by enabling continuous streaming on individual channels, and selecting the sampling rate.&lt;br /&gt;
&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SamplingRate===&lt;br /&gt;
In standard use, this is one of two parameters you need to play with.  This is where you select the sample group you want BCI2000 to record from.  Valid sampling rates are 500 Hz, 1000 Hz, 2000 Hz, 10000 Hz, and 30000 Hz.  When the SetConfig button is pressed, BCI2000 will collect all channels that are members of that SampleGroup and configure to acquire from those channels.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
There are a bunch of default SampleBlockSizes for the different SamplingRates, which you will get if you use &#039;auto&#039; as the value of this parameter.  They are roughly set to clock BCI2000 at about 50 Hz. Depending on the processing you&#039;re doing, you may want to lengthen the block size. Any number of samples is valid here: even 1.  You may want to not do that, however.  Clocking the system above 50 Hz [http://www.youtube.com/watch?v=2FM3Em7FIOc is a bad choice].  The default block size for different sample groups is as follows:&lt;br /&gt;
&lt;br /&gt;
    int gGroupRates[] = { 0, 500, 1000, 2000, 10000, 30000 }; // samples per second&lt;br /&gt;
    int gBlockSizes[] = { 0, 10,  20,   40,   200,   600   }; // samples per block (50 Hz)&lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
These will be pulled from the Channel Label property set in the Central Software.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===SourceChOffset/SourceChGain===&lt;br /&gt;
Again, these are populated automatically.  Use &#039;auto&#039; to configure this parameter.&lt;br /&gt;
&lt;br /&gt;
===NSPInstances===&lt;br /&gt;
This parameter determines how many NSPs you intend to record from.  Setting this parameter to &#039;2&#039; enables the hardware synchronization described earlier, and using more than 2 NSPs is untested.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutput===&lt;br /&gt;
This parameter specifies a matrix of expressions that will be evaluated once per SampleBlock to set the digital output channels.  Each row of this matrix defines an expression for one digital output.  If that expression evaluates true for that block, the associated digital output will be set high, and vice versa for false.  See [[User Reference:Expression Syntax]] for help with BCI2000 Expressions.  An example matrix is provided below.&lt;br /&gt;
&lt;br /&gt;
    Instance Output Expression&lt;br /&gt;
    1        1      StimulusCode!=0 // Will set output 1 on NSP1 high whenever a stimulus is on screen&lt;br /&gt;
    2        3      KeyDown!=0 // Will set output 3 on NSP2 high whenever a key is pressed.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
===NSPSyncState===&lt;br /&gt;
This state records the current status of the multi-NSP hardware synchronization described earlier.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Programming_Howto:SVN_Client_Setup&amp;diff=7418</id>
		<title>Programming Howto:SVN Client Setup</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Programming_Howto:SVN_Client_Setup&amp;diff=7418"/>
		<updated>2014-07-16T20:00:50Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Checking out older versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up TortoiseSVN to access the BCI2000 code repository ==&lt;br /&gt;
To set up TortoiseSVN and download the BCI2000 source code to your computer, follow these steps:&lt;br /&gt;
* Download the latest stable version from http://tortoisesvn.net/, and execute the installer program. This page has been written for version 1.40, but should be rather independent of TortoiseSVN&#039;s version number.&lt;br /&gt;
* Create or pick an empty folder located on your machine’s harddrive. This will hold your working copy of the BCI2000 source tree, in an automatically created subfolder called &amp;quot;BCI2000.&amp;quot;&lt;br /&gt;
* Right-click the folder you picked in the last step. From the context menu, choose the &amp;quot;SVN Checkout...&amp;quot; option – a dialog window appears.&lt;br /&gt;
* In the dialog window, enter the repository URL: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.bci2000.org/svn/tags/releases/current&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, choose &amp;quot;HEAD revision&amp;quot; and &amp;quot;include externals&amp;quot;. Then, click OK.&lt;br /&gt;
* You will be prompted for your user name and password. This account is the same that you use to log into [http://{{SERVERNAME}}/tracproj Trac] and [[special:userlogin|into this Wiki]].&lt;br /&gt;
&lt;br /&gt;
== Checking out older versions ==&lt;br /&gt;
If you think that the current version of BCI2000 is not working properly, or would like to work with an older version for some other reason, you should first check whether one of the releases in &amp;lt;tt&amp;gt;http://www.bci2000.org/svn/tags/releases&amp;lt;/tt&amp;gt; suits you needs.&lt;br /&gt;
&lt;br /&gt;
Otherwise, to obtain a revision that is newer than the latest binary release, you will need to do a checkout of &amp;lt;tt&amp;gt;http://www.bci2000.org/svn/trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In both cases, you may enter a &amp;quot;Revision number&amp;quot; into the checkout dialog in order to obtain an older revision.&lt;br /&gt;
The &amp;quot;Show Log&amp;quot; button will provide you with an overview of the latest changes and their associated revision numbers.&lt;br /&gt;
&lt;br /&gt;
== Working on Branches ==&lt;br /&gt;
Branches are versions of the source code that are developed in parallel to the main code version, e.g. to incorporate new features without affecting the stable version that is intended for end users.&lt;br /&gt;
To checkout a branch called &amp;quot;myBranch&amp;quot;, the repository URL would be:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.bci2000.org/svn/branches/myBranch&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
Otherwise, the checkout process remains the same.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
*&#039;&#039;&#039;Symptom:&#039;&#039;&#039; When trying to checkout, update, or commit, you get an error message: &amp;quot;PROPFIND request failed&amp;quot;, &amp;quot;OPTIONS request failed&amp;quot;, &amp;quot;could not connect to server&amp;quot;, or the like.&lt;br /&gt;
**&#039;&#039;&#039;Cause:&#039;&#039;&#039; Quite likely, you are behind a firewall, and internet access is over a proxy server.&lt;br /&gt;
**&#039;&#039;&#039;Fix:&#039;&#039;&#039; To configure TortoiseSVN for use with a proxy server, right-click your desktop,  choose TortoiseSVN-&amp;gt;Settings-&amp;gt;Network, check &amp;quot;Enable Proxy&amp;quot; and enter the appropriate information. If unsure, contact your local system administrator.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Symptom:&#039;&#039;&#039; You configured TortoiseSVN for use with a proxy server as described above. Now, checking out works fine, however on updates or commits, you get strange errors about failed requests.&lt;br /&gt;
**&#039;&#039;&#039;Cause:&#039;&#039;&#039; Your proxy server is not forwarding SVN&#039;s WebDAV requests correctly.&lt;br /&gt;
**&#039;&#039;&#039;Fix:&#039;&#039;&#039; To keep the proxy from interfering with the protocol, change your setup to use an encrypted connection:&lt;br /&gt;
:*Right-click on your source tree&#039;s top folder, choose TortoiseSVN-&amp;gt;Relocate.&lt;br /&gt;
:*In the &amp;quot;to URL&amp;quot; edit field, modify &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to read &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
:*On the first connection, TortoiseSVN will display a warning message: [[Image:TortoiseCertificateWarning.PNG|center]]&lt;br /&gt;
::Click &amp;quot;Accept permanently&amp;quot; to continue.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Programming Howto:Using TortoiseSVN]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto]] [[Category:Development]] [[Category:Prerequisites]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gNautilus&amp;diff=7416</id>
		<title>User Reference:gNautilus</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gNautilus&amp;diff=7416"/>
		<updated>2014-06-04T04:40:31Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The g.Nautilus acquisition module enables signal acquisition from the g.Nautilus device via the g.NEEDaccess API.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gNautilus&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V0.5 -- Analog Signal Acquisition&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4727&lt;br /&gt;
*Tested under: 4727&lt;br /&gt;
*Known to compile under: 4727&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The g.Nautilus is a wireless headset by g.tec, and is the first in their product line to use g.NEEDaccess exclusively for realtime access.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; As of the time of writing, this module is at release V0.5.  As such, it is not necessarily feature complete.  The current g.NEEDAccess API BETA 7XX has not implemented all functionality that will eventually be supported in this module.  Also, timing is pretty awful.  As of right now, the acquisition module is not recommended for real-time closed-loop use with BCI2000.&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
Install g.NEEDAccess on your machine, along with necessary g.tec drivers.  Ensure the GDSDataServer is running by checking in services.msc.  You&#039;ll need your HASP dongle in order to to access g.NEEDAccess[http://www.reactiongifs.com/r/fgwtf.gif .]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; As of right now, g.NEEDAccess BETA 7XX appears to only support Windows 7+ 64 bit operating systems.  As such, a 64 bit build of BCI2000 is required to make the g.Nautilus binary.  g.Nautiulus can only be built using Visual Studio on Windows.&lt;br /&gt;
&lt;br /&gt;
Ensure the device is charged and connected to the base station (refer to the included documentation for help with this).  Start BCI2000 with the gNautilus source module.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The g.Nautilus claims to support 64 channels via its API.  The module has only been tested up to 32 channels.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If less than 32 channels are acquired, only the first SourceCh channels will be acquired from.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
Only the following sample rates are currently supported by the API: 250 Hz and 500 Hz.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Sample block size must be set to an integer multiple of the minimum sample block size corresponding to the current SamplingRate.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; As of V0.5, and g.NEEDAccess BETA 7XX, a SampleBlockSize set to the minimum block size results in non-realtime operation.  Please specify a multiple of at least 2 * minimum block size.&lt;br /&gt;
&lt;br /&gt;
*250 Hz -- 8 samples per block (block length of 32 ms, system clocked at 31.25 Hz)&lt;br /&gt;
*500 Hz -- 15 samples per block (block length of 30 ms, system clocked at 33.33 Hz)&lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Leave this blank and channels are numbered.  See Operator Log for information about correct channel names.&lt;br /&gt;
&lt;br /&gt;
===HostIP, HostPort, LocalIP, LocalPort===&lt;br /&gt;
This defines the UDP connection to the GDSDataServer.  If the service is running on your machine (see services.msc), the GDSDataServer will be listening to UDP packets on port 50223 (Default) at localhost (127.0.0.1).  By default, the server will send messages to the listening process (localhost -- 127.0.0.1) on port 50224.  The defaults here will be used in most circumstances.  Consult your network administrator if your acquisition system is different.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Ensure UDP communications on port 50223 and 50224 are unblocked and uninterrupted by any firewalls between the server and the client.&lt;br /&gt;
&lt;br /&gt;
===NautilusSN===&lt;br /&gt;
This is the &amp;quot;name&amp;quot; of the device to acquire from.  The serial number on the base-station is used here (Format: NB-20XX.YY.ZZ).  Check the operator log for discovered devices and troubleshooting hints.&lt;br /&gt;
&lt;br /&gt;
===NetworkChannel===&lt;br /&gt;
Channels 11-18 are available for communicating with several g.Nautilus devices in the same room.  In order to ensure uninterrupted connections, use different NetworkChannel settings for each g.Nautilus in the room.  &lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
*Autoconfiguration!&lt;br /&gt;
*Parametrization of Sensitivity&lt;br /&gt;
*Selective Channel Acquisition&lt;br /&gt;
*Digital Input as States&lt;br /&gt;
*Head Mounted Accelerometer input as States&lt;br /&gt;
*Signal quality indicator states&lt;br /&gt;
*Battery life check&lt;br /&gt;
*BCI2000 Integrated impedance check mode&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gNautilus&amp;diff=7415</id>
		<title>User Reference:gNautilus</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gNautilus&amp;diff=7415"/>
		<updated>2014-06-04T04:21:50Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Initial documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The g.Nautilus acquisition module enables signal acquisition from the g.Nautilus device via the g.NEEDaccess API.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gNautilus&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V0.5 -- Analog Signal Acquisition&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4727&lt;br /&gt;
*Tested under: 4727&lt;br /&gt;
*Known to compile under: 4727&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The g.Nautilus is a wireless headset by g.tec, and is the first in their product line to use g.NEEDaccess exclusively for realtime access.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; As of the time of writing, this module is at release V0.5.  As such, it is not necessarily feature complete.  The current g.NEEDAccess API BETA 7XX has not implemented all functionality that will eventually be supported in this module.  Also, timing is pretty awful.  As of right now, the acquisition module is not recommended for real-time closed-loop use with BCI2000.&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
Install g.NEEDAccess on your machine, along with necessary g.tec drivers.  Ensure the GDSDataServer is running by checking in services.msc.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; As of right now, g.NEEDAccess BETA 7XX appears to only support Windows 7+ 64 bit operating systems.  As such, a 64 bit build of BCI2000 is required to make the g.Nautilus binary.  g.Nautiulus can only be built using Visual Studio on Windows.&lt;br /&gt;
&lt;br /&gt;
Ensure the device is charged and connected to the base station (refer to the included documentation for help with this).  Start BCI2000 with the gNautilus source module.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
&lt;br /&gt;
===SourceCh===&lt;br /&gt;
The g.Nautilus claims to support 64 channels via its API.  The module has only been tested up to 32 channels.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If less than 32 channels are acquired, only the first SourceCh channels will be acquired from.&lt;br /&gt;
&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
Only the following sample rates are currently supported by the API: 250 Hz and 500 Hz.&lt;br /&gt;
&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Sample block size must be set to an integer multiple of the minimum sample block size corresponding to the current SamplingRate.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; As of V0.5, and g.NEEDAccess BETA 7XX, a SampleBlockSize set to the minimum block size results in non-realtime operation.  Please specify a multiple of at least 2 * minimum block size.&lt;br /&gt;
&lt;br /&gt;
*250 Hz -- 8 samples per block (block length of 32 ms, system clocked at 31.25 Hz)&lt;br /&gt;
*500 Hz -- 15 samples per block (block length of 30 ms, system clocked at 33.33 Hz)&lt;br /&gt;
&lt;br /&gt;
===ChannelNames===&lt;br /&gt;
Leave this blank and channels are numbered.  See Operator Log for information about correct channel names.&lt;br /&gt;
&lt;br /&gt;
===HostIP, HostPort, LocalIP, LocalPort===&lt;br /&gt;
This defines the UDP connection to the GDSDataServer.  If the service is running on your machine (see services.msc), the GDSDataServer will be listening to UDP packets on port 50223 (Default) at localhost (127.0.0.1).  By default, the server will send messages to the listening process (localhost -- 127.0.0.1) on port 50224.  The defaults here will be used in most circumstances.  Consult your network administrator if your acquisition system is different.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Ensure UDP communications on port 50223 and 50224 are unblocked and uninterrupted by any firewalls between the server and the client.&lt;br /&gt;
&lt;br /&gt;
===NautilusSN===&lt;br /&gt;
This is the &amp;quot;name&amp;quot; of the device to acquire from.  The serial number on the base-station is used here (Format: NB-20XX.YY.ZZ).  Check the operator log for discovered devices and troubleshooting hints.&lt;br /&gt;
&lt;br /&gt;
===NetworkChannel===&lt;br /&gt;
Channels 11-18 are available for communicating with several g.Nautilus devices in the same room.  In order to ensure uninterrupted connections, use different NetworkChannel settings for each g.Nautilus in the room.  &lt;br /&gt;
&lt;br /&gt;
==Future Work==&lt;br /&gt;
*Autoconfiguration!&lt;br /&gt;
*Parametrization of Sensitivity&lt;br /&gt;
*Selective Channel Acquisition&lt;br /&gt;
*Digital Input as States&lt;br /&gt;
*Head Mounted Accelerometer input as States&lt;br /&gt;
*Signal quality indicator states&lt;br /&gt;
*Battery life check&lt;br /&gt;
*BCI2000 Integrated impedance check mode&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:ADCs&amp;diff=7414</id>
		<title>Contributions:ADCs</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:ADCs&amp;diff=7414"/>
		<updated>2014-06-04T03:50:02Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added g.Nautilus Documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following data acquisition filters are available in the [[Contributions:Contents|Contributions]] section of BCI2000:&lt;br /&gt;
&lt;br /&gt;
*[[Contributions:AmpServerProADC]]: Interface to the EGI AmpServerPro.&lt;br /&gt;
*[[Contributions:BioRadioADC]]: Interface to the BioRadio amplifer.&lt;br /&gt;
*[[Contributions:Biosemi2ADC]]: Interface to the Biosemi amplifier.&lt;br /&gt;
*[[Contributions:Blackrock]]: Interface Blackrock devices through CereLink.&lt;br /&gt;
*[[Contributions:B-Alert]]: Interface to B-Alert brain monitoring systems.&lt;br /&gt;
*[[Contributions:DAS_ADC]]: Interface to MeasurementComputing AD cards.&lt;br /&gt;
*[[Contributions:DTADC]]: Interface to Data Translation boards.&lt;br /&gt;
*[[Contributions:Emotiv]]: Interface to the Emotiv EPOC.&lt;br /&gt;
*[[Contributions:FieldTripBufferSource]]: Interface to the FieldTrip buffer.&lt;br /&gt;
*[[Contributions:FilePlayback]]: A source module that replays sessions from recorded data files.&lt;br /&gt;
*[[Contributions:gHIamp]]: Interface to the gHIamp.&lt;br /&gt;
*[[Contributions:gNautilus]]: Interface to the gNautilus via g.NEEDAccess.&lt;br /&gt;
*[[Contributions:MicromedADC]]: Interface to the Micromed EEG system.&lt;br /&gt;
*[[Contributions:ModularEEG]]: Interface to the ModularEEG system.&lt;br /&gt;
*[[Contributions:Neuralynx]]: Interface to Neuralynx systems&lt;br /&gt;
*[[Contributions:NIADC]]: Interface to National Instruments boards.&lt;br /&gt;
*[[Contributions:NIDAQ-MX]]: Interface to National Instruments boards using the MX driver.&lt;br /&gt;
*[[Contributions:NIDAQLogger]]: Interface to multiple National Instruments DAQ boards using MX driver (INPUT ONLY).&lt;br /&gt;
*[[Contributions:NIDAQFilter]]: Interface to multiple National Instruments DAQ boards using MX driver (OUTPUT ONLY).&lt;br /&gt;
*[[Contributions:NeuroscanADC]]: Neuroscan Acquire socket protocol client.&lt;br /&gt;
*[[Contributions:NeuroscanAccessSDK]]: Interface to Neuroscan Direct Access SDK.&lt;br /&gt;
*[[Contributions:NeuroSky]]: Interface to Neurosky MindSet.&lt;br /&gt;
*[[Contributions:NicoletOne]]: Interface to NicoletOne nEEG series amplifiers.&lt;br /&gt;
*[[Contributions:ctfneurod]]: CTF RealTime to Neuroscan Acquire relay.&lt;br /&gt;
*[[Contributions:RDAClientADC]]: Brain Vision RDA socket protocol client.&lt;br /&gt;
*[[Contributions:TDTADC]]: Interface to Tucker-Davis Pentusa systems.&lt;br /&gt;
*[[Contributions:TMSiADC]]: Interface to TMSi Refa and Porti systems.&lt;br /&gt;
*[[Contributions:vAmpADC]]: Interface to Brain Products V-amp systems.&lt;br /&gt;
*[[Contributions:EnobioADC]]: Interface to Enobio sensor.&lt;br /&gt;
*[[Contributions:MicRecorderFilter]]: Interface to the system soundcard, logging audio input.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:How to use a Contributed Source Module]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:StimBoxFilter&amp;diff=7321</id>
		<title>Contributions:StimBoxFilter</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:StimBoxFilter&amp;diff=7321"/>
		<updated>2013-09-25T00:24:26Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Another copy-paste error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An integration of the g.STIMbox with BCI2000&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/StimBoxFilter&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2013/09/23: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4580&lt;br /&gt;
*Tested under: 4580&lt;br /&gt;
*Known to compile under: 4580&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The g.STIMbox is a USB digital I/O card.  This simple filter extension resides in the Application module and makes input and output with the card easy.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_STIMBOXFILTER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--StimBoxFilter=[COMPORT]&amp;lt;/code&amp;gt; command line argument (NB, as explained below, the numeric value here matters, and denotes the COM port to be used:  =1 means COM port 1).&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The StimBoxFilter is configured in the g.STIMbox tab.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===EnableStimBoxFilter===&lt;br /&gt;
Enables/Disables the StimBoxFilter.  This parameter performs double-duty as the COM port selector. NOTE: The COM port that the g.STIMbox is connected to can be determined by accessing the Device Manager within the Windows control panel.&lt;br /&gt;
*[0] - Disabled&lt;br /&gt;
*Any other number indicates the COM port to attempt communication with the g.STIMbox on.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutputs===&lt;br /&gt;
This matrix of expressions that controls the outputs on the device.  The g.STIMbox has 16 digital outputs which can be controlled via expressions in this matrix.  Some of the outputs can only be accessed via the D-SUB connector on the front of the box.  To control a port, create a new row in this matrix and change the row label to the number of the port you wish to control.  If the expression in column 1 in that row evaluates to True, the port will be set high, and the port will be set low whenever the expression evaluates to False.  If an &#039;F&#039; is specified immediately after the row label (for example, &#039;3F&#039;), that port is assumed to be in &#039;Frequency Mode&#039; and the port frequency will be set to whatever the expression evaluates to.  If the expression evaluates to 0 or False, the port will be set low (off).  Note that changing the frequency while in frequency mode will reset the port to &#039;high&#039; immediately.  This means that changing the frequency too often will result in the port reading &#039;high&#039; all the time.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! (Row Label)&lt;br /&gt;
! (Column 1)&lt;br /&gt;
! (Description)&lt;br /&gt;
|-&lt;br /&gt;
! 1&lt;br /&gt;
| 1&lt;br /&gt;
| // Output 1 is always high&lt;br /&gt;
|-&lt;br /&gt;
! 2&lt;br /&gt;
| 0&lt;br /&gt;
| // Output 2 is always low&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| 0.5&lt;br /&gt;
| // Outputs don&#039;t need to be specified in order, 0.5 evaluates to True&lt;br /&gt;
|-&lt;br /&gt;
! 3&lt;br /&gt;
| Signal(1,1) &amp;gt; 50&lt;br /&gt;
| // Output 3 is high when the input signal exceeds 50.&lt;br /&gt;
|-&lt;br /&gt;
! 4F&lt;br /&gt;
| StimulusType&lt;br /&gt;
| // Output 4 will evaluate the state &amp;quot;StimulusType&amp;quot; to determine output frequency.&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| !StimBoxInput1&lt;br /&gt;
| // Line 3 is ignored, Output 5 = Input 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Special Notes:&lt;br /&gt;
*Valid frequencies for frequency mode are between 1 and 50 Hz.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The StimBoxFilter outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===StimBoxInput[1-14]===&lt;br /&gt;
There are 14 digital inputs on the StimBox.  Some of the inputs can only be accessed via the D-SUB connectors on the front of the box.  These inputs are asynchronously sampled at 256 Hz and set as BCI2000 states once per block.  Note that this means there is data loss if your signal changes more than once per BCI2000 block.  Clocking BCI2000 at &amp;gt;256 blocks per second is also inadvisable, so this is expected.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:StimBoxFilter&amp;diff=7320</id>
		<title>Contributions:StimBoxFilter</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:StimBoxFilter&amp;diff=7320"/>
		<updated>2013-09-25T00:21:40Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Fixed copy-paste error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An integration of the g.STIMbox with BCI2000&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2013/09/23: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4580&lt;br /&gt;
*Tested under: 4580&lt;br /&gt;
*Known to compile under: 4580&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The g.STIMbox is a USB digital I/O card.  This simple filter extension resides in the Application module and makes input and output with the card easy.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_STIMBOXFILTER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--StimBoxFilter=[COMPORT]&amp;lt;/code&amp;gt; command line argument (NB, as explained below, the numeric value here matters, and denotes the COM port to be used:  =1 means COM port 1).&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The StimBoxFilter is configured in the g.STIMbox tab.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===EnableStimBoxFilter===&lt;br /&gt;
Enables/Disables the StimBoxFilter.  This parameter performs double-duty as the COM port selector. NOTE: The COM port that the g.STIMbox is connected to can be determined by accessing the Device Manager within the Windows control panel.&lt;br /&gt;
*[0] - Disabled&lt;br /&gt;
*Any other number indicates the COM port to attempt communication with the g.STIMbox on.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutputs===&lt;br /&gt;
This matrix of expressions that controls the outputs on the device.  The g.STIMbox has 16 digital outputs which can be controlled via expressions in this matrix.  Some of the outputs can only be accessed via the D-SUB connector on the front of the box.  To control a port, create a new row in this matrix and change the row label to the number of the port you wish to control.  If the expression in column 1 in that row evaluates to True, the port will be set high, and the port will be set low whenever the expression evaluates to False.  If an &#039;F&#039; is specified immediately after the row label (for example, &#039;3F&#039;), that port is assumed to be in &#039;Frequency Mode&#039; and the port frequency will be set to whatever the expression evaluates to.  If the expression evaluates to 0 or False, the port will be set low (off).  Note that changing the frequency while in frequency mode will reset the port to &#039;high&#039; immediately.  This means that changing the frequency too often will result in the port reading &#039;high&#039; all the time.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! (Row Label)&lt;br /&gt;
! (Column 1)&lt;br /&gt;
! (Description)&lt;br /&gt;
|-&lt;br /&gt;
! 1&lt;br /&gt;
| 1&lt;br /&gt;
| // Output 1 is always high&lt;br /&gt;
|-&lt;br /&gt;
! 2&lt;br /&gt;
| 0&lt;br /&gt;
| // Output 2 is always low&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| 0.5&lt;br /&gt;
| // Outputs don&#039;t need to be specified in order, 0.5 evaluates to True&lt;br /&gt;
|-&lt;br /&gt;
! 3&lt;br /&gt;
| Signal(1,1) &amp;gt; 50&lt;br /&gt;
| // Output 3 is high when the input signal exceeds 50.&lt;br /&gt;
|-&lt;br /&gt;
! 4F&lt;br /&gt;
| StimulusType&lt;br /&gt;
| // Output 4 will evaluate the state &amp;quot;StimulusType&amp;quot; to determine output frequency.&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| !StimBoxInput1&lt;br /&gt;
| // Line 3 is ignored, Output 5 = Input 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Special Notes:&lt;br /&gt;
*Valid frequencies for frequency mode are between 1 and 50 Hz.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The StimBoxFilter outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===StimBoxInput[1-14]===&lt;br /&gt;
There are 14 digital inputs on the StimBox.  Some of the inputs can only be accessed via the D-SUB connectors on the front of the box.  These inputs are asynchronously sampled at 256 Hz and set as BCI2000 states once per block.  Note that this means there is data loss if your signal changes more than once per BCI2000 block.  Clocking BCI2000 at &amp;gt;256 blocks per second is also inadvisable, so this is expected.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:StimBoxFilter&amp;diff=7319</id>
		<title>Contributions:StimBoxFilter</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:StimBoxFilter&amp;diff=7319"/>
		<updated>2013-09-23T04:43:10Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added documentation for the StimBoxFilter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An integration of the g.STIMbox with BCI2000&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2013/09/23: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4580&lt;br /&gt;
*Tested under: 4580&lt;br /&gt;
*Known to compile under: 4580&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The g.STIMbox is a USB digital I/O card.  This simple filter extension resides in the Application module and makes input and output with the card easy.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_STIMBOXFILTER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--StimBoxFilter=[COMPORT]&amp;lt;/code&amp;gt; command line argument (NB, as explained below, the numeric value here matters, and denotes the COM port to be used:  =1 means COM port 1).&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The StimBoxFilter is configured in the g.STIMbox tab.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
===EnableStimBoxFilter===&lt;br /&gt;
Enables/Disables the StimBoxFilter.  This parameter performs double-duty as an audio host API selector. NOTE: The COM port that the g.STIMbox is connected to can be determined by accessing the Device Manager within the Windows control panel.&lt;br /&gt;
*[0] - Disabled&lt;br /&gt;
*Any other number indicates the COM port to attempt communication with the g.STIMbox on.&lt;br /&gt;
&lt;br /&gt;
===DigitalOutputs===&lt;br /&gt;
This matrix of expressions that controls the outputs on the device.  The g.STIMbox has 16 digital outputs which can be controlled via expressions in this matrix.  Some of the outputs can only be accessed via the D-SUB connector on the front of the box.  To control a port, create a new row in this matrix and change the row label to the number of the port you wish to control.  If the expression in column 1 in that row evaluates to True, the port will be set high, and the port will be set low whenever the expression evaluates to False.  If an &#039;F&#039; is specified immediately after the row label (for example, &#039;3F&#039;), that port is assumed to be in &#039;Frequency Mode&#039; and the port frequency will be set to whatever the expression evaluates to.  If the expression evaluates to 0 or False, the port will be set low (off).  Note that changing the frequency while in frequency mode will reset the port to &#039;high&#039; immediately.  This means that changing the frequency too often will result in the port reading &#039;high&#039; all the time.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! (Row Label)&lt;br /&gt;
! (Column 1)&lt;br /&gt;
! (Description)&lt;br /&gt;
|-&lt;br /&gt;
! 1&lt;br /&gt;
| 1&lt;br /&gt;
| // Output 1 is always high&lt;br /&gt;
|-&lt;br /&gt;
! 2&lt;br /&gt;
| 0&lt;br /&gt;
| // Output 2 is always low&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| 0.5&lt;br /&gt;
| // Outputs don&#039;t need to be specified in order, 0.5 evaluates to True&lt;br /&gt;
|-&lt;br /&gt;
! 3&lt;br /&gt;
| Signal(1,1) &amp;gt; 50&lt;br /&gt;
| // Output 3 is high when the input signal exceeds 50.&lt;br /&gt;
|-&lt;br /&gt;
! 4F&lt;br /&gt;
| StimulusType&lt;br /&gt;
| // Output 4 will evaluate the state &amp;quot;StimulusType&amp;quot; to determine output frequency.&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| !StimBoxInput1&lt;br /&gt;
| // Line 3 is ignored, Output 5 = Input 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Special Notes:&lt;br /&gt;
*Valid frequencies for frequency mode are between 1 and 50 Hz.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The StimBoxFilter outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===StimBoxInput[1-14]===&lt;br /&gt;
There are 14 digital inputs on the StimBox.  Some of the inputs can only be accessed via the D-SUB connectors on the front of the box.  These inputs are asynchronously sampled at 256 Hz and set as BCI2000 states once per block.  Note that this means there is data loss if your signal changes more than once per BCI2000 block.  Clocking BCI2000 at &amp;gt;256 blocks per second is also inadvisable, so this is expected.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Extensions&amp;diff=7318</id>
		<title>Contributions:Extensions</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Extensions&amp;diff=7318"/>
		<updated>2013-09-23T04:04:15Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added page for the StimBoxFilter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A framework &#039;&#039;Extension&#039;&#039; is an optional contributed plugin which can affect multiple modules.  For example, various manufacturer-specific  [[User Reference:Logging Input|input-device loggers]] are provided in the &amp;lt;code&amp;gt;src/contrib/Extensions&amp;lt;/code&amp;gt; folder, and these can be optionally added to the BCI2000 framework for SignalSource modules, thereby giving all source modules the ability to log input from the corresponding devices.  Selecting a custom Extension, and re-building your modules to include it, requires the use of CMake and a supported C++ compiler:  see the [[Programming Howto:Quickstart Guide]] for a walkthrough that shows you how to recompile BCI2000 modules. &lt;br /&gt;
&lt;br /&gt;
The following user extensions are available in the [[Contributions:Contents|Contributions]] section of BCI2000:&lt;br /&gt;
&lt;br /&gt;
*[[Contributions:DataGloveLogger]]: A logger extension which acquires data from the 5DT Data Glove Ultra.&lt;br /&gt;
*[[Contributions:EyetrackerLogger]]: A logger extension which acquires data from Tobii eyetrackers.&lt;br /&gt;
*[[Contributions:GazeMonitorFilter]]: An application module filter extension which supports the EyetrackerLogger.&lt;br /&gt;
*[[Contributions:WiimoteLogger]]: A logger extension which acquires data from Nintendo Wii Remotes.&lt;br /&gt;
*[[Contributions:WebcamLogger]]: A logger extension which allows for synchronizing webcam video.&lt;br /&gt;
*[[Contributions:AudioExtension]]: An all purpose audio toolkit which allows for realtime multichannel audio I/O.&lt;br /&gt;
*[[Contributions:StimBoxFilter]]: A logger and controller for the gtec g.STIMbox.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Programming Reference:EnvironmentExtension Class]]&lt;br /&gt;
&lt;br /&gt;
[[Programming Tutorial:Implementing an Input Logger]][[Category:Contents]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7302</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7302"/>
		<updated>2013-08-10T20:29:09Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Functional Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the CereLink &amp;quot;cbsdk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 4365&lt;br /&gt;
*Known to compile under: 4365&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from the Blackrock NSP through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
Building the Blackrock module should copy .bat files for standard experiments into the batch directory, in addition to a parameter fragment for the amplifier, placed in parms/fragments/amplifiers.&lt;br /&gt;
&lt;br /&gt;
Ensure your machine is connected to a switch or router that the NSP is also connected to.  This module communicates to the NSP using UDP, and is susceptable to packet loss.  In the event of a lost packet, the module will crash (this is rare with a good switch).  Ensure you have a commercial grade switch to avoid dropping packets.  You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.&lt;br /&gt;
&lt;br /&gt;
You will also need to change your interface&#039;s network configuration ([http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ Windows]):&lt;br /&gt;
* IP address: 192.168.137.XXX where XXX is less than 128.  &amp;lt;u&amp;gt;This number needs to be below 16 and not 10.&amp;lt;/u&amp;gt;  Ensure no other computers have this same address on this switch.&lt;br /&gt;
* Subnet Mask: 255.255.255.0&lt;br /&gt;
* Default Gateway: &amp;lt;Blank&amp;gt;&lt;br /&gt;
To test your network configuration, open a terminal or command prompt and type &#039;&#039;&#039;ping 192.168.137.128&#039;&#039;&#039;. This is the NSP&#039;s default network address.  If you can ping the NSP, you should be able to run the module.&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
This should work out of the box with standard parameters.  &lt;br /&gt;
====Linux====&lt;br /&gt;
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions.  NSP 6.03 and previous opens port 1002 and 1001 to communicate packets.  This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems.  NSP Firmware 6.04+ uses higher port numbers to avoid this problem.  If you&#039;re running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges.  One way to accomplish this is to comment out the &amp;quot;Start Blackrock&amp;quot; line in your batch file, and launch the Blackrock module from a separate terminal with &amp;quot;sudo ./Blackrock&amp;quot;, executed from the bci2000/prog directory.  &lt;br /&gt;
&lt;br /&gt;
You may also receive an error complaining about the size of your network buffer size:&lt;br /&gt;
    Socket memory assignment error&lt;br /&gt;
    Consider using sysctl -w net.core.rmem_max=8388608&lt;br /&gt;
    or sysctl -w kern.ipc.maxsockbuf=8388608&lt;br /&gt;
&lt;br /&gt;
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges.  You will need to do this once every time the computer reboots.  There may be a way to do this on boot using some config file somewhere.  If you have any ideas, edit this section.  net.core.rmem_max is the proper key to use for Fedora 17.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SourceCh===&lt;br /&gt;
The Blackrock module supports a maximum of 144 analog channels.  The first 128 of these channels are the analog EEG channels, and the following 16 are the analog input channels on the NSP itself.&lt;br /&gt;
===AnalogCh===&lt;br /&gt;
This parameter specifies what channels to acquire from the NSP.  Again, the first 128 of these channels are the analog EEG channels, and the following 16 are analog input channels on the NSP itself.  You can specify this parameter in two ways.&lt;br /&gt;
====Manual====&lt;br /&gt;
Specify a vector of 144 &#039;0&#039;s and &#039;1&#039;s; where there are &#039;&#039;SourceCh&#039;&#039; &#039;1&#039;s.  Example:&lt;br /&gt;
    SourceCh = 16;&lt;br /&gt;
    AnalogCh = 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;br /&gt;
This parameterization acquires channels 4, 8, 9, 10, 17, 18, 19, 23, 29, 33, 37, 39, 44, 50, AINP1, and AINP2&lt;br /&gt;
====Automatic====&lt;br /&gt;
If you just want a sequential number of channels starting from channel 1, specify the number of channels to acquire as a negative number.  Example:&lt;br /&gt;
    SourceCh = 32;&lt;br /&gt;
    AnalogCh = -32;&lt;br /&gt;
This parameterization acquires channels 1-32.  NOTE: 0 is interpreted as -144 which means every channel is acquired.&lt;br /&gt;
===SignalFilter===&lt;br /&gt;
The following filters can be applied to *DESTRUCTIVELY* filter the data on the NSP before it is passed to BCI2000.&lt;br /&gt;
*0 -- No Filter&lt;br /&gt;
*1 -- HP 750Hz&lt;br /&gt;
*2 -- HP 250Hz&lt;br /&gt;
*3 -- HP 100Hz&lt;br /&gt;
*4 -- LP 50Hz&lt;br /&gt;
*5 -- LP 125Hz&lt;br /&gt;
*6 -- LP 250Hz&lt;br /&gt;
*7 -- LP 500Hz&lt;br /&gt;
*8 -- LP 150Hz&lt;br /&gt;
*9 -- BP 10Hz-250Hz&lt;br /&gt;
*10 -- LP 2.5kHz&lt;br /&gt;
*11 -- LP 2kHz&lt;br /&gt;
*12 -- BP 250Hz-5kHz&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Any number of samples is valid here: even 1.  You may want to not do that, however.  Clocking the system above 20-30 Hz [http://www.youtube.com/watch?v=2FM3Em7FIOc is a bad choice].&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
Only the following sample rates are supported.&lt;br /&gt;
    500&lt;br /&gt;
    1000&lt;br /&gt;
    2000&lt;br /&gt;
    10000&lt;br /&gt;
    30000&lt;br /&gt;
==Future Work==&lt;br /&gt;
*Digital Input as States&lt;br /&gt;
*Digital Output&lt;br /&gt;
*Serial Input&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7150</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7150"/>
		<updated>2013-01-30T16:46:58Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Finalized v1.0 Documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the CereLink &amp;quot;cbsdk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 4365&lt;br /&gt;
*Known to compile under: 4365&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from the Blackrock NSP through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
Building the Blackrock module should copy .bat files for standard experiments into the batch directory, in addition to a parameter fragment for the amplifier, placed in parms/fragments/amplifiers.&lt;br /&gt;
&lt;br /&gt;
Ensure your machine is connected to a switch or router that the NSP is also connected to.  This module communicates to the NSP using UDP, and is susceptable to packet loss.  In the event of a lost packet, the module will crash (this is rare with a good switch).  Ensure you have a commercial grade switch to avoid dropping packets.  You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.&lt;br /&gt;
&lt;br /&gt;
You will also need to change your interface&#039;s network configuration ([http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ Windows]):&lt;br /&gt;
IP address: 192.168.137.XXX where XXX is less than 128.  Ensure no other computers have this same address on this switch.&lt;br /&gt;
Subnet Mask: 255.255.255.0&lt;br /&gt;
Default Gateway: &amp;lt;Blank&amp;gt;&lt;br /&gt;
To test your network configuration, open a terminal or command prompt and type &#039;&#039;&#039;ping 192.168.137.128&#039;&#039;&#039;. This is the NSP&#039;s default network address.  If you can ping the NSP, you should be able to run the module.&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
This should work out of the box with standard parameters.  &lt;br /&gt;
====Linux====&lt;br /&gt;
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions.  NSP 6.03 and previous opens port 1002 and 1001 to communicate packets.  This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems.  NSP Firmware 6.04+ uses higher port numbers to avoid this problem.  If you&#039;re running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges.  One way to accomplish this is to comment out the &amp;quot;Start Blackrock&amp;quot; line in your batch file, and launch the Blackrock module from a separate terminal with &amp;quot;sudo ./Blackrock&amp;quot;, executed from the bci2000/prog directory.  &lt;br /&gt;
&lt;br /&gt;
You may also receive an error complaining about the size of your network buffer size:&lt;br /&gt;
    Socket memory assignment error&lt;br /&gt;
    Consider using sysctl -w net.core.rmem_max=8388608&lt;br /&gt;
    or sysctl -w kern.ipc.maxsockbuf=8388608&lt;br /&gt;
&lt;br /&gt;
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges.  You will need to do this once every time the computer reboots.  There may be a way to do this on boot using some config file somewhere.  If you have any ideas, edit this section.  net.core.rmem_max is the proper key to use for Fedora 17.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SourceCh===&lt;br /&gt;
The Blackrock module supports a maximum of 144 analog channels.  The first 128 of these channels are the analog EEG channels, and the following 16 are the analog input channels on the NSP itself.&lt;br /&gt;
===AnalogCh===&lt;br /&gt;
This parameter specifies what channels to acquire from the NSP.  Again, the first 128 of these channels are the analog EEG channels, and the following 16 are analog input channels on the NSP itself.  You can specify this parameter in two ways.&lt;br /&gt;
====Manual====&lt;br /&gt;
Specify a vector of 144 &#039;0&#039;s and &#039;1&#039;s; where there are &#039;&#039;SourceCh&#039;&#039; &#039;1&#039;s.  Example:&lt;br /&gt;
    SourceCh = 16;&lt;br /&gt;
    AnalogCh = 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;br /&gt;
This parameterization acquires channels 4, 8, 9, 10, 17, 18, 19, 23, 29, 33, 37, 39, 44, 50, AINP1, and AINP2&lt;br /&gt;
====Automatic====&lt;br /&gt;
If you just want a sequential number of channels starting from channel 1, specify the number of channels to acquire as a negative number.  Example:&lt;br /&gt;
    SourceCh = 32;&lt;br /&gt;
    AnalogCh = -32;&lt;br /&gt;
This parameterization acquires channels 1-32.  NOTE: 0 is interpreted as -144 which means every channel is acquired.&lt;br /&gt;
===SignalFilter===&lt;br /&gt;
The following filters can be applied to *DESTRUCTIVELY* filter the data on the NSP before it is passed to BCI2000.&lt;br /&gt;
*0 -- No Filter&lt;br /&gt;
*1 -- HP 750Hz&lt;br /&gt;
*2 -- HP 250Hz&lt;br /&gt;
*3 -- HP 100Hz&lt;br /&gt;
*4 -- LP 50Hz&lt;br /&gt;
*5 -- LP 125Hz&lt;br /&gt;
*6 -- LP 250Hz&lt;br /&gt;
*7 -- LP 500Hz&lt;br /&gt;
*8 -- LP 150Hz&lt;br /&gt;
*9 -- BP 10Hz-250Hz&lt;br /&gt;
*10 -- LP 2.5kHz&lt;br /&gt;
*11 -- LP 2kHz&lt;br /&gt;
*12 -- BP 250Hz-5kHz&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
Any number of samples is valid here: even 1.  You may want to not do that, however.  Clocking the system above 20-30 Hz [http://www.youtube.com/watch?v=2FM3Em7FIOc is a bad choice].&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
Only the following sample rates are supported.&lt;br /&gt;
    500&lt;br /&gt;
    1000&lt;br /&gt;
    2000&lt;br /&gt;
    10000&lt;br /&gt;
    30000&lt;br /&gt;
==Future Work==&lt;br /&gt;
*Digital Input as States&lt;br /&gt;
*Digital Output&lt;br /&gt;
*Serial Input&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7147</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7147"/>
		<updated>2013-01-29T20:07:08Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: More information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the CereLink &amp;quot;cbsdk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 4365&lt;br /&gt;
*Known to compile under: 4365&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from the Blackrock NSP through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
Building the Blackrock module should copy .bat files for standard experiments into the batch directory, in addition to a parameter fragment for the amplifier, placed in parms/fragments/amplifiers.&lt;br /&gt;
&lt;br /&gt;
Ensure your machine is connected to a switch or router that the NSP is also connected to.  This module communicates to the NSP using UDP, and is susceptable to packet loss.  In the event of a lost packet, the module will crash (this is rare with a good switch).  Ensure you have a commercial grade switch to avoid dropping packets.  You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.&lt;br /&gt;
&lt;br /&gt;
You will also need to change your interface&#039;s network configuration ([http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ Windows]):&lt;br /&gt;
IP address: 192.168.137.XXX where XXX is less than 128.  Ensure no other computers have this same address on this switch.&lt;br /&gt;
Subnet Mask: 255.255.255.0&lt;br /&gt;
Default Gateway: &amp;lt;Blank&amp;gt;&lt;br /&gt;
To test your network configuration, open a terminal or command prompt and type &#039;&#039;&#039;ping 192.168.137.128&#039;&#039;&#039;. This is the NSP&#039;s default network address.  If you can ping the NSP, you should be able to run the module.&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
This should work out of the box with standard parameters.  &lt;br /&gt;
====Linux====&lt;br /&gt;
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions.  NSP 6.03 and previous opens port 1002 and 1001 to communicate packets.  This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems.  NSP Firmware 6.04+ uses higher port numbers to avoid this problem.  If you&#039;re running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges.  One way to accomplish this is to comment out the &amp;quot;Start Blackrock&amp;quot; line in your batch file, and launch the Blackrock module from a separate terminal with &amp;quot;sudo ./Blackrock&amp;quot;, executed from the bci2000/prog directory.  &lt;br /&gt;
&lt;br /&gt;
You may also receive an error complaining about the size of your network buffer size:&lt;br /&gt;
    Socket memory assignment error&lt;br /&gt;
    Consider using sysctl -w net.core.rmem_max=8388608&lt;br /&gt;
    or sysctl -w kern.ipc.maxsockbuf=8388608&lt;br /&gt;
&lt;br /&gt;
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges.  You will need to do this once every time the computer reboots.  There may be a way to do this on boot using some config file somewhere.  If you have any ideas, edit this section.  net.core.rmem_max is the proper key to use for Fedora 17.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SourceCh===&lt;br /&gt;
&amp;quot;Source:Signal%20Properties int SourceCh= 144 // number of digitized and stored channels&lt;br /&gt;
===AnalogCh===&lt;br /&gt;
&amp;quot;Source:Signal%20Properties intlist AnalogCh= 0 // Analog channels to acquire from Blackrock&lt;br /&gt;
===SignalFilter===&lt;br /&gt;
&amp;quot;Source:Signal%20Properties int SignalFilter= 0  // Filter to apply to data:&lt;br /&gt;
*0 -- No Filter&lt;br /&gt;
*1 -- HP 750Hz&lt;br /&gt;
*2 -- HP 250Hz&lt;br /&gt;
*3 -- HP 100Hz&lt;br /&gt;
*4 -- LP 50Hz&lt;br /&gt;
*5 -- LP 125Hz&lt;br /&gt;
*6 -- LP 250Hz&lt;br /&gt;
*7 -- LP 500Hz&lt;br /&gt;
*8 -- LP 150Hz&lt;br /&gt;
*9 -- BP 10Hz-250Hz&lt;br /&gt;
*10 -- LP 2.5kHz&lt;br /&gt;
*11 -- LP 2kHz&lt;br /&gt;
*12 -- BP 250Hz-5kHz&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
1000 // number of samples transmitted at a time&amp;quot;,&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
30000Hz&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7146</id>
		<title>Contributions:Blackrock</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Blackrock&amp;diff=7146"/>
		<updated>2013-01-25T19:55:26Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Documentation Template (WIP)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the CereLink &amp;quot;cbsdk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/Blackrock&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Author===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
*V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4365&lt;br /&gt;
*Tested under: 4365&lt;br /&gt;
*Known to compile under: 4365&lt;br /&gt;
*Broken since: N/A&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
The Blackrock source module is used for acquiring recordings from the Blackrock NSP through CereLink (https://github.com/dashesy/CereLink).  It also happens to be one of the first BCI2000 SignalSource modules to function under Linux.  This documentation explains the parameterization and specifics on how to set up the system.&lt;br /&gt;
&lt;br /&gt;
===Compilation===&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section. &lt;br /&gt;
===SourceCh===&lt;br /&gt;
&amp;quot;Source:Signal%20Properties int SourceCh= 144 // number of digitized and stored channels&lt;br /&gt;
===AnalogCh===&lt;br /&gt;
&amp;quot;Source:Signal%20Properties intlist AnalogCh= 0 // Analog channels to acquire from Blackrock&lt;br /&gt;
===SignalFilter===&lt;br /&gt;
&amp;quot;Source:Signal%20Properties int SignalFilter= 0  // Filter to apply to data:&lt;br /&gt;
*0 -- No Filter&lt;br /&gt;
*1 -- HP 750Hz&lt;br /&gt;
*2 -- HP 250Hz&lt;br /&gt;
*3 -- HP 100Hz&lt;br /&gt;
*4 -- LP 50Hz&lt;br /&gt;
*5 -- LP 125Hz&lt;br /&gt;
*6 -- LP 250Hz&lt;br /&gt;
*7 -- LP 500Hz&lt;br /&gt;
*8 -- LP 150Hz&lt;br /&gt;
*9 -- BP 10Hz-250Hz&lt;br /&gt;
*10 -- LP 2.5kHz&lt;br /&gt;
*11 -- LP 2kHz&lt;br /&gt;
*12 -- BP 250Hz-5kHz&lt;br /&gt;
===SampleBlockSize===&lt;br /&gt;
1000 // number of samples transmitted at a time&amp;quot;,&lt;br /&gt;
===SamplingRate===&lt;br /&gt;
30000Hz&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:ADCs&amp;diff=7145</id>
		<title>Contributions:ADCs</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:ADCs&amp;diff=7145"/>
		<updated>2013-01-25T19:39:54Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added a link to new documentation page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following data acquisition filters are available in the [[Contributions:Contents|Contributions]] section of BCI2000:&lt;br /&gt;
&lt;br /&gt;
*[[Contributions:AmpServerProADC]]: Interface to the EGI AmpServerPro.&lt;br /&gt;
*[[Contributions:BioRadioADC]]: Interface to the BioRadio amplifer.&lt;br /&gt;
*[[Contributions:Biosemi2ADC]]: Interface to the Biosemi amplifier.&lt;br /&gt;
*[[Contributions:Blackrock]]: Interface Blackrock devices through CereLink.&lt;br /&gt;
*[[Contributions:B-Alert]]: Interface to B-Alert brain monitoring systems.&lt;br /&gt;
*[[Contributions:DAS_ADC]]: Interface to MeasurementComputing AD cards.&lt;br /&gt;
*[[Contributions:DTADC]]: Interface to Data Translation boards.&lt;br /&gt;
*[[Contributions:Emotiv]]: Interface to the Emotiv EPOC.&lt;br /&gt;
*[[Contributions:FieldTripBufferSource]]: Interface to the FieldTrip buffer.&lt;br /&gt;
*[[Contributions:FilePlayback]]: A source module that replays sessions from recorded data files.&lt;br /&gt;
*[[Contributions:gHIamp]]: Interface to the gHIamp.&lt;br /&gt;
*[[Contributions:MicromedADC]]: Interface to the Micromed EEG system.&lt;br /&gt;
*[[Contributions:ModularEEG]]: Interface to the ModularEEG system.&lt;br /&gt;
*[[Contributions:Neuralynx]]: Interface to Neuralynx systems&lt;br /&gt;
*[[Contributions:NIADC]]: Interface to National Instruments boards.&lt;br /&gt;
*[[Contributions:NIDAQ-MX]]: Interface to National Instruments boards using the MX driver.&lt;br /&gt;
*[[Contributions:NIDAQLogger]]: Interface to multiple National Instruments DAQ boards using MX driver (INPUT ONLY).&lt;br /&gt;
*[[Contributions:NIDAQFilter]]: Interface to multiple National Instruments DAQ boards using MX driver (OUTPUT ONLY).&lt;br /&gt;
*[[Contributions:NeuroscanADC]]: Neuroscan Acquire socket protocol client.&lt;br /&gt;
*[[Contributions:NeuroscanAccessSDK]]: Interface to Neuroscan Direct Access SDK.&lt;br /&gt;
*[[Contributions:NeuroSky]]: Interface to Neurosky MindSet.&lt;br /&gt;
*[[Contributions:NicoletOne]]: Interface to NicoletOne nEEG series amplifiers.&lt;br /&gt;
*[[Contributions:ctfneurod]]: CTF RealTime to Neuroscan Acquire relay.&lt;br /&gt;
*[[Contributions:RDAClientADC]]: Brain Vision RDA socket protocol client.&lt;br /&gt;
*[[Contributions:TDTADC]]: Interface to Tucker-Davis Pentusa systems.&lt;br /&gt;
*[[Contributions:TMSiADC]]: Interface to TMSi Refa and Porti systems.&lt;br /&gt;
*[[Contributions:vAmpADC]]: Interface to Brain Products V-amp systems.&lt;br /&gt;
*[[Contributions:EnobioADC]]: Interface to Enobio sensor.&lt;br /&gt;
*[[Contributions:MicRecorderFilter]]: Interface to the system soundcard, logging audio input.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:How to use a Contributed Source Module]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6921</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6921"/>
		<updated>2012-06-13T14:52:33Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
* 2012/06/11: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module in halted state exhibits some sort of bug regarding state logging.  When running state is resumed, envelope states may fail to update for 15-30 seconds. The bug seems to be unrelated to how long system was halted -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.  This bug will never happen on the first run after BCI2000 is started up.  If you do see the behavior, either wait for it to go away or restart BCI2000 and perform a new recording.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function correctly.&lt;br /&gt;
* AudioExtension processes audio in a separate thread and the internal audio callback is called from yet-another context (Sometimes a system interrupt).  In order to prevent deadlock, the Audio callback must not lock or wait for external threads.  As such, it will simply copy the last good audio buffer to the output stream if the audio thread has not posted new data to use yet.  This can result in slowed &amp;quot;timestretching&amp;quot; effects on audio input files if the audio thread cannot keep up with the audio callbacks.  To prevent this behavior, ensure your audio block size is large enough (at least 1024 frames).  If you are using a lower latency audio API (such as ASIO) you are probably okay to use audio block sizes around 512 frames.  Either way, be mindful that audio playback may not necessarily operate in real-time and you will receive NO WARNING WHATSOEVER when it fails to.&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument (NB, as explained below, the numeric value here matters, and denotes the audio API to be used:  =1 means DirectSound).&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter [[Contributions:AudioExtension#Known_Issues|*See Known Issues*]]&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6905</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6905"/>
		<updated>2012-06-12T18:16:24Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Removed irrelevant documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
* 06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function correctly.&lt;br /&gt;
* AudioExtension processes audio in a separate thread and the internal audio callback is called from yet-another context (Sometimes a system interrupt).  In order to prevent deadlock, the Audio callback must not lock or wait for external threads.  As such, it will simply copy the last good audio buffer to the output stream if the audio thread has not posted new data to use yet.  This can result in slowed &amp;quot;timestretching&amp;quot; effects on audio input files if the audio thread cannot keep up with the audio callbacks.  To prevent this behavior, ensure your audio block size is large enough (at least 1024 frames).  If you are using a lower latency audio API (such as ASIO) you are probably okay to use audio block sizes around 512 frames.  Either way, be mindful that audio playback may not necessarily operate in real-time and you will receive NO WARNING WHATSOEVER when it fails to.&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter [[Contributions:AudioExtension#Known_Issues|*See Known Issues*]]&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:AudioExtensionBlockDiagram.png&amp;diff=6904</id>
		<title>File:AudioExtensionBlockDiagram.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:AudioExtensionBlockDiagram.png&amp;diff=6904"/>
		<updated>2012-06-11T21:20:53Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual description of data flow within [[Contributions:AudioExtension]]&lt;br /&gt;
&lt;br /&gt;
Source file is here. https://docs.google.com/drawings/d/1Qc7abVU7jVMK02mGVuSXOlF4wBEmRsSI1tBggdNVO7w/edit&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6903</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6903"/>
		<updated>2012-06-11T21:10:13Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Version History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
* 06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function correctly.&lt;br /&gt;
* AudioExtension processes audio in a separate thread and the internal audio callback is called from yet-another context (Sometimes a system interrupt).  In order to prevent deadlock, the Audio callback must not lock or wait for external threads.  As such, it will simply copy the last good audio buffer to the output stream if the audio thread has not posted new data to use yet.  This can result in slowed &amp;quot;timestretching&amp;quot; effects on audio input files if the audio thread cannot keep up with the audio callbacks.  To prevent this behavior, ensure your audio block size is large enough (at least 1024 frames).  If you are using a lower latency audio API (such as ASIO) you are probably okay to use audio block sizes around 512 frames.  Either way, be mindful that audio playback may not necessarily operate in real-time and you will receive NO WARNING WHATSOEVER when it fails to.&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter [[Contributions:AudioExtension#Known_Issues|*See Known Issues*]]&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6902</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6902"/>
		<updated>2012-06-11T21:09:21Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function correctly.&lt;br /&gt;
* AudioExtension processes audio in a separate thread and the internal audio callback is called from yet-another context (Sometimes a system interrupt).  In order to prevent deadlock, the Audio callback must not lock or wait for external threads.  As such, it will simply copy the last good audio buffer to the output stream if the audio thread has not posted new data to use yet.  This can result in slowed &amp;quot;timestretching&amp;quot; effects on audio input files if the audio thread cannot keep up with the audio callbacks.  To prevent this behavior, ensure your audio block size is large enough (at least 1024 frames).  If you are using a lower latency audio API (such as ASIO) you are probably okay to use audio block sizes around 512 frames.  Either way, be mindful that audio playback may not necessarily operate in real-time and you will receive NO WARNING WHATSOEVER when it fails to.&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter [[Contributions:AudioExtension#Known_Issues|*See Known Issues*]]&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6901</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6901"/>
		<updated>2012-06-11T21:02:55Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter [[Contributions:AudioExtension#Known_Issues|*See Known Issues*]]&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6900</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6900"/>
		<updated>2012-06-11T21:02:27Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter [[Contributions:AudioExtension#Versioning|*See Known Issues*]]&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6899</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6899"/>
		<updated>2012-06-11T21:01:55Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Linked Known Issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter [[Contributions:AudioExtension#KnownIssues|*See Known Issues*]]&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6898</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6898"/>
		<updated>2012-06-11T21:00:16Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Documented State Variables for AudioExtension&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter *See known issues*&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
The AudioExtension outputs the following state variables:&lt;br /&gt;
&lt;br /&gt;
===Audio[In/Out]Envelope[0-3]===&lt;br /&gt;
These are the envelope values of each channel (up to channel 4) of the audio inputs and outputs (in the AudioMixer matrix).  These 16 bit unsigned values correspond to the resulting envelope after the audio envelope extraction.  For architectural reasons, it is not possible to publish states after system startup, so you are limited to four channels of input and output.  The AudioExtension can be easily modified to change the number of channels by editing the &amp;lt;code&amp;gt;#define NUM_INPUT_ENVELOPES 4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#define NUM_OUTPUT_ENVELOPES&amp;lt;/code&amp;gt; lines in AudioExtension.cpp, and recompiling your source module.&lt;br /&gt;
&lt;br /&gt;
===AudioFrame===&lt;br /&gt;
This 32 bit unsigned number corresponds to the current frame of audio data in the recorded output files.  This can be used to resynchronize the lossless audio to the resulting .dat file offline.  Audio is sampled internally at 44100 Hz, so this number will roll over once every 27 hours or so.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6897</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6897"/>
		<updated>2012-06-11T20:50:26Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added AudioExtension Parameters to documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The AudioExtension is configured in the Source tab within the AudioExtension section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;EnableAudioExtension&amp;lt;/code&amp;gt;   - Enables/Disables the AudioExtension.  This parameter performs double-duty as an audio host API selector.  The following values of this parameter are valid.  NOTE: Not all audio APIs are available on all platforms.&lt;br /&gt;
**[0] - Disabled&lt;br /&gt;
**[1] - DirectSound&lt;br /&gt;
**[2] - MME&lt;br /&gt;
**[3] - ASIO&lt;br /&gt;
**[4] - SoundManager&lt;br /&gt;
**[5] - CoreAudio&lt;br /&gt;
**[6] - Disabled&lt;br /&gt;
**[7] - OSS&lt;br /&gt;
**[8] - ALSA&lt;br /&gt;
**[9] - AL&lt;br /&gt;
**[10] - BeOs&lt;br /&gt;
**[11] - WDMKS&lt;br /&gt;
**[12] - JACK&lt;br /&gt;
**[13] - WASAPI&lt;br /&gt;
**[14] - AudioScienceHPI&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioMixer&amp;lt;/code&amp;gt; - This matrix of expressions mixes input (rows) to output(columns).  It must be dimensioned with exactly &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; columns where &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is the number of outputs.  Row labels define the input source.  Change row labels by double clicking on the row.  The following inputs are valid row labels.&lt;br /&gt;
**&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; - This is automatically interpreted as INPUT[X]&lt;br /&gt;
**&amp;lt;code&amp;gt;INPUT[X]&amp;lt;/code&amp;gt; - This input will come from channel X on the sound card input.&lt;br /&gt;
**&amp;lt;code&amp;gt;FILE[X]&amp;lt;/code&amp;gt; - This input will come from channel X in the AudioInputFile.&lt;br /&gt;
**&amp;lt;code&amp;gt;TONE[X]&amp;lt;/code&amp;gt; - This input will be a synthesized sine wave with the frequency of X Hz.&lt;br /&gt;
**&amp;lt;code&amp;gt;NOISE[X]&amp;lt;/code&amp;gt; - This input will be generated white noise at X Hz.  NOTE: NOISE[] is white noise at the audio sampling rate (which defaults to 44100)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default input device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioOutputDevice&amp;lt;/code&amp;gt;  - The index for the device to use as the audio input device on the current Host API.  See the operator log after &amp;quot;Set Config&amp;quot; for valid device indices on the selected host API.  A value of -1 for this parameter selects the default output device on this host API.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioInputFile&amp;lt;/code&amp;gt; - Audio file to use as audio input to AudioMixer.  The selected file can have any non-zero number of channels and be encoded in almost any format (except MP3), but MUST be encoded at 44100 Hz.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordInput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordOutput&amp;lt;/code&amp;gt; - Enables/Disables recording of audio data to a file in the DataDirectory.&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioRecordingFormat&amp;lt;/code&amp;gt; - Changes the file format and encoding options of the recorded output files.  This parameter has the following three options:&lt;br /&gt;
**Raw - Records to 16 bit Microsoft formatted WAV files with no compression.  These files open directly in MATLAB if that&#039;s interesting to you.&lt;br /&gt;
**Lossless - Records to FLAC formatted files.  These files are slightly smaller than RAW files, but have no quality loss.&lt;br /&gt;
**Lossy - Records to Ogg Vorbis files.  These files are similar to MP3 but do not have the associated licensing issues.  They are compressed using a lossy algorithm, so the resulting files are very small but sound slightly worse than lossless encoding.  This format is good for long recordings where perfect quality is not necessary.&lt;br /&gt;
*&amp;lt;code&amp;gt;Audio[Input/Output]Filterbank&amp;lt;/code&amp;gt; - A filterbank which filters audio input and output before rectification/smoothing for envelope extraction.  These butterworth filters will not be applied to the audible signal.  The format of the filter bank is as follows:&lt;br /&gt;
**Type - The characteristic of the filter.  The following values are valid.&lt;br /&gt;
***Lowpass - Creates a low pass filter&lt;br /&gt;
***Highpass - Creates a high pass filter&lt;br /&gt;
***Bandpass - Creates a band pass filter *See known issues*&lt;br /&gt;
***Bandstop - Creates a band stop, or notch filter&lt;br /&gt;
**Order - The order of the filter model.  Higher order filters are more accurate but more expensive computationally.&lt;br /&gt;
**Cutoff1 - The cutoff frequency for Lowpass and Highpass filters, and the cut-on frequency for Bandpass and Bandstop filters.&lt;br /&gt;
**Cutoff2 - The cut-off frequency for Bandpass and Bandstop filters.&lt;br /&gt;
The matrix can have as many rows as necessary to filter the signal.  Filters can be applied in any order and their transfer functions are multiplied before filtering occurs.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;AudioEnvelopeSmoothing&amp;lt;/code&amp;gt; - The cutoff frequency for the low pass filter which is applied to the filtered and full-wave rectified audio data.  This should be set to the highest frequency you want to see in the resulting audio envelope.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
Unless otherwise specified, all states are prefixed with &amp;lt;code&amp;gt;Eyetracker&amp;lt;Left/Right&amp;gt;Eye&amp;lt;/code&amp;gt; which corresponds with each individual eye.  The EyetrackerLogger extension does not support subjects with more than two eyes at the moment.&lt;br /&gt;
&lt;br /&gt;
===GazeX, GazeY===&lt;br /&gt;
The eye gaze position (where - on the screen - the subject is looking) is returned from the Tobii SDK as 32 bit floating point numbers which (roughly) range from 0.0 to 1.0.  They are multiplied by 65535 and stored as 16 bit integers in these states if the &amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; parameter is enabled.  (0,0) corresponds to the top left of the screen, (65535,65535) corresponds to the right bottom of the screen. -- See [[Contributions:EyetrackerLogger#EyetrackerStatesOK|EyetrackerStatesOK]].&lt;br /&gt;
&lt;br /&gt;
===PosX, PosY===&lt;br /&gt;
The eye position relative to the camera in 2D space is returned if &amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; is enabled.  Again, these are returned from the library as floating point numbers from 0.0 to 1.0 and are scaled to 16 bit integer values from 0 to 65535.  (0,0) corresponds to the top left of the camera&#039;s view, and (65535,65535) corresponds to the bottom right of the camera&#039;s view.&lt;br /&gt;
&lt;br /&gt;
===PupilSize===&lt;br /&gt;
The pupil size in mm is saved in this state if &amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; is enabled.  It corresponds to the length of the longest chord drawn from one side of the pupil to the other.  The size will change depending on the eye position and distance from the screen.  Although it is given in mm, it would be best to use this as a relative measurement.&lt;br /&gt;
&lt;br /&gt;
===EyeDist===&lt;br /&gt;
The distance between the screen and the eyes in mm is saved in this state if &amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; is enabled.  This measurement is an approximation.  The actual measurement will depend on whether or not the test subject is wearing glasses or not.&lt;br /&gt;
&lt;br /&gt;
===EyeValidity===&lt;br /&gt;
This state is a number from 0 to 4 and is documented in the Tobii SDK manual.  It is repeated here for convenience.&lt;br /&gt;
* 0 - The eye tracker is certain that the data for this eye is right.  There is no risk of confusing data from the other eye.&lt;br /&gt;
* 1 - The eye tracker has only recorded one eye and made some assumptions and estimations regarding which is the left and which is the right eye.  However, it is still very likely that the assumption made is correct.  The validity code for the other eye is in this case always set to 3.&lt;br /&gt;
* 2 - The eye tracker has only recorded one eye, and has no way of determining which one is the left eye and which one is the right eye.  The validity code for both eyes is set to 2.&lt;br /&gt;
* 3 - The eye tracker is fairly confident that the actual gaze data belongs to the other eye.  The other eye will always have validity code 1.&lt;br /&gt;
* 4 - The actual gaze data is missing or definitely belonging to the other eye.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code (Right - Left)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 0&lt;br /&gt;
| Both eyes found.  Data is valid for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 4 or 4 - 0&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 - 3 or 3 - 1&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 2 - 2&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 4 - 4&lt;br /&gt;
| No eye found.  Gaze data for both eyes are invalid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It&#039;d probably be wise to remove all data points with a validity state of 2 or higher while running your analysis.&lt;br /&gt;
&lt;br /&gt;
===EyetrackerStatesOK===&lt;br /&gt;
Early versions of the extension didn&#039;t take into account that the library may return a number greater than 1.0 or less than 0.0.  This resulted in &amp;quot;pac-man&amp;quot; style wrap around of gaze coordinates in 2.0 and crashes in 3.0.  If the output from the library is out of bounds, it is clamped to the boundaries and the &amp;quot;EyetrackerStatesOK&amp;quot; parameter is changed.  A value of &amp;quot;1&amp;quot; corresponds to valid gaze data, a value of &amp;quot;0&amp;quot; corresponds to invalid &amp;quot;clamped&amp;quot; gaze data.  Use the &amp;quot;GazeOffset&amp;quot; and &amp;quot;GazeScale&amp;quot; parameters to avoid clamping.  Those parameters scale and offset the data so that when it does go out of range, it can still be fit into the 16 bit state.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6896</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6896"/>
		<updated>2012-06-11T19:26:06Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[Image:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The eyetracker is configured in the Source tab within the EyetrackerLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyetracker&amp;lt;/code&amp;gt;   - Enables/Disables logging of Eyetracker states&lt;br /&gt;
*&amp;lt;code&amp;gt;NetworkLocation&amp;lt;/code&amp;gt; - The network address of the Eyetracker given by the Tobii Eyetracker Browser&lt;br /&gt;
*&amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt;  - The port that the Tobii communicates over - Tobii default is 4455&lt;br /&gt;
*&amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; - Enables/Disables logging of gaze data&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; - Enables/Disables logging of eye position (as seen from the camera)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; - Enables/Disables logging of pupil size (very rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeScale&amp;lt;/code&amp;gt; - Scales the incoming gaze data first&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeOffset&amp;lt;/code&amp;gt; - Offsets the incoming gaze data after scaling&lt;br /&gt;
&lt;br /&gt;
Note: GazeScale and GazeOffset are quick hacks to address an issue with gaze data being clamped around the edges of the screen.  The eyetracker gives back values which are between 0.0 and 1.0 for onscreen gaze but supports looking slightly offscreen by allowing gaze data returned to go above 1.0 and below 0.0.  BCI2000 needs this scaled between 0.0 and 1.0 before the gaze data is multiplied by 65535 for storage in the 16 bit state.  These two parameters account for this scaling and offset and prevents the clamping from happening as often as it would otherwise.  These parameters will be removed once BCI2000 supports typed states.&lt;br /&gt;
&lt;br /&gt;
The following code retreives the actual ~(0.0-1.0) range that the eyetracker outputs directly (assuming you&#039;ve scaled and offset the signal to avoid clipping) from each eye and averages it to find a gaze position.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
float x = State( &amp;quot;EyetrackerLeftEyeGazeX&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeX&amp;quot; ); x /= ( 2.0f * 65535.0f );&lt;br /&gt;
float y = State( &amp;quot;EyetrackerLeftEyeGazeY&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeY&amp;quot; ); y /= ( 2.0f * 65535.0f );&lt;br /&gt;
x -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); x /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
y -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); y /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
Unless otherwise specified, all states are prefixed with &amp;lt;code&amp;gt;Eyetracker&amp;lt;Left/Right&amp;gt;Eye&amp;lt;/code&amp;gt; which corresponds with each individual eye.  The EyetrackerLogger extension does not support subjects with more than two eyes at the moment.&lt;br /&gt;
&lt;br /&gt;
===GazeX, GazeY===&lt;br /&gt;
The eye gaze position (where - on the screen - the subject is looking) is returned from the Tobii SDK as 32 bit floating point numbers which (roughly) range from 0.0 to 1.0.  They are multiplied by 65535 and stored as 16 bit integers in these states if the &amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; parameter is enabled.  (0,0) corresponds to the top left of the screen, (65535,65535) corresponds to the right bottom of the screen. -- See [[Contributions:EyetrackerLogger#EyetrackerStatesOK|EyetrackerStatesOK]].&lt;br /&gt;
&lt;br /&gt;
===PosX, PosY===&lt;br /&gt;
The eye position relative to the camera in 2D space is returned if &amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; is enabled.  Again, these are returned from the library as floating point numbers from 0.0 to 1.0 and are scaled to 16 bit integer values from 0 to 65535.  (0,0) corresponds to the top left of the camera&#039;s view, and (65535,65535) corresponds to the bottom right of the camera&#039;s view.&lt;br /&gt;
&lt;br /&gt;
===PupilSize===&lt;br /&gt;
The pupil size in mm is saved in this state if &amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; is enabled.  It corresponds to the length of the longest chord drawn from one side of the pupil to the other.  The size will change depending on the eye position and distance from the screen.  Although it is given in mm, it would be best to use this as a relative measurement.&lt;br /&gt;
&lt;br /&gt;
===EyeDist===&lt;br /&gt;
The distance between the screen and the eyes in mm is saved in this state if &amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; is enabled.  This measurement is an approximation.  The actual measurement will depend on whether or not the test subject is wearing glasses or not.&lt;br /&gt;
&lt;br /&gt;
===EyeValidity===&lt;br /&gt;
This state is a number from 0 to 4 and is documented in the Tobii SDK manual.  It is repeated here for convenience.&lt;br /&gt;
* 0 - The eye tracker is certain that the data for this eye is right.  There is no risk of confusing data from the other eye.&lt;br /&gt;
* 1 - The eye tracker has only recorded one eye and made some assumptions and estimations regarding which is the left and which is the right eye.  However, it is still very likely that the assumption made is correct.  The validity code for the other eye is in this case always set to 3.&lt;br /&gt;
* 2 - The eye tracker has only recorded one eye, and has no way of determining which one is the left eye and which one is the right eye.  The validity code for both eyes is set to 2.&lt;br /&gt;
* 3 - The eye tracker is fairly confident that the actual gaze data belongs to the other eye.  The other eye will always have validity code 1.&lt;br /&gt;
* 4 - The actual gaze data is missing or definitely belonging to the other eye.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code (Right - Left)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 0&lt;br /&gt;
| Both eyes found.  Data is valid for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 4 or 4 - 0&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 - 3 or 3 - 1&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 2 - 2&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 4 - 4&lt;br /&gt;
| No eye found.  Gaze data for both eyes are invalid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It&#039;d probably be wise to remove all data points with a validity state of 2 or higher while running your analysis.&lt;br /&gt;
&lt;br /&gt;
===EyetrackerStatesOK===&lt;br /&gt;
Early versions of the extension didn&#039;t take into account that the library may return a number greater than 1.0 or less than 0.0.  This resulted in &amp;quot;pac-man&amp;quot; style wrap around of gaze coordinates in 2.0 and crashes in 3.0.  If the output from the library is out of bounds, it is clamped to the boundaries and the &amp;quot;EyetrackerStatesOK&amp;quot; parameter is changed.  A value of &amp;quot;1&amp;quot; corresponds to valid gaze data, a value of &amp;quot;0&amp;quot; corresponds to invalid &amp;quot;clamped&amp;quot; gaze data.  Use the &amp;quot;GazeOffset&amp;quot; and &amp;quot;GazeScale&amp;quot; parameters to avoid clamping.  Those parameters scale and offset the data so that when it does go out of range, it can still be fit into the 16 bit state.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=File:AudioExtensionBlockDiagram.png&amp;diff=6895</id>
		<title>File:AudioExtensionBlockDiagram.png</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=File:AudioExtensionBlockDiagram.png&amp;diff=6895"/>
		<updated>2012-06-11T19:25:42Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Visual description of data flow within Contributions:AudioExtension&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual description of data flow within [[Contributions:AudioExtension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6894</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6894"/>
		<updated>2012-06-11T19:23:58Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:AudioExtensionBlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The eyetracker is configured in the Source tab within the EyetrackerLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyetracker&amp;lt;/code&amp;gt;   - Enables/Disables logging of Eyetracker states&lt;br /&gt;
*&amp;lt;code&amp;gt;NetworkLocation&amp;lt;/code&amp;gt; - The network address of the Eyetracker given by the Tobii Eyetracker Browser&lt;br /&gt;
*&amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt;  - The port that the Tobii communicates over - Tobii default is 4455&lt;br /&gt;
*&amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; - Enables/Disables logging of gaze data&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; - Enables/Disables logging of eye position (as seen from the camera)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; - Enables/Disables logging of pupil size (very rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeScale&amp;lt;/code&amp;gt; - Scales the incoming gaze data first&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeOffset&amp;lt;/code&amp;gt; - Offsets the incoming gaze data after scaling&lt;br /&gt;
&lt;br /&gt;
Note: GazeScale and GazeOffset are quick hacks to address an issue with gaze data being clamped around the edges of the screen.  The eyetracker gives back values which are between 0.0 and 1.0 for onscreen gaze but supports looking slightly offscreen by allowing gaze data returned to go above 1.0 and below 0.0.  BCI2000 needs this scaled between 0.0 and 1.0 before the gaze data is multiplied by 65535 for storage in the 16 bit state.  These two parameters account for this scaling and offset and prevents the clamping from happening as often as it would otherwise.  These parameters will be removed once BCI2000 supports typed states.&lt;br /&gt;
&lt;br /&gt;
The following code retreives the actual ~(0.0-1.0) range that the eyetracker outputs directly (assuming you&#039;ve scaled and offset the signal to avoid clipping) from each eye and averages it to find a gaze position.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
float x = State( &amp;quot;EyetrackerLeftEyeGazeX&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeX&amp;quot; ); x /= ( 2.0f * 65535.0f );&lt;br /&gt;
float y = State( &amp;quot;EyetrackerLeftEyeGazeY&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeY&amp;quot; ); y /= ( 2.0f * 65535.0f );&lt;br /&gt;
x -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); x /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
y -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); y /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
Unless otherwise specified, all states are prefixed with &amp;lt;code&amp;gt;Eyetracker&amp;lt;Left/Right&amp;gt;Eye&amp;lt;/code&amp;gt; which corresponds with each individual eye.  The EyetrackerLogger extension does not support subjects with more than two eyes at the moment.&lt;br /&gt;
&lt;br /&gt;
===GazeX, GazeY===&lt;br /&gt;
The eye gaze position (where - on the screen - the subject is looking) is returned from the Tobii SDK as 32 bit floating point numbers which (roughly) range from 0.0 to 1.0.  They are multiplied by 65535 and stored as 16 bit integers in these states if the &amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; parameter is enabled.  (0,0) corresponds to the top left of the screen, (65535,65535) corresponds to the right bottom of the screen. -- See [[Contributions:EyetrackerLogger#EyetrackerStatesOK|EyetrackerStatesOK]].&lt;br /&gt;
&lt;br /&gt;
===PosX, PosY===&lt;br /&gt;
The eye position relative to the camera in 2D space is returned if &amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; is enabled.  Again, these are returned from the library as floating point numbers from 0.0 to 1.0 and are scaled to 16 bit integer values from 0 to 65535.  (0,0) corresponds to the top left of the camera&#039;s view, and (65535,65535) corresponds to the bottom right of the camera&#039;s view.&lt;br /&gt;
&lt;br /&gt;
===PupilSize===&lt;br /&gt;
The pupil size in mm is saved in this state if &amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; is enabled.  It corresponds to the length of the longest chord drawn from one side of the pupil to the other.  The size will change depending on the eye position and distance from the screen.  Although it is given in mm, it would be best to use this as a relative measurement.&lt;br /&gt;
&lt;br /&gt;
===EyeDist===&lt;br /&gt;
The distance between the screen and the eyes in mm is saved in this state if &amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; is enabled.  This measurement is an approximation.  The actual measurement will depend on whether or not the test subject is wearing glasses or not.&lt;br /&gt;
&lt;br /&gt;
===EyeValidity===&lt;br /&gt;
This state is a number from 0 to 4 and is documented in the Tobii SDK manual.  It is repeated here for convenience.&lt;br /&gt;
* 0 - The eye tracker is certain that the data for this eye is right.  There is no risk of confusing data from the other eye.&lt;br /&gt;
* 1 - The eye tracker has only recorded one eye and made some assumptions and estimations regarding which is the left and which is the right eye.  However, it is still very likely that the assumption made is correct.  The validity code for the other eye is in this case always set to 3.&lt;br /&gt;
* 2 - The eye tracker has only recorded one eye, and has no way of determining which one is the left eye and which one is the right eye.  The validity code for both eyes is set to 2.&lt;br /&gt;
* 3 - The eye tracker is fairly confident that the actual gaze data belongs to the other eye.  The other eye will always have validity code 1.&lt;br /&gt;
* 4 - The actual gaze data is missing or definitely belonging to the other eye.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code (Right - Left)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 0&lt;br /&gt;
| Both eyes found.  Data is valid for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 4 or 4 - 0&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 - 3 or 3 - 1&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 2 - 2&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 4 - 4&lt;br /&gt;
| No eye found.  Gaze data for both eyes are invalid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It&#039;d probably be wise to remove all data points with a validity state of 2 or higher while running your analysis.&lt;br /&gt;
&lt;br /&gt;
===EyetrackerStatesOK===&lt;br /&gt;
Early versions of the extension didn&#039;t take into account that the library may return a number greater than 1.0 or less than 0.0.  This resulted in &amp;quot;pac-man&amp;quot; style wrap around of gaze coordinates in 2.0 and crashes in 3.0.  If the output from the library is out of bounds, it is clamped to the boundaries and the &amp;quot;EyetrackerStatesOK&amp;quot; parameter is changed.  A value of &amp;quot;1&amp;quot; corresponds to valid gaze data, a value of &amp;quot;0&amp;quot; corresponds to invalid &amp;quot;clamped&amp;quot; gaze data.  Use the &amp;quot;GazeOffset&amp;quot; and &amp;quot;GazeScale&amp;quot; parameters to avoid clamping.  Those parameters scale and offset the data so that when it does go out of range, it can still be fit into the 16 bit state.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6893</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6893"/>
		<updated>2012-06-11T18:18:41Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Functional Description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Fix Known Issues&lt;br /&gt;
* Add per-sample resolution to envelopes&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [[Programming_Reference:Events|bcievent]] interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Experiments which require audio input or real-time audio synthesis based on system state are now possible with the AudioExtension.  This extension is capable of recording multiple channels of audio input, synthesizing tones or noise, and reading encoded audio files.  These channels are input to a mixing matrix which mixes those inputs to multiple channels of audio output.  Both input and output are run through a simple filterbank, then they have their envelope extracted and logged into states via the bcievent interface.  Audio input and output channels can be recorded into audio files losslessly and can be resynchronized offline.  The mixing matrix is a matrix of expressions which can be used to dynamically change audio mixing based on the system state.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_AUDIOEXTENSION&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--EnableAudioExtension=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Block Diagram==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The eyetracker is configured in the Source tab within the EyetrackerLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyetracker&amp;lt;/code&amp;gt;   - Enables/Disables logging of Eyetracker states&lt;br /&gt;
*&amp;lt;code&amp;gt;NetworkLocation&amp;lt;/code&amp;gt; - The network address of the Eyetracker given by the Tobii Eyetracker Browser&lt;br /&gt;
*&amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt;  - The port that the Tobii communicates over - Tobii default is 4455&lt;br /&gt;
*&amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; - Enables/Disables logging of gaze data&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; - Enables/Disables logging of eye position (as seen from the camera)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; - Enables/Disables logging of pupil size (very rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeScale&amp;lt;/code&amp;gt; - Scales the incoming gaze data first&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeOffset&amp;lt;/code&amp;gt; - Offsets the incoming gaze data after scaling&lt;br /&gt;
&lt;br /&gt;
Note: GazeScale and GazeOffset are quick hacks to address an issue with gaze data being clamped around the edges of the screen.  The eyetracker gives back values which are between 0.0 and 1.0 for onscreen gaze but supports looking slightly offscreen by allowing gaze data returned to go above 1.0 and below 0.0.  BCI2000 needs this scaled between 0.0 and 1.0 before the gaze data is multiplied by 65535 for storage in the 16 bit state.  These two parameters account for this scaling and offset and prevents the clamping from happening as often as it would otherwise.  These parameters will be removed once BCI2000 supports typed states.&lt;br /&gt;
&lt;br /&gt;
The following code retreives the actual ~(0.0-1.0) range that the eyetracker outputs directly (assuming you&#039;ve scaled and offset the signal to avoid clipping) from each eye and averages it to find a gaze position.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
float x = State( &amp;quot;EyetrackerLeftEyeGazeX&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeX&amp;quot; ); x /= ( 2.0f * 65535.0f );&lt;br /&gt;
float y = State( &amp;quot;EyetrackerLeftEyeGazeY&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeY&amp;quot; ); y /= ( 2.0f * 65535.0f );&lt;br /&gt;
x -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); x /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
y -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); y /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
Unless otherwise specified, all states are prefixed with &amp;lt;code&amp;gt;Eyetracker&amp;lt;Left/Right&amp;gt;Eye&amp;lt;/code&amp;gt; which corresponds with each individual eye.  The EyetrackerLogger extension does not support subjects with more than two eyes at the moment.&lt;br /&gt;
&lt;br /&gt;
===GazeX, GazeY===&lt;br /&gt;
The eye gaze position (where - on the screen - the subject is looking) is returned from the Tobii SDK as 32 bit floating point numbers which (roughly) range from 0.0 to 1.0.  They are multiplied by 65535 and stored as 16 bit integers in these states if the &amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; parameter is enabled.  (0,0) corresponds to the top left of the screen, (65535,65535) corresponds to the right bottom of the screen. -- See [[Contributions:EyetrackerLogger#EyetrackerStatesOK|EyetrackerStatesOK]].&lt;br /&gt;
&lt;br /&gt;
===PosX, PosY===&lt;br /&gt;
The eye position relative to the camera in 2D space is returned if &amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; is enabled.  Again, these are returned from the library as floating point numbers from 0.0 to 1.0 and are scaled to 16 bit integer values from 0 to 65535.  (0,0) corresponds to the top left of the camera&#039;s view, and (65535,65535) corresponds to the bottom right of the camera&#039;s view.&lt;br /&gt;
&lt;br /&gt;
===PupilSize===&lt;br /&gt;
The pupil size in mm is saved in this state if &amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; is enabled.  It corresponds to the length of the longest chord drawn from one side of the pupil to the other.  The size will change depending on the eye position and distance from the screen.  Although it is given in mm, it would be best to use this as a relative measurement.&lt;br /&gt;
&lt;br /&gt;
===EyeDist===&lt;br /&gt;
The distance between the screen and the eyes in mm is saved in this state if &amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; is enabled.  This measurement is an approximation.  The actual measurement will depend on whether or not the test subject is wearing glasses or not.&lt;br /&gt;
&lt;br /&gt;
===EyeValidity===&lt;br /&gt;
This state is a number from 0 to 4 and is documented in the Tobii SDK manual.  It is repeated here for convenience.&lt;br /&gt;
* 0 - The eye tracker is certain that the data for this eye is right.  There is no risk of confusing data from the other eye.&lt;br /&gt;
* 1 - The eye tracker has only recorded one eye and made some assumptions and estimations regarding which is the left and which is the right eye.  However, it is still very likely that the assumption made is correct.  The validity code for the other eye is in this case always set to 3.&lt;br /&gt;
* 2 - The eye tracker has only recorded one eye, and has no way of determining which one is the left eye and which one is the right eye.  The validity code for both eyes is set to 2.&lt;br /&gt;
* 3 - The eye tracker is fairly confident that the actual gaze data belongs to the other eye.  The other eye will always have validity code 1.&lt;br /&gt;
* 4 - The actual gaze data is missing or definitely belonging to the other eye.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code (Right - Left)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 0&lt;br /&gt;
| Both eyes found.  Data is valid for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 4 or 4 - 0&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 - 3 or 3 - 1&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 2 - 2&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 4 - 4&lt;br /&gt;
| No eye found.  Gaze data for both eyes are invalid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It&#039;d probably be wise to remove all data points with a validity state of 2 or higher while running your analysis.&lt;br /&gt;
&lt;br /&gt;
===EyetrackerStatesOK===&lt;br /&gt;
Early versions of the extension didn&#039;t take into account that the library may return a number greater than 1.0 or less than 0.0.  This resulted in &amp;quot;pac-man&amp;quot; style wrap around of gaze coordinates in 2.0 and crashes in 3.0.  If the output from the library is out of bounds, it is clamped to the boundaries and the &amp;quot;EyetrackerStatesOK&amp;quot; parameter is changed.  A value of &amp;quot;1&amp;quot; corresponds to valid gaze data, a value of &amp;quot;0&amp;quot; corresponds to invalid &amp;quot;clamped&amp;quot; gaze data.  Use the &amp;quot;GazeOffset&amp;quot; and &amp;quot;GazeScale&amp;quot; parameters to avoid clamping.  Those parameters scale and offset the data so that when it does go out of range, it can still be fit into the 16 bit state.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6892</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6892"/>
		<updated>2012-06-11T15:04:58Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An environment extension which manages multichannel, low latency audio I/O.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/AudioExtension&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
===Version History===&lt;br /&gt;
06/11/2012: Initial public release;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 4095&lt;br /&gt;
*Tested under: 4095&lt;br /&gt;
*Known to compile under: 4095&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
Fix Known Issues&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
* Leaving the module running for long periods of time in halted state causes a long time of no state logging before signal goes to realtime. Seems to be unrelated to how long system was left running (~12-15 seconds) -- Not sure if this is an issue with the extension itself, or an issue with the [Programming_Reference:Events] bcievent interface.&lt;br /&gt;
* Bandpass filtering in filterbanks doesn&#039;t appear to function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
In many cases, an experiment may require data about where the participant is looking.  In these experiments, an eyetracker is the only way to gather data relating to gaze position and eye location.  There are many eyetracking methods currently on the market, but many of these require the subject to hold their head steady -- often while strapped to a structure of some sort.  The Tobii eyetrackers require no such restriction so they were a natural choice when it came to interfacing with BCI2000.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_EYETRACKERLOGGER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--LogEyetracker=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Usage and Calibration==&lt;br /&gt;
Set up the eyetracker as detailed in the documentation that came with your device.  The device will connect to your machine and communicate through the ethernet port.  As such, it&#039;d be wise to disconnect and turn off any other networking devices while using the eyetracker.  It is possible that your network request could go out over a different network interface if you&#039;re not careful which makes for a troubleshooting nightmare.  When you start the source module, ensure that the &amp;lt;code&amp;gt;--LogEyetracker=1&amp;lt;/code&amp;gt; command line parameter is set.  Run the Eyetracker Browser utility which came with your eyetracker drivers and use it to locate the device on your local network.  Copy the network address to the clipboard and paste it in the &amp;lt;code&amp;gt;NetworkLocation&amp;lt;/code&amp;gt; parameter within BCI2000.  If the listed port is different, put that in the &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; parameter in the BCI2000 operator. &lt;br /&gt;
&lt;br /&gt;
Calibration can now occur.  Calibration should be done per subject per sitting.  Re-calibration is not necessary between runs, but any time that the subject changes eyewear, makeup, or position, or if the lighting conditions change it should be re-calibrated. A good rule of thumb would be to recalibrate at the start of every session.  Once a calibration is performed, it is saved in the Tobii device until the next calibration (even if there&#039;s a power loss).&lt;br /&gt;
&lt;br /&gt;
BCI2000 does not provide any way to calibrate the eyetracker.  This should be done using the Tobii SDK sample application.  The SDK can be obtained here: http://www.tobii.com/analysis-and-research/global/products/software/tobii-software-development-kit/.  The 2.0 or Beta 3.0 SDK can be used to calibrate the device.  When installed, open &amp;lt;code&amp;gt;C:\Program Files\Tobii\Tobii Eye Tracker SDK 2.0.1\samples\&amp;lt;\code&amp;gt; for the 2.0.1 SDK or &amp;lt;code&amp;gt;C:\Program Files\Tobii\SDK\Samples\&amp;lt;/code&amp;gt; for the 3.0 Beta SDK and find the &amp;quot;Eye Tracker Components C++&amp;quot; or &amp;quot;EyetrackerComponents.Cpp&amp;quot; sample project.  There should be a pre-built executable in this directory or a &amp;quot;prebuild&amp;quot; directory which can be used to run a calibration.  Use the network address from the Eyetracker Browser and follow the instructions to calibrate and test your device.  When you&#039;re done you can close the calibration utility and run BCI2000 - which will use the calibration saved on the device.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using an T60/T120 or any future Tobii eyetracker with an attached display, you&#039;ll probably have it in a dual screen setup showing different things on both monitors - either extended or dualview.  Typically, the Tobii monitor is used to present the task to the subject and the other monitor is used for the experimenter to control BCI2000 from.  This can present a bit of a problem when calibrating because the sample application will only run on your &amp;quot;primary display&amp;quot; which may or may not be your Tobii monitor.  Either set your primary display to be the Tobii screen or temporarily set the screen configuration into &amp;quot;clone&amp;quot; mode.  A different screen resolution or aspect ratio does not impact the Tobii calibration process.  &lt;br /&gt;
&lt;br /&gt;
Once the device is calibrated, it can be used reliably in BCI2000.  The logger will report information about eye validity in a text visualization window and feed states into the system.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The eyetracker is configured in the Source tab within the EyetrackerLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyetracker&amp;lt;/code&amp;gt;   - Enables/Disables logging of Eyetracker states&lt;br /&gt;
*&amp;lt;code&amp;gt;NetworkLocation&amp;lt;/code&amp;gt; - The network address of the Eyetracker given by the Tobii Eyetracker Browser&lt;br /&gt;
*&amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt;  - The port that the Tobii communicates over - Tobii default is 4455&lt;br /&gt;
*&amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; - Enables/Disables logging of gaze data&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; - Enables/Disables logging of eye position (as seen from the camera)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; - Enables/Disables logging of pupil size (very rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeScale&amp;lt;/code&amp;gt; - Scales the incoming gaze data first&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeOffset&amp;lt;/code&amp;gt; - Offsets the incoming gaze data after scaling&lt;br /&gt;
&lt;br /&gt;
Note: GazeScale and GazeOffset are quick hacks to address an issue with gaze data being clamped around the edges of the screen.  The eyetracker gives back values which are between 0.0 and 1.0 for onscreen gaze but supports looking slightly offscreen by allowing gaze data returned to go above 1.0 and below 0.0.  BCI2000 needs this scaled between 0.0 and 1.0 before the gaze data is multiplied by 65535 for storage in the 16 bit state.  These two parameters account for this scaling and offset and prevents the clamping from happening as often as it would otherwise.  These parameters will be removed once BCI2000 supports typed states.&lt;br /&gt;
&lt;br /&gt;
The following code retreives the actual ~(0.0-1.0) range that the eyetracker outputs directly (assuming you&#039;ve scaled and offset the signal to avoid clipping) from each eye and averages it to find a gaze position.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
float x = State( &amp;quot;EyetrackerLeftEyeGazeX&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeX&amp;quot; ); x /= ( 2.0f * 65535.0f );&lt;br /&gt;
float y = State( &amp;quot;EyetrackerLeftEyeGazeY&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeY&amp;quot; ); y /= ( 2.0f * 65535.0f );&lt;br /&gt;
x -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); x /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
y -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); y /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
Unless otherwise specified, all states are prefixed with &amp;lt;code&amp;gt;Eyetracker&amp;lt;Left/Right&amp;gt;Eye&amp;lt;/code&amp;gt; which corresponds with each individual eye.  The EyetrackerLogger extension does not support subjects with more than two eyes at the moment.&lt;br /&gt;
&lt;br /&gt;
===GazeX, GazeY===&lt;br /&gt;
The eye gaze position (where - on the screen - the subject is looking) is returned from the Tobii SDK as 32 bit floating point numbers which (roughly) range from 0.0 to 1.0.  They are multiplied by 65535 and stored as 16 bit integers in these states if the &amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; parameter is enabled.  (0,0) corresponds to the top left of the screen, (65535,65535) corresponds to the right bottom of the screen. -- See [[Contributions:EyetrackerLogger#EyetrackerStatesOK|EyetrackerStatesOK]].&lt;br /&gt;
&lt;br /&gt;
===PosX, PosY===&lt;br /&gt;
The eye position relative to the camera in 2D space is returned if &amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; is enabled.  Again, these are returned from the library as floating point numbers from 0.0 to 1.0 and are scaled to 16 bit integer values from 0 to 65535.  (0,0) corresponds to the top left of the camera&#039;s view, and (65535,65535) corresponds to the bottom right of the camera&#039;s view.&lt;br /&gt;
&lt;br /&gt;
===PupilSize===&lt;br /&gt;
The pupil size in mm is saved in this state if &amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; is enabled.  It corresponds to the length of the longest chord drawn from one side of the pupil to the other.  The size will change depending on the eye position and distance from the screen.  Although it is given in mm, it would be best to use this as a relative measurement.&lt;br /&gt;
&lt;br /&gt;
===EyeDist===&lt;br /&gt;
The distance between the screen and the eyes in mm is saved in this state if &amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; is enabled.  This measurement is an approximation.  The actual measurement will depend on whether or not the test subject is wearing glasses or not.&lt;br /&gt;
&lt;br /&gt;
===EyeValidity===&lt;br /&gt;
This state is a number from 0 to 4 and is documented in the Tobii SDK manual.  It is repeated here for convenience.&lt;br /&gt;
* 0 - The eye tracker is certain that the data for this eye is right.  There is no risk of confusing data from the other eye.&lt;br /&gt;
* 1 - The eye tracker has only recorded one eye and made some assumptions and estimations regarding which is the left and which is the right eye.  However, it is still very likely that the assumption made is correct.  The validity code for the other eye is in this case always set to 3.&lt;br /&gt;
* 2 - The eye tracker has only recorded one eye, and has no way of determining which one is the left eye and which one is the right eye.  The validity code for both eyes is set to 2.&lt;br /&gt;
* 3 - The eye tracker is fairly confident that the actual gaze data belongs to the other eye.  The other eye will always have validity code 1.&lt;br /&gt;
* 4 - The actual gaze data is missing or definitely belonging to the other eye.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code (Right - Left)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 0&lt;br /&gt;
| Both eyes found.  Data is valid for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 4 or 4 - 0&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 - 3 or 3 - 1&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 2 - 2&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 4 - 4&lt;br /&gt;
| No eye found.  Gaze data for both eyes are invalid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It&#039;d probably be wise to remove all data points with a validity state of 2 or higher while running your analysis.&lt;br /&gt;
&lt;br /&gt;
===EyetrackerStatesOK===&lt;br /&gt;
Early versions of the extension didn&#039;t take into account that the library may return a number greater than 1.0 or less than 0.0.  This resulted in &amp;quot;pac-man&amp;quot; style wrap around of gaze coordinates in 2.0 and crashes in 3.0.  If the output from the library is out of bounds, it is clamped to the boundaries and the &amp;quot;EyetrackerStatesOK&amp;quot; parameter is changed.  A value of &amp;quot;1&amp;quot; corresponds to valid gaze data, a value of &amp;quot;0&amp;quot; corresponds to invalid &amp;quot;clamped&amp;quot; gaze data.  Use the &amp;quot;GazeOffset&amp;quot; and &amp;quot;GazeScale&amp;quot; parameters to avoid clamping.  Those parameters scale and offset the data so that when it does go out of range, it can still be fit into the 16 bit state.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6891</id>
		<title>Contributions:AudioExtension</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:AudioExtension&amp;diff=6891"/>
		<updated>2012-06-11T14:41:21Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Setting up format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
A filter that records state information from &#039;&#039;Tobii Eyetrackers&#039;&#039; into state variables.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/EyetrackerLogger&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com), Jeremy Hill (jezhill@gmail.com).&lt;br /&gt;
===Version History===&lt;br /&gt;
06/09/2011: Initial public release;&lt;br /&gt;
06/10/2011: Hacked in scale and offset for gaze data;&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 3318&lt;br /&gt;
*Tested under: 3318&lt;br /&gt;
*Known to compile under: 3318&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
*Upgrade SDK version to 3.0 (once it&#039;s out of beta)&lt;br /&gt;
*Include a fixation/monitor filter&lt;br /&gt;
*Maybe a Qt calibration app&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
In many cases, an experiment may require data about where the participant is looking.  In these experiments, an eyetracker is the only way to gather data relating to gaze position and eye location.  There are many eyetracking methods currently on the market, but many of these require the subject to hold their head steady -- often while strapped to a structure of some sort.  The Tobii eyetrackers require no such restriction so they were a natural choice when it came to interfacing with BCI2000.&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_EYETRACKERLOGGER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--LogEyetracker=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Usage and Calibration==&lt;br /&gt;
Set up the eyetracker as detailed in the documentation that came with your device.  The device will connect to your machine and communicate through the ethernet port.  As such, it&#039;d be wise to disconnect and turn off any other networking devices while using the eyetracker.  It is possible that your network request could go out over a different network interface if you&#039;re not careful which makes for a troubleshooting nightmare.  When you start the source module, ensure that the &amp;lt;code&amp;gt;--LogEyetracker=1&amp;lt;/code&amp;gt; command line parameter is set.  Run the Eyetracker Browser utility which came with your eyetracker drivers and use it to locate the device on your local network.  Copy the network address to the clipboard and paste it in the &amp;lt;code&amp;gt;NetworkLocation&amp;lt;/code&amp;gt; parameter within BCI2000.  If the listed port is different, put that in the &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; parameter in the BCI2000 operator. &lt;br /&gt;
&lt;br /&gt;
Calibration can now occur.  Calibration should be done per subject per sitting.  Re-calibration is not necessary between runs, but any time that the subject changes eyewear, makeup, or position, or if the lighting conditions change it should be re-calibrated. A good rule of thumb would be to recalibrate at the start of every session.  Once a calibration is performed, it is saved in the Tobii device until the next calibration (even if there&#039;s a power loss).&lt;br /&gt;
&lt;br /&gt;
BCI2000 does not provide any way to calibrate the eyetracker.  This should be done using the Tobii SDK sample application.  The SDK can be obtained here: http://www.tobii.com/analysis-and-research/global/products/software/tobii-software-development-kit/.  The 2.0 or Beta 3.0 SDK can be used to calibrate the device.  When installed, open &amp;lt;code&amp;gt;C:\Program Files\Tobii\Tobii Eye Tracker SDK 2.0.1\samples\&amp;lt;\code&amp;gt; for the 2.0.1 SDK or &amp;lt;code&amp;gt;C:\Program Files\Tobii\SDK\Samples\&amp;lt;/code&amp;gt; for the 3.0 Beta SDK and find the &amp;quot;Eye Tracker Components C++&amp;quot; or &amp;quot;EyetrackerComponents.Cpp&amp;quot; sample project.  There should be a pre-built executable in this directory or a &amp;quot;prebuild&amp;quot; directory which can be used to run a calibration.  Use the network address from the Eyetracker Browser and follow the instructions to calibrate and test your device.  When you&#039;re done you can close the calibration utility and run BCI2000 - which will use the calibration saved on the device.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using an T60/T120 or any future Tobii eyetracker with an attached display, you&#039;ll probably have it in a dual screen setup showing different things on both monitors - either extended or dualview.  Typically, the Tobii monitor is used to present the task to the subject and the other monitor is used for the experimenter to control BCI2000 from.  This can present a bit of a problem when calibrating because the sample application will only run on your &amp;quot;primary display&amp;quot; which may or may not be your Tobii monitor.  Either set your primary display to be the Tobii screen or temporarily set the screen configuration into &amp;quot;clone&amp;quot; mode.  A different screen resolution or aspect ratio does not impact the Tobii calibration process.  &lt;br /&gt;
&lt;br /&gt;
Once the device is calibrated, it can be used reliably in BCI2000.  The logger will report information about eye validity in a text visualization window and feed states into the system.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The eyetracker is configured in the Source tab within the EyetrackerLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyetracker&amp;lt;/code&amp;gt;   - Enables/Disables logging of Eyetracker states&lt;br /&gt;
*&amp;lt;code&amp;gt;NetworkLocation&amp;lt;/code&amp;gt; - The network address of the Eyetracker given by the Tobii Eyetracker Browser&lt;br /&gt;
*&amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt;  - The port that the Tobii communicates over - Tobii default is 4455&lt;br /&gt;
*&amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; - Enables/Disables logging of gaze data&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; - Enables/Disables logging of eye position (as seen from the camera)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; - Enables/Disables logging of pupil size (very rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; - Enables/Disables logging of the distance from the screen to the eyes (again, rough)&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeScale&amp;lt;/code&amp;gt; - Scales the incoming gaze data first&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeOffset&amp;lt;/code&amp;gt; - Offsets the incoming gaze data after scaling&lt;br /&gt;
&lt;br /&gt;
Note: GazeScale and GazeOffset are quick hacks to address an issue with gaze data being clamped around the edges of the screen.  The eyetracker gives back values which are between 0.0 and 1.0 for onscreen gaze but supports looking slightly offscreen by allowing gaze data returned to go above 1.0 and below 0.0.  BCI2000 needs this scaled between 0.0 and 1.0 before the gaze data is multiplied by 65535 for storage in the 16 bit state.  These two parameters account for this scaling and offset and prevents the clamping from happening as often as it would otherwise.  These parameters will be removed once BCI2000 supports typed states.&lt;br /&gt;
&lt;br /&gt;
The following code retreives the actual ~(0.0-1.0) range that the eyetracker outputs directly (assuming you&#039;ve scaled and offset the signal to avoid clipping) from each eye and averages it to find a gaze position.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
float x = State( &amp;quot;EyetrackerLeftEyeGazeX&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeX&amp;quot; ); x /= ( 2.0f * 65535.0f );&lt;br /&gt;
float y = State( &amp;quot;EyetrackerLeftEyeGazeY&amp;quot; ) + State( &amp;quot;EyetrackerRightEyeGazeY&amp;quot; ); y /= ( 2.0f * 65535.0f );&lt;br /&gt;
x -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); x /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
y -= ( float )Parameter( &amp;quot;GazeOffset&amp;quot; ); y /= ( float )Parameter( &amp;quot;GazeScale&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
Unless otherwise specified, all states are prefixed with &amp;lt;code&amp;gt;Eyetracker&amp;lt;Left/Right&amp;gt;Eye&amp;lt;/code&amp;gt; which corresponds with each individual eye.  The EyetrackerLogger extension does not support subjects with more than two eyes at the moment.&lt;br /&gt;
&lt;br /&gt;
===GazeX, GazeY===&lt;br /&gt;
The eye gaze position (where - on the screen - the subject is looking) is returned from the Tobii SDK as 32 bit floating point numbers which (roughly) range from 0.0 to 1.0.  They are multiplied by 65535 and stored as 16 bit integers in these states if the &amp;lt;code&amp;gt;LogGazeData&amp;lt;/code&amp;gt; parameter is enabled.  (0,0) corresponds to the top left of the screen, (65535,65535) corresponds to the right bottom of the screen. -- See [[Contributions:EyetrackerLogger#EyetrackerStatesOK|EyetrackerStatesOK]].&lt;br /&gt;
&lt;br /&gt;
===PosX, PosY===&lt;br /&gt;
The eye position relative to the camera in 2D space is returned if &amp;lt;code&amp;gt;LogEyePos&amp;lt;/code&amp;gt; is enabled.  Again, these are returned from the library as floating point numbers from 0.0 to 1.0 and are scaled to 16 bit integer values from 0 to 65535.  (0,0) corresponds to the top left of the camera&#039;s view, and (65535,65535) corresponds to the bottom right of the camera&#039;s view.&lt;br /&gt;
&lt;br /&gt;
===PupilSize===&lt;br /&gt;
The pupil size in mm is saved in this state if &amp;lt;code&amp;gt;LogPupilSize&amp;lt;/code&amp;gt; is enabled.  It corresponds to the length of the longest chord drawn from one side of the pupil to the other.  The size will change depending on the eye position and distance from the screen.  Although it is given in mm, it would be best to use this as a relative measurement.&lt;br /&gt;
&lt;br /&gt;
===EyeDist===&lt;br /&gt;
The distance between the screen and the eyes in mm is saved in this state if &amp;lt;code&amp;gt;LogEyeDist&amp;lt;/code&amp;gt; is enabled.  This measurement is an approximation.  The actual measurement will depend on whether or not the test subject is wearing glasses or not.&lt;br /&gt;
&lt;br /&gt;
===EyeValidity===&lt;br /&gt;
This state is a number from 0 to 4 and is documented in the Tobii SDK manual.  It is repeated here for convenience.&lt;br /&gt;
* 0 - The eye tracker is certain that the data for this eye is right.  There is no risk of confusing data from the other eye.&lt;br /&gt;
* 1 - The eye tracker has only recorded one eye and made some assumptions and estimations regarding which is the left and which is the right eye.  However, it is still very likely that the assumption made is correct.  The validity code for the other eye is in this case always set to 3.&lt;br /&gt;
* 2 - The eye tracker has only recorded one eye, and has no way of determining which one is the left eye and which one is the right eye.  The validity code for both eyes is set to 2.&lt;br /&gt;
* 3 - The eye tracker is fairly confident that the actual gaze data belongs to the other eye.  The other eye will always have validity code 1.&lt;br /&gt;
* 4 - The actual gaze data is missing or definitely belonging to the other eye.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code (Right - Left)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 0&lt;br /&gt;
| Both eyes found.  Data is valid for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 0 - 4 or 4 - 0&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 - 3 or 3 - 1&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 2 - 2&lt;br /&gt;
| One eye found.  Gaze data is the same for both eyes.&lt;br /&gt;
|-&lt;br /&gt;
| 4 - 4&lt;br /&gt;
| No eye found.  Gaze data for both eyes are invalid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It&#039;d probably be wise to remove all data points with a validity state of 2 or higher while running your analysis.&lt;br /&gt;
&lt;br /&gt;
===EyetrackerStatesOK===&lt;br /&gt;
Early versions of the extension didn&#039;t take into account that the library may return a number greater than 1.0 or less than 0.0.  This resulted in &amp;quot;pac-man&amp;quot; style wrap around of gaze coordinates in 2.0 and crashes in 3.0.  If the output from the library is out of bounds, it is clamped to the boundaries and the &amp;quot;EyetrackerStatesOK&amp;quot; parameter is changed.  A value of &amp;quot;1&amp;quot; corresponds to valid gaze data, a value of &amp;quot;0&amp;quot; corresponds to invalid &amp;quot;clamped&amp;quot; gaze data.  Use the &amp;quot;GazeOffset&amp;quot; and &amp;quot;GazeScale&amp;quot; parameters to avoid clamping.  Those parameters scale and offset the data so that when it does go out of range, it can still be fit into the 16 bit state.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:Extensions&amp;diff=6890</id>
		<title>Contributions:Extensions</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:Extensions&amp;diff=6890"/>
		<updated>2012-06-11T14:38:07Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added page for AudioExtension&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A framework &#039;&#039;Extension&#039;&#039; is an optional contributed plugin which can affect multiple modules.  For example, various manufacturer-specific  [[User Reference:Logging Input|input-device loggers]] are provided in the &amp;lt;code&amp;gt;src/contrib/Extensions&amp;lt;/code&amp;gt; folder, and these can be optionally added to the BCI2000 framework for SignalSource modules, thereby giving all source modules the ability to log input from the corresponding devices.  Selecting a custom Extension, and re-building your modules to include it, requires the use of CMake and a supported C++ compiler:  see the [[Programming Howto:Quickstart Guide]] for a walkthrough that shows you how to recompile BCI2000 modules. &lt;br /&gt;
&lt;br /&gt;
The following user extensions are available in the [[Contributions:Contents|Contributions]] section of BCI2000:&lt;br /&gt;
&lt;br /&gt;
*[[Contributions:DataGloveLogger]]: A logger extension which acquires data from the 5DT Data Glove Ultra.&lt;br /&gt;
*[[Contributions:EyetrackerLogger]]: A logger extension which acquires data from Tobii eyetrackers.&lt;br /&gt;
*[[Contributions:GazeMonitorFilter]]: An application module filter extension which supports the EyetrackerLogger.&lt;br /&gt;
*[[Contributions:WiimoteLogger]]: A logger extension which acquires data from Nintendo Wii Remotes.&lt;br /&gt;
*[[Contributions:WebcamLogger]]: A logger extension which allows for synchronizing webcam video.&lt;br /&gt;
*[[Contributions:AudioExtension]]: An all purpose audio toolkit which allows for realtime multichannel audio I/O&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Programming Reference:EnvironmentExtension Class]]&lt;br /&gt;
&lt;br /&gt;
[[Programming Tutorial:Implementing an Input Logger]][[Category:Contents]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6537</id>
		<title>User Reference:gHIamp</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6537"/>
		<updated>2012-02-24T17:48:23Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Work in Progress&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The g.HIamp is a 256 channel amplifier from g.tec.  The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000. &lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gHIampSource&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
Rensselaer Polytechnic Institute&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
Version 0.9: August 2011&lt;br /&gt;
* Supports one g.HIamp&lt;br /&gt;
* Supports Filters&lt;br /&gt;
* Referencing by any channel&lt;br /&gt;
* Future compatible with g.HIamp master/slave configurations&lt;br /&gt;
* Using g.HIamp C API version 1.11.02&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 3472&lt;br /&gt;
*Tested under: 3763&lt;br /&gt;
*Known to compile under: 3798&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Acquires raw data from the g.HIamp.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Compile the gHIampSource module using [[Programming_Reference:Build_System#How_To_Build_Using_CMake|CMake and your compiler]].  The resulting gHIampSource.exe should be placed in the prog directory automatically.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
* &#039;&#039;&#039;SourceCh&#039;&#039;&#039; represents the total number of channels to be logged from the source module.&lt;br /&gt;
* &#039;&#039;&#039;SampleBlockSize&#039;&#039;&#039; should be set equal to the size of the sample block pulled from the device. &amp;lt;br/&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;NOTE:&#039;&#039;&#039; &amp;lt;span style=&amp;quot;text-decoration: underline;&amp;quot;&amp;gt;Only specific combinations of SampleBlockSize and SampleRate are valid!  See [[#Valid Operating Modes]]&amp;lt;/span&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;SampleRate&#039;&#039;&#039; determines the rate at which the device samples data. &amp;lt;br/&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;NOTE:&#039;&#039;&#039; &amp;lt;span style=&amp;quot;text-decoration: underline;&amp;quot;&amp;gt;Only specific combinations of SampleBlockSize and SampleRate are valid!  See [[#Valid Operating Modes]]&amp;lt;/span&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ChannelNames&#039;&#039;&#039; is a convenience parameter.  Name channels here and they can be referenced by these names later.&lt;br /&gt;
* &#039;&#039;&#039;SourceChOffset&#039;&#039;&#039; should be set to a list of &amp;quot;0&amp;quot;s -- one 0 for each channel as indicated by SourceCh, separated by spaces.&lt;br /&gt;
* &#039;&#039;&#039;SourceChGain&#039;&#039;&#039; should be set to a list of &amp;quot;1&amp;quot;s -- one 0 for each channel as indicated by SourceCh, separated by spaces.&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039; is the serial number identifier of the master g.HIamp device.  This serial can be found on the physical device and is typically in a &amp;quot;&#039;&#039;&#039;HA-20XX.XX.XX&#039;&#039;&#039;&amp;quot; format.  This parameter can also be set to &amp;quot;&#039;&#039;&#039;auto&#039;&#039;&#039;&amp;quot; if there is only one g.HIamp device connected to the machine.&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039; is a list of device serials (typically in &amp;quot;&#039;&#039;&#039;HA-20XX.XX.XX&#039;&#039;&#039;&amp;quot; format) which corresponds to the devices to record channels from.  One of these serials must be specified as the master device in the &amp;quot;DeviceIDMaster&amp;quot; parameter.  This parameter can also be set to &amp;quot;&#039;&#039;&#039;auto&#039;&#039;&#039;&amp;quot; if there is only one g.HIamp device connected to the machine.  &amp;lt;br/&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;NOTE:&#039;&#039;&#039; &amp;lt;span style=&amp;quot;text-decoration: underline;&amp;quot;&amp;gt;Device slaving is not yet supported by the module OR the g.HIamp C API. -- This parameter only exists for future compatibility. &amp;lt;/span&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;RefChList&#039;&#039;&#039; is a list of channels which can act as &amp;quot;Reference&amp;quot; channels for each amp.  If left blank, no channel will be used as a reference, and the raw signal will be recorded in the output.  &amp;lt;br/&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;NOTE:&#039;&#039;&#039; &amp;lt;span style=&amp;quot;text-decoration: underline;&amp;quot;&amp;gt;If specifying reference channels, there must be one reference channel per device specified in &amp;quot;DeviceIDs&amp;quot; in the same order. &amp;lt;/span&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;SourceChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceBufferSize&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Valid Operating Modes===&lt;br /&gt;
The gHIamp only accepts specific combinations of sampling rates and sample block sizes.  The following table shows all valid combinations of sample rate and block size.  Operating outside of these modes is untested and could result in problems.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Sample Rate&lt;br /&gt;
!Valid Sample Block Sizes&lt;br /&gt;
|-&lt;br /&gt;
|256 Samples per second&lt;br /&gt;
|1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|512 Samples per second&lt;br /&gt;
|2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|600 Samples per second&lt;br /&gt;
|4 5 6 7 8 9 10 11 12 13 15 16 17 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|1200 Samples per second&lt;br /&gt;
|8 9 10 11 12 13 14 15 16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|2400 Samples per second&lt;br /&gt;
|16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|4800 Samples per second&lt;br /&gt;
|32 64 128 256&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Help:Editing&amp;diff=6536</id>
		<title>Help:Editing</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Help:Editing&amp;diff=6536"/>
		<updated>2012-02-24T17:25:03Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: This should be easier.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.mediawiki.org/wiki/Help:Editing&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Help:Formatting&amp;diff=6535</id>
		<title>Help:Formatting</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Help:Formatting&amp;diff=6535"/>
		<updated>2012-02-24T17:24:01Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Gah...  Too much work.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6534</id>
		<title>User Reference:gHIamp</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6534"/>
		<updated>2012-02-24T17:20:40Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added Valid Operating Modes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The g.HIamp is a 256 channel amplifier from g.tec.  The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000. &lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gHIampSource&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
Rensselaer Polytechnic Institute&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
Version 0.9: August 2011&lt;br /&gt;
* Supports one g.HIamp&lt;br /&gt;
* Supports Filters&lt;br /&gt;
* Referencing by any channel&lt;br /&gt;
* Future compatible with g.HIamp master/slave configurations&lt;br /&gt;
* Using g.HIamp C API version 1.11.02&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 3472&lt;br /&gt;
*Tested under: 3763&lt;br /&gt;
*Known to compile under: 3798&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Acquires raw data from the g.HIamp.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Compile the gHIampSource module using [[Programming_Reference:Build_System#How_To_Build_Using_CMake|CMake and your compiler]].  The resulting gHIampSource.exe should be placed in the prog directory automatically.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
* &#039;&#039;&#039;SourceCh&#039;&#039;&#039; represents the total number of channels to be logged from the source module.&lt;br /&gt;
* &#039;&#039;&#039;SampleBlockSize&#039;&#039;&#039; should be set equal to the size of the sample block pulled from the device.&lt;br /&gt;
* &#039;&#039;&#039;SampleRate&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ChannelNames&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChOffset&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChGain&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;RefChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceBufferSize&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Valid Operating Modes===&lt;br /&gt;
The gHIamp only accepts specific combinations of sampling rates and sample block sizes.  The following table shows all valid combinations of sample rate and block size.  Operating outside of these modes is untested and could result in problems.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Sample Rate&lt;br /&gt;
!Valid Sample Block Sizes&lt;br /&gt;
|-&lt;br /&gt;
|256 Samples per second&lt;br /&gt;
|1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|512 Samples per second&lt;br /&gt;
|2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|600 Samples per second&lt;br /&gt;
|4 5 6 7 8 9 10 11 12 13 15 16 17 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|1200 Samples per second&lt;br /&gt;
|8 9 10 11 12 13 14 15 16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|2400 Samples per second&lt;br /&gt;
|16 32 64 128 256&lt;br /&gt;
|-&lt;br /&gt;
|4800 Samples per second&lt;br /&gt;
|32 64 128 256&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Help:Formatting&amp;diff=6533</id>
		<title>Help:Formatting</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Help:Formatting&amp;diff=6533"/>
		<updated>2012-02-24T17:15:45Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added a formatting help page from MediaWiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can format your text by using wiki markup. This consists of normal characters like asterisks, single quotes or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in &#039;&#039;italic&#039;&#039;, you include it in two pairs of single quotes like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;this&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Text formatting markup ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Description&lt;br /&gt;
! width=40% | You type&lt;br /&gt;
! width=40% | You get&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; style=&amp;quot;background:#ABE&amp;quot; | character (inline) formatting – &#039;&#039;applies anywhere&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Italic text&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;&#039;italic&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&#039;&#039;italic&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Bold text&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;bold&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&#039;&#039;&#039;bold&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Bold and italic&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;bold &amp;amp; italic&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;bold &amp;amp; italic&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Escape wiki markup&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;nowiki&amp;gt;no &#039;&#039;markup&#039;&#039;&amp;lt;/nowiki&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;nowiki&amp;gt;no &#039;&#039;markup&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Escape wiki markup once&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
[[API]]&amp;amp;lt;nowiki/&amp;gt;extension&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
[[API]]&amp;lt;nowiki/&amp;gt;extension&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; style=&amp;quot;background:#ABE&amp;quot; | section formatting – &#039;&#039;only at the beginning of the line&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Headings of different levels &lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Level 2 ==&lt;br /&gt;
&lt;br /&gt;
=== Level 3 ===&lt;br /&gt;
&lt;br /&gt;
==== Level 4 ====&lt;br /&gt;
&lt;br /&gt;
===== Level 5 =====&lt;br /&gt;
&lt;br /&gt;
====== Level 6 ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
== Level 2 ==&lt;br /&gt;
&lt;br /&gt;
=== Level 3 ===&lt;br /&gt;
&lt;br /&gt;
==== Level 4 ====&lt;br /&gt;
&lt;br /&gt;
===== Level 5 =====&lt;br /&gt;
&lt;br /&gt;
====== Level 6 ======&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Horizontal rule&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
Text above&lt;br /&gt;
----&lt;br /&gt;
Text below&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Text above&lt;br /&gt;
----&lt;br /&gt;
Text below&lt;br /&gt;
|-&lt;br /&gt;
| Bullet list&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* Start each line&lt;br /&gt;
* with an [[Wikipedia:asterisk|asterisk]] (*).&lt;br /&gt;
** More asterisks gives deeper&lt;br /&gt;
*** and deeper levels.&lt;br /&gt;
* Line breaks&amp;lt;br/&amp;gt;don&#039;t break levels.&lt;br /&gt;
*** But jumping levels creates empty space.&lt;br /&gt;
Any other start ends the list.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* Start each line&lt;br /&gt;
* with an [[Wikipedia:asterisk|asterisk]] (*).&lt;br /&gt;
** More asterisks gives deeper&lt;br /&gt;
*** and deeper levels.&lt;br /&gt;
* Line breaks&amp;lt;br/&amp;gt;don&#039;t break levels.&lt;br /&gt;
*** But jumping levels creates empty space.&lt;br /&gt;
Any other start ends the list.&lt;br /&gt;
|-&lt;br /&gt;
| Numbered list&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start each line&lt;br /&gt;
# with a [[Wikipedia:Number_sign|number sign]] (#).&lt;br /&gt;
## More number signs gives deeper&lt;br /&gt;
### and deeper&lt;br /&gt;
### levels.&lt;br /&gt;
# Line breaks&amp;lt;br/&amp;gt;don&#039;t break levels.&lt;br /&gt;
### But jumping levels creates empty space.&lt;br /&gt;
# Blank lines&lt;br /&gt;
&lt;br /&gt;
# end the list and start another.&lt;br /&gt;
Any other start also&lt;br /&gt;
ends the list.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
# Start each line&lt;br /&gt;
# with a [[Wikipedia:Number_sign|number sign]] (#).&lt;br /&gt;
## More number signs gives deeper&lt;br /&gt;
### and deeper&lt;br /&gt;
### levels.&lt;br /&gt;
# Line breaks&amp;lt;br/&amp;gt;don&#039;t break levels.&lt;br /&gt;
### But jumping levels creates empty space.&lt;br /&gt;
# Blank lines&lt;br /&gt;
&lt;br /&gt;
# end the list and start another.&lt;br /&gt;
Any other start also&lt;br /&gt;
ends the list.&lt;br /&gt;
|-&lt;br /&gt;
| Definition list&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
;item 1&lt;br /&gt;
: definition 1&lt;br /&gt;
;item 2&lt;br /&gt;
: definition 2-1&lt;br /&gt;
: definition 2-2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
;item 1&lt;br /&gt;
: definition 1&lt;br /&gt;
;item 2&lt;br /&gt;
: definition 2-1&lt;br /&gt;
: definition 2-2&lt;br /&gt;
|-&lt;br /&gt;
| Indent text&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
: Single indent&lt;br /&gt;
:: Double indent&lt;br /&gt;
::::: Multiple indent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
|&lt;br /&gt;
: Single indent&lt;br /&gt;
:: Double indent&lt;br /&gt;
::::: Multiple indent&lt;br /&gt;
|-&lt;br /&gt;
| Mixture of different types of list&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# one&lt;br /&gt;
# two&lt;br /&gt;
#* two point one&lt;br /&gt;
#* two point two&lt;br /&gt;
# three&lt;br /&gt;
#; three item one&lt;br /&gt;
#: three def one&lt;br /&gt;
# four&lt;br /&gt;
#: four def one&lt;br /&gt;
#: this looks like a continuation&lt;br /&gt;
#: and is often used&lt;br /&gt;
#: instead&amp;lt;br/&amp;gt;of &amp;amp;lt;nowiki&amp;gt;&amp;lt;br/&amp;gt;&amp;amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# five&lt;br /&gt;
## five sub 1&lt;br /&gt;
### five sub 1 sub 1&lt;br /&gt;
## five sub 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
|&lt;br /&gt;
# one&lt;br /&gt;
# two&lt;br /&gt;
#* two point one&lt;br /&gt;
#* two point two&lt;br /&gt;
# three&lt;br /&gt;
#; three item one&lt;br /&gt;
#: three def one&lt;br /&gt;
# four&lt;br /&gt;
#: four def one&lt;br /&gt;
#: this looks like a continuation&lt;br /&gt;
#: and is often used&lt;br /&gt;
#: instead&amp;lt;br/&amp;gt;of &amp;lt;nowiki&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# five&lt;br /&gt;
## five sub 1&lt;br /&gt;
### five sub 1 sub 1&lt;br /&gt;
## five sub 2{{anchor|pre}}&lt;br /&gt;
|-&lt;br /&gt;
| Preformatted text&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
 Start each line with a space.&lt;br /&gt;
 Text is &#039;&#039;&#039;preformatted&#039;&#039;&#039; and&lt;br /&gt;
 &#039;&#039;markups&#039;&#039; &#039;&#039;&#039;&#039;&#039;can&#039;&#039;&#039;&#039;&#039; be done.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
|&lt;br /&gt;
 Start each line with a space.&lt;br /&gt;
 Text is &#039;&#039;&#039;preformatted&#039;&#039;&#039; and&lt;br /&gt;
 &#039;&#039;markups&#039;&#039; &#039;&#039;&#039;&#039;&#039;can&#039;&#039;&#039;&#039;&#039; be done.&lt;br /&gt;
|-&lt;br /&gt;
| Preformatted text blocks&lt;br /&gt;
| &amp;lt;pre&amp;gt; &amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;Start with a space in the first column,&lt;br /&gt;
(before the &amp;lt;nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then your block format will be&lt;br /&gt;
    maintained.&lt;br /&gt;
 &lt;br /&gt;
This is good for copying in code blocks:&lt;br /&gt;
&lt;br /&gt;
def function():&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;documentation string&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    if True:&lt;br /&gt;
        print True&lt;br /&gt;
    else:&lt;br /&gt;
        print False&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Start with a space in the first column,&lt;br /&gt;
(before the &amp;lt;nowiki&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then your block format will be&lt;br /&gt;
    maintained.&lt;br /&gt;
&lt;br /&gt;
This is good for copying in code blocks:&lt;br /&gt;
&lt;br /&gt;
def function():&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;documentation string&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    if True:&lt;br /&gt;
        print True&lt;br /&gt;
    else:&lt;br /&gt;
        print False&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Paragraphs ==&lt;br /&gt;
&lt;br /&gt;
MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag &amp;lt;code&amp;gt;&amp;amp;lt;br/&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== HTML tags ==&lt;br /&gt;
&lt;br /&gt;
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example &amp;lt;code&amp;gt;&amp;amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;div&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;font&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. These apply anywhere you insert them.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Description&lt;br /&gt;
! width=40% | You type&lt;br /&gt;
! width=40% | You get&lt;br /&gt;
|-&lt;br /&gt;
| Inserted&amp;lt;br/&amp;gt;(Displays as underline in most browsers.)&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;ins&amp;gt;Inserted&amp;lt;/ins&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;text-decoration: underline;&amp;quot;&amp;gt;Underline&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ins&amp;gt;Inserted&amp;lt;/ins&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;text-decoration: underline;&amp;quot;&amp;gt;Underline&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Deleted&amp;lt;br/&amp;gt;(Displays as strikethrough in most browsers.)&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;del&amp;gt;Deleted&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;text-decoration:line-through;&amp;quot;&amp;gt;Deleted&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;del&amp;gt;Deleted&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;text-decoration:line-through;&amp;quot;&amp;gt;Deleted&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Fixed width text&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;Source code&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Fixed width text&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;Source code&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Fixed width text&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Blockquotes&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
text above&lt;br /&gt;
text above&lt;br /&gt;
&amp;lt;blockquote&amp;gt;blockquote&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
text below&lt;br /&gt;
text below&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
text above&lt;br /&gt;
text above&lt;br /&gt;
&amp;lt;blockquote&amp;gt;blockquote&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
text below&lt;br /&gt;
text below&lt;br /&gt;
|-&lt;br /&gt;
| Comment&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!-- This is a comment --&amp;gt;&lt;br /&gt;
Comments are only visible&lt;br /&gt;
in the edit window.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!-- This is a comment --&amp;gt;&lt;br /&gt;
Comments are only visible&lt;br /&gt;
in the edit window.&lt;br /&gt;
|-&lt;br /&gt;
| Completely preformatted text&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; Text is &#039;&#039;&#039;preformatted&#039;&#039;&#039; and&lt;br /&gt;
&#039;&#039;markups&#039;&#039; &#039;&#039;&#039;&#039;&#039;cannot&#039;&#039;&#039;&#039;&#039; be done&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
---- &lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt; Text is &#039;&#039;&#039;preformatted&#039;&#039;&#039; and&lt;br /&gt;
&#039;&#039;markups&#039;&#039; &#039;&#039;&#039;&#039;&#039;cannot&#039;&#039;&#039;&#039;&#039; be done&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Customized&#039;&#039;&#039; preformatted text&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
Text is &#039;&#039;&#039;preformatted&#039;&#039;&#039;&lt;br /&gt;
with a style and&lt;br /&gt;
&#039;&#039;markups&#039;&#039; &#039;&#039;&#039;&#039;&#039;cannot&#039;&#039;&#039;&#039;&#039; be done&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
Text is &#039;&#039;&#039;preformatted&#039;&#039;&#039;&lt;br /&gt;
with a style and&lt;br /&gt;
&#039;&#039;markups&#039;&#039; &#039;&#039;&#039;&#039;&#039;cannot&#039;&#039;&#039;&#039;&#039; be done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Customized&#039;&#039;&#039; preformatted text with text wrap according to screen width&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
This longer sentence is used to demonstrate text wrapping. &amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
This longer sentence is used to demonstrate text wrapping.&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Inserting symbols ==&lt;br /&gt;
&lt;br /&gt;
Symbols and other special characters not available on your keyboard can be inserted through a special sequence of characters. Those sequences are called HTML entities. For example, the following sequence (entity) &#039;&#039;&#039;&amp;amp;amp;rarr;&#039;&#039;&#039; when inserted will be shown as &amp;lt;ins&amp;gt;right arrow&amp;lt;/ins&amp;gt; HTML symbol &amp;amp;rarr; and &#039;&#039;&#039;&amp;amp;amp;mdash;&#039;&#039;&#039; when inserted will be shown as an &amp;lt;ins&amp;gt;em dash&amp;lt;/ins&amp;gt; HTML symbol &amp;amp;mdash; &lt;br /&gt;
---- &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=center width=100%&lt;br /&gt;
! colspan=32 | HTML symbol entities&lt;br /&gt;
|- align=center| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Aacute;&amp;quot;&amp;gt;&amp;amp;Aacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;aacute;&amp;quot;&amp;gt;&amp;amp;aacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Acirc;&amp;quot;&amp;gt;&amp;amp;Acirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;acirc;&amp;quot;&amp;gt;&amp;amp;acirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;acute;&amp;quot;&amp;gt;&amp;amp;acute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;AElig;&amp;quot;&amp;gt;&amp;amp;AElig;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;aelig;&amp;quot;&amp;gt;&amp;amp;aelig;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Agrave;&amp;quot;&amp;gt;&amp;amp;Agrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;agrave;&amp;quot;&amp;gt;&amp;amp;agrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;alefsym;&amp;quot;&amp;gt;&amp;amp;alefsym;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Alpha;&amp;quot;&amp;gt;&amp;amp;Alpha;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;alpha;&amp;quot;&amp;gt;&amp;amp;alpha;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;amp;&amp;quot;&amp;gt;&amp;amp;amp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;and;&amp;quot;&amp;gt;&amp;amp;and;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ang;&amp;quot;&amp;gt;&amp;amp;ang;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Aring;&amp;quot;&amp;gt;&amp;amp;Aring;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;aring;&amp;quot;&amp;gt;&amp;amp;aring;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;asymp;&amp;quot;&amp;gt;&amp;amp;asymp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Atilde;&amp;quot;&amp;gt;&amp;amp;Atilde;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;atilde;&amp;quot;&amp;gt;&amp;amp;atilde;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Auml;&amp;quot;&amp;gt;&amp;amp;Auml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;auml;&amp;quot;&amp;gt;&amp;amp;auml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;bdquo;&amp;quot;&amp;gt;&amp;amp;bdquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Beta;&amp;quot;&amp;gt;&amp;amp;Beta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;beta;&amp;quot;&amp;gt;&amp;amp;beta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;brvbar;&amp;quot;&amp;gt;&amp;amp;brvbar;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;bull;&amp;quot;&amp;gt;&amp;amp;bull;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;cap;&amp;quot;&amp;gt;&amp;amp;cap;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ccedil;&amp;quot;&amp;gt;&amp;amp;Ccedil;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ccedil;&amp;quot;&amp;gt;&amp;amp;ccedil;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;cedil;&amp;quot;&amp;gt;&amp;amp;cedil;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;cent;&amp;quot;&amp;gt;&amp;amp;cent;&amp;lt;/span&amp;gt;&lt;br /&gt;
|- align=center&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Chi;&amp;quot;&amp;gt;&amp;amp;Chi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;chi;&amp;quot;&amp;gt;&amp;amp;chi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;circ;&amp;quot;&amp;gt;&amp;amp;circ;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;clubs;&amp;quot;&amp;gt;&amp;amp;clubs;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;cong;&amp;quot;&amp;gt;&amp;amp;cong;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;copy;&amp;quot;&amp;gt;&amp;amp;copy;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;crarr;&amp;quot;&amp;gt;&amp;amp;crarr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;cup;&amp;quot;&amp;gt;&amp;amp;cup;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;curren;&amp;quot;&amp;gt;&amp;amp;curren;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;dagger;&amp;quot;&amp;gt;&amp;amp;dagger;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Dagger;&amp;quot;&amp;gt;&amp;amp;Dagger;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;darr;&amp;quot;&amp;gt;&amp;amp;darr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;dArr;&amp;quot;&amp;gt;&amp;amp;dArr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;deg;&amp;quot;&amp;gt;&amp;amp;deg;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Delta;&amp;quot;&amp;gt;&amp;amp;Delta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;delta;&amp;quot;&amp;gt;&amp;amp;delta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;diams;&amp;quot;&amp;gt;&amp;amp;diams;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;divide;&amp;quot;&amp;gt;&amp;amp;divide;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Eacute;&amp;quot;&amp;gt;&amp;amp;Eacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;eacute;&amp;quot;&amp;gt;&amp;amp;eacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ecirc;&amp;quot;&amp;gt;&amp;amp;Ecirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ecirc;&amp;quot;&amp;gt;&amp;amp;ecirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Egrave;&amp;quot;&amp;gt;&amp;amp;Egrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;egrave;&amp;quot;&amp;gt;&amp;amp;egrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;empty;&amp;quot;&amp;gt;&amp;amp;empty;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;emsp;&amp;quot;&amp;gt;&amp;amp;emsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ensp;&amp;quot;&amp;gt;&amp;amp;ensp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Epsilon;&amp;quot;&amp;gt;&amp;amp;Epsilon;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;epsilon;&amp;quot;&amp;gt;&amp;amp;epsilon;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;equiv;&amp;quot;&amp;gt;&amp;amp;equiv;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Eta;&amp;quot;&amp;gt;&amp;amp;Eta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;eta;&amp;quot;&amp;gt;&amp;amp;eta;&amp;lt;/span&amp;gt;&lt;br /&gt;
|- align=center&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ETH;&amp;quot;&amp;gt;&amp;amp;ETH;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;eth;&amp;quot;&amp;gt;&amp;amp;eth;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Euml;&amp;quot;&amp;gt;&amp;amp;Euml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;euml;&amp;quot;&amp;gt;&amp;amp;euml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;euro;&amp;quot;&amp;gt;&amp;amp;euro;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;exist;&amp;quot;&amp;gt;&amp;amp;exist;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;fnof;&amp;quot;&amp;gt;&amp;amp;fnof;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;forall;&amp;quot;&amp;gt;&amp;amp;forall;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;frac12;&amp;quot;&amp;gt;&amp;amp;frac12;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;frac14;&amp;quot;&amp;gt;&amp;amp;frac14;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;frac34;&amp;quot;&amp;gt;&amp;amp;frac34;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;frasl;&amp;quot;&amp;gt;&amp;amp;frasl;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Gamma;&amp;quot;&amp;gt;&amp;amp;Gamma;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;gamma;&amp;quot;&amp;gt;&amp;amp;gamma;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ge;&amp;quot;&amp;gt;&amp;amp;ge;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;gt;&amp;quot;&amp;gt;&amp;amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;harr;&amp;quot;&amp;gt;&amp;amp;harr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;hArr;&amp;quot;&amp;gt;&amp;amp;hArr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;hearts;&amp;quot;&amp;gt;&amp;amp;hearts;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;hellip;&amp;quot;&amp;gt;&amp;amp;hellip;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Iacute;&amp;quot;&amp;gt;&amp;amp;Iacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;iacute;&amp;quot;&amp;gt;&amp;amp;iacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Icirc;&amp;quot;&amp;gt;&amp;amp;Icirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;icirc;&amp;quot;&amp;gt;&amp;amp;icirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;iexcl;&amp;quot;&amp;gt;&amp;amp;iexcl;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Igrave;&amp;quot;&amp;gt;&amp;amp;Igrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;igrave;&amp;quot;&amp;gt;&amp;amp;igrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;image;&amp;quot;&amp;gt;&amp;amp;image;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;infin;&amp;quot;&amp;gt;&amp;amp;infin;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;int;&amp;quot;&amp;gt;&amp;amp;int;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Iota;&amp;quot;&amp;gt;&amp;amp;Iota;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;iota;&amp;quot;&amp;gt;&amp;amp;iota;&amp;lt;/span&amp;gt;&lt;br /&gt;
|- align=center&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;iquest;&amp;quot;&amp;gt;&amp;amp;iquest;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;isin;&amp;quot;&amp;gt;&amp;amp;isin;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Iuml;&amp;quot;&amp;gt;&amp;amp;Iuml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;iuml;&amp;quot;&amp;gt;&amp;amp;iuml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Kappa;&amp;quot;&amp;gt;&amp;amp;Kappa;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;kappa;&amp;quot;&amp;gt;&amp;amp;kappa;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Lambda;&amp;quot;&amp;gt;&amp;amp;Lambda;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lambda;&amp;quot;&amp;gt;&amp;amp;lambda;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lang;&amp;quot;&amp;gt;&amp;amp;lang;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;laquo;&amp;quot;&amp;gt;&amp;amp;laquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;larr;&amp;quot;&amp;gt;&amp;amp;larr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lArr;&amp;quot;&amp;gt;&amp;amp;lArr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lceil;&amp;quot;&amp;gt;&amp;amp;lceil;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ldquo;&amp;quot;&amp;gt;&amp;amp;ldquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;le;&amp;quot;&amp;gt;&amp;amp;le;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lfloor;&amp;quot;&amp;gt;&amp;amp;lfloor;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lowast;&amp;quot;&amp;gt;&amp;amp;lowast;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;loz;&amp;quot;&amp;gt;&amp;amp;loz;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lrm;&amp;quot;&amp;gt;&amp;amp;lrm;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lsaquo;&amp;quot;&amp;gt;&amp;amp;lsaquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lsquo;&amp;quot;&amp;gt;&amp;amp;lsquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;lt;&amp;quot;&amp;gt;&amp;amp;lt;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;macr;&amp;quot;&amp;gt;&amp;amp;macr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;mdash;&amp;quot;&amp;gt;&amp;amp;mdash;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;micro;&amp;quot;&amp;gt;&amp;amp;micro;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;middot;&amp;quot;&amp;gt;&amp;amp;middot;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;minus;&amp;quot;&amp;gt;&amp;amp;minus;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Mu;&amp;quot;&amp;gt;&amp;amp;Mu;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;mu;&amp;quot;&amp;gt;&amp;amp;mu;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;nabla;&amp;quot;&amp;gt;&amp;amp;nabla;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;nbsp;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ndash;&amp;quot;&amp;gt;&amp;amp;ndash;&amp;lt;/span&amp;gt;&lt;br /&gt;
|- align=center&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ne;&amp;quot;&amp;gt;&amp;amp;ne;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ni;&amp;quot;&amp;gt;&amp;amp;ni;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;not;&amp;quot;&amp;gt;&amp;amp;not;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;notin;&amp;quot;&amp;gt;&amp;amp;notin;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;nsub;&amp;quot;&amp;gt;&amp;amp;nsub;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ntilde;&amp;quot;&amp;gt;&amp;amp;Ntilde;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ntilde;&amp;quot;&amp;gt;&amp;amp;ntilde;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Nu;&amp;quot;&amp;gt;&amp;amp;Nu;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;nu;&amp;quot;&amp;gt;&amp;amp;nu;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Oacute;&amp;quot;&amp;gt;&amp;amp;Oacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;oacute;&amp;quot;&amp;gt;&amp;amp;oacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ocirc;&amp;quot;&amp;gt;&amp;amp;Ocirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ocirc;&amp;quot;&amp;gt;&amp;amp;ocirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;OElig;&amp;quot;&amp;gt;&amp;amp;OElig;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;oelig;&amp;quot;&amp;gt;&amp;amp;oelig;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ograve;&amp;quot;&amp;gt;&amp;amp;Ograve;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ograve;&amp;quot;&amp;gt;&amp;amp;ograve;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;oline;&amp;quot;&amp;gt;&amp;amp;oline;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Omega;&amp;quot;&amp;gt;&amp;amp;Omega;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;omega;&amp;quot;&amp;gt;&amp;amp;omega;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Omicron;&amp;quot;&amp;gt;&amp;amp;Omicron;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;omicron;&amp;quot;&amp;gt;&amp;amp;omicron;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;oplus;&amp;quot;&amp;gt;&amp;amp;oplus;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;or;&amp;quot;&amp;gt;&amp;amp;or;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ordf;&amp;quot;&amp;gt;&amp;amp;ordf;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ordm;&amp;quot;&amp;gt;&amp;amp;ordm;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Oslash;&amp;quot;&amp;gt;&amp;amp;Oslash;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;oslash;&amp;quot;&amp;gt;&amp;amp;oslash;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Otilde;&amp;quot;&amp;gt;&amp;amp;Otilde;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;otilde;&amp;quot;&amp;gt;&amp;amp;otilde;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;otimes;&amp;quot;&amp;gt;&amp;amp;otimes;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ouml;&amp;quot;&amp;gt;&amp;amp;Ouml;&amp;lt;/span&amp;gt;&lt;br /&gt;
|- align=center&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ouml;&amp;quot;&amp;gt;&amp;amp;ouml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;para;&amp;quot;&amp;gt;&amp;amp;para;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;part;&amp;quot;&amp;gt;&amp;amp;part;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;permil;&amp;quot;&amp;gt;&amp;amp;permil;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;perp;&amp;quot;&amp;gt;&amp;amp;perp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Phi;&amp;quot;&amp;gt;&amp;amp;Phi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;phi;&amp;quot;&amp;gt;&amp;amp;phi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Pi;&amp;quot;&amp;gt;&amp;amp;Pi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;pi;&amp;quot;&amp;gt;&amp;amp;pi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;piv;&amp;quot;&amp;gt;&amp;amp;piv;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;plusmn;&amp;quot;&amp;gt;&amp;amp;plusmn;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;pound;&amp;quot;&amp;gt;&amp;amp;pound;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;prime;&amp;quot;&amp;gt;&amp;amp;prime;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Prime;&amp;quot;&amp;gt;&amp;amp;Prime;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;prod;&amp;quot;&amp;gt;&amp;amp;prod;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;prop;&amp;quot;&amp;gt;&amp;amp;prop;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Psi;&amp;quot;&amp;gt;&amp;amp;Psi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;psi;&amp;quot;&amp;gt;&amp;amp;psi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;quot;&amp;quot;&amp;gt;&amp;amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;radic;&amp;quot;&amp;gt;&amp;amp;radic;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rang;&amp;quot;&amp;gt;&amp;amp;rang;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;raquo;&amp;quot;&amp;gt;&amp;amp;raquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rarr;&amp;quot;&amp;gt;&amp;amp;rarr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rArr;&amp;quot;&amp;gt;&amp;amp;rArr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rceil;&amp;quot;&amp;gt;&amp;amp;rceil;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rdquo;&amp;quot;&amp;gt;&amp;amp;rdquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;real;&amp;quot;&amp;gt;&amp;amp;real;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;reg;&amp;quot;&amp;gt;&amp;amp;reg;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rfloor;&amp;quot;&amp;gt;&amp;amp;rfloor;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Rho;&amp;quot;&amp;gt;&amp;amp;Rho;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rho;&amp;quot;&amp;gt;&amp;amp;rho;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rlm;&amp;quot;&amp;gt;&amp;amp;rlm;&amp;lt;/span&amp;gt;&lt;br /&gt;
|- align=center&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rsaquo;&amp;quot;&amp;gt;&amp;amp;rsaquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;rsquo;&amp;quot;&amp;gt;&amp;amp;rsquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sbquo;&amp;quot;&amp;gt;&amp;amp;sbquo;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Scaron;&amp;quot;&amp;gt;&amp;amp;Scaron;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;scaron;&amp;quot;&amp;gt;&amp;amp;scaron;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sdot;&amp;quot;&amp;gt;&amp;amp;sdot;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sect;&amp;quot;&amp;gt;&amp;amp;sect;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;shy;&amp;quot;&amp;gt;&amp;amp;shy;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Sigma;&amp;quot;&amp;gt;&amp;amp;Sigma;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sigma;&amp;quot;&amp;gt;&amp;amp;sigma;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sigmaf;&amp;quot;&amp;gt;&amp;amp;sigmaf;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sim;&amp;quot;&amp;gt;&amp;amp;sim;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;spades;&amp;quot;&amp;gt;&amp;amp;spades;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sub;&amp;quot;&amp;gt;&amp;amp;sub;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sube;&amp;quot;&amp;gt;&amp;amp;sube;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sum;&amp;quot;&amp;gt;&amp;amp;sum;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sup;&amp;quot;&amp;gt;&amp;amp;sup;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sup1;&amp;quot;&amp;gt;&amp;amp;sup1;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sup2;&amp;quot;&amp;gt;&amp;amp;sup2;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;sup3;&amp;quot;&amp;gt;&amp;amp;sup3;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;supe;&amp;quot;&amp;gt;&amp;amp;supe;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;szlig;&amp;quot;&amp;gt;&amp;amp;szlig;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Tau;&amp;quot;&amp;gt;&amp;amp;Tau;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;tau;&amp;quot;&amp;gt;&amp;amp;tau;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;there4;&amp;quot;&amp;gt;&amp;amp;there4;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Theta;&amp;quot;&amp;gt;&amp;amp;Theta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;theta;&amp;quot;&amp;gt;&amp;amp;theta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;thetasym;&amp;quot;&amp;gt;&amp;amp;thetasym;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;thinsp;&amp;quot;&amp;gt;&amp;amp;thinsp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;THORN;&amp;quot;&amp;gt;&amp;amp;THORN;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;thorn;&amp;quot;&amp;gt;&amp;amp;thorn;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;tilde;&amp;quot;&amp;gt;&amp;amp;tilde;&amp;lt;/span&amp;gt;&lt;br /&gt;
|- align=center&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;times;&amp;quot;&amp;gt;&amp;amp;times;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;trade;&amp;quot;&amp;gt;&amp;amp;trade;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Uacute;&amp;quot;&amp;gt;&amp;amp;Uacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;uacute;&amp;quot;&amp;gt;&amp;amp;uacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;uarr;&amp;quot;&amp;gt;&amp;amp;uarr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;uArr;&amp;quot;&amp;gt;&amp;amp;uArr;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ucirc;&amp;quot;&amp;gt;&amp;amp;Ucirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ucirc;&amp;quot;&amp;gt;&amp;amp;ucirc;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Ugrave;&amp;quot;&amp;gt;&amp;amp;Ugrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;ugrave;&amp;quot;&amp;gt;&amp;amp;ugrave;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;uml;&amp;quot;&amp;gt;&amp;amp;uml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;upsih;&amp;quot;&amp;gt;&amp;amp;upsih;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Upsilon;&amp;quot;&amp;gt;&amp;amp;Upsilon;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;upsilon;&amp;quot;&amp;gt;&amp;amp;upsilon;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Uuml;&amp;quot;&amp;gt;&amp;amp;Uuml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;uuml;&amp;quot;&amp;gt;&amp;amp;uuml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;weierp;&amp;quot;&amp;gt;&amp;amp;weierp;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Xi;&amp;quot;&amp;gt;&amp;amp;Xi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;xi;&amp;quot;&amp;gt;&amp;amp;xi;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Yacute;&amp;quot;&amp;gt;&amp;amp;Yacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;yacute;&amp;quot;&amp;gt;&amp;amp;yacute;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;yen;&amp;quot;&amp;gt;&amp;amp;yen;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;yuml;&amp;quot;&amp;gt;&amp;amp;yuml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Yuml;&amp;quot;&amp;gt;&amp;amp;Yuml;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;Zeta;&amp;quot;&amp;gt;&amp;amp;Zeta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;zeta;&amp;quot;&amp;gt;&amp;amp;zeta;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;zwj;&amp;quot;&amp;gt;&amp;amp;zwj;&amp;lt;/span&amp;gt;&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;span title=&amp;quot;&amp;amp;amp;zwnj;&amp;quot;&amp;gt;&amp;amp;zwnj;&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Description&lt;br /&gt;
! width=40% | You type&lt;br /&gt;
! width=40% | You get&lt;br /&gt;
|-&lt;br /&gt;
| Copyright symbol&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;amp;copy;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
:::&#039;&#039;&#039;&amp;amp;copy;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Greek delta letter symbol&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;amp;delta;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
:::&#039;&#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Euro currency symbol&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;amp;euro;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
:::&#039;&#039;&#039;&amp;amp;euro;&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See the list of all HTML entities on the Wikipedia article [[w:List of HTML entities|List of HTML entities]]. Additionally, MediaWiki supports two non-standard entity reference sequences: &amp;lt;code&amp;gt;&amp;amp;amp;רלמ;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;amp;رلم;&amp;lt;/code&amp;gt; which are both considered equivalent to &amp;lt;code&amp;gt;&amp;amp;amp;rlm;&amp;lt;/code&amp;gt; which is a [[w:Right-to-left mark|right-to-left mark]]. (Used when combining right to left languages with left to right languages in the same page.)&lt;br /&gt;
&lt;br /&gt;
== HTML tags and symbol entities displayed themselves (with and without interpreting them) ==&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;&amp;amp;amp;amp;euro;&amp;lt;/tt&amp;gt; &amp;amp;nbsp;&amp;amp;rarr; &#039;&#039;&#039;&amp;amp;amp;euro;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;&amp;amp;lt;span style=&amp;quot;color: red; text-decoration: line-through;&amp;quot;&amp;gt;Typo to be corrected&amp;amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; &amp;amp;nbsp;&amp;amp;rarr; &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color: red; text-decoration: line-through;&amp;quot;&amp;gt;Typo to be corrected&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;&amp;amp;amp;lt;span style=&amp;quot;color: red; text-decoration: line-through;&amp;quot;&amp;gt;Typo to be corrected&amp;amp;amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; &amp;amp;nbsp;&amp;amp;rarr; &#039;&#039;&#039;&amp;amp;lt;span style=&amp;quot;color: red; text-decoration: line-through;&amp;quot;&amp;gt;Typo to be corrected&amp;amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Other formatting ==&lt;br /&gt;
&lt;br /&gt;
Beyond the text formatting markup shown above, here are some other formatting references:&lt;br /&gt;
&lt;br /&gt;
* [[Help:Links|Links]]&lt;br /&gt;
* [[Help:Images|Images]]&lt;br /&gt;
* [[Help:Tables|Tables]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Help|Formatting]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Help:Editing&amp;diff=6532</id>
		<title>Help:Editing</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Help:Editing&amp;diff=6532"/>
		<updated>2012-02-24T17:11:34Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Got sick of looking for formatting help only to be booted to a blank page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;;Editing&lt;br /&gt;
:[[Help:Editing pages|Editing pages]]&lt;br /&gt;
:[[Help:Starting a new page|Starting a new page]]&lt;br /&gt;
:[[Help:Formatting|Formatting]]&lt;br /&gt;
:[[Help:Links|Links]]&lt;br /&gt;
:[[Help:User page|User pages]]&lt;br /&gt;
:[[Help:Talk pages|Talk pages]]&lt;br /&gt;
;Advanced Editing&lt;br /&gt;
:[[Help:Images|Images]]&lt;br /&gt;
:[[Help:Tables|Tables]]&lt;br /&gt;
:[[Help:Categories|Categories]]&lt;br /&gt;
:[[Help:Templates|Templates]]&lt;br /&gt;
:[[Help:Variables|Variables]]&lt;br /&gt;
:[[Help:Managing files|Managing files]]&lt;br /&gt;
:[[Help:Moving a page|Moving a page]]&lt;br /&gt;
:[[Help:Redirects|Redirects]]&lt;br /&gt;
:[[Help:Deleting a page|Deleting a page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Help|Editing]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6531</id>
		<title>User Reference:gHIamp</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6531"/>
		<updated>2012-02-24T17:04:06Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The g.HIamp is a 256 channel amplifier from g.tec.  The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000. &lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gHIampSource&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
Rensselaer Polytechnic Institute&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
Version 0.9: August 2011&lt;br /&gt;
* Supports one g.HIamp&lt;br /&gt;
* Supports Filters&lt;br /&gt;
* Referencing by any channel&lt;br /&gt;
* Future compatible with g.HIamp master/slave configurations&lt;br /&gt;
* Using g.HIamp C API version 1.11.02&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 3472&lt;br /&gt;
*Tested under: 3763&lt;br /&gt;
*Known to compile under: 3798&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Acquires raw data from the g.HIamp.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Compile the gHIampSource module using [[Programming_Reference:Build_System#How_To_Build_Using_CMake|CMake and your compiler]].  The resulting gHIampSource.exe should be placed in the prog directory automatically.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
* &#039;&#039;&#039;SourceCh&#039;&#039;&#039; represents the total number of channels to be logged from the source module.&lt;br /&gt;
* &#039;&#039;&#039;SampleBlockSize&#039;&#039;&#039; should be set equal to the size of the sample block pulled from the device.&lt;br /&gt;
* &#039;&#039;&#039;SampleRate&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ChannelNames&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChOffset&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChGain&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;RefChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceBufferSize&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6530</id>
		<title>User Reference:gHIamp</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6530"/>
		<updated>2012-02-24T16:41:39Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Source Code Revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The g.HIamp is a 256 channel amplifier from g.tec.  The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000. &lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gHIampSource&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
Rensselaer Polytechnic Institute&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
Version 0.9: August 2011&lt;br /&gt;
* Supports one g.HIamp&lt;br /&gt;
* Supports Filters&lt;br /&gt;
* Referencing by any channel&lt;br /&gt;
* Future compatible with g.HIamp master/slave configurations&lt;br /&gt;
* Using g.HIamp C API version 1.11.02&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 3472&lt;br /&gt;
*Tested under: 3763&lt;br /&gt;
*Known to compile under: 3798&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Acquires raw data from the g.HIamp.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Compile the gHIampSource module using [[Programming_Reference:Build_System#How_To_Build_Using_CMake|CMake and your compiler]].  The resulting gHIampSource.exe should be placed in the prog directory automatically.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
* &#039;&#039;&#039;SourceCh&#039;&#039;&#039; &lt;br /&gt;
* &#039;&#039;&#039;SampleBlockSize&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SampleRate&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ChannelNames&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChOffset&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChGain&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;RefChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceBufferSize&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6529</id>
		<title>User Reference:gHIamp</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=User_Reference:gHIamp&amp;diff=6529"/>
		<updated>2012-02-24T16:36:08Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Started on Documentation for gHIampSource&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
The g.HIamp is a 256 channel amplifier from g.tec.  The contributed source module acquires raw signals from the amplifier in real time for use in BCI2000. &lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/gHIampSource&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
Rensselaer Polytechnic Institute&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
Version 0.9: August 2011&lt;br /&gt;
* Supports one g.HIamp&lt;br /&gt;
* Supports Filters&lt;br /&gt;
* Referencing by any channel&lt;br /&gt;
* Future compatible with g.HIamp master/slave configurations&lt;br /&gt;
* Using g.HIamp C API version 1.11.02&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Acquires raw data from the g.HIamp.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Compile the gHIampSource module using [[Programming_Reference:Build_System#How_To_Build_Using_CMake|CMake and your compiler]].  The resulting gHIampSource.exe should be placed in the prog directory automatically.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
* &#039;&#039;&#039;SourceCh&#039;&#039;&#039; &lt;br /&gt;
* &#039;&#039;&#039;SampleBlockSize&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SampleRate&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ChannelNames&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChOffset&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChGain&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDMaster&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;DeviceIDs&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;RefChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceChList&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;FilterType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchEnabled&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchHighPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchLowPass&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchModelOrder&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;NotchType&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;SourceBufferSize&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:ADCs&amp;diff=6528</id>
		<title>Contributions:ADCs</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:ADCs&amp;diff=6528"/>
		<updated>2012-02-24T15:24:29Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: Added a link to gHIamp documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following data acquisition filters are available in the [[Contributions:Contents|Contributions]] section of BCI2000:&lt;br /&gt;
&lt;br /&gt;
*[[Contributions:AmpServerProADC]]: Interface to the EGI AmpServerPro.&lt;br /&gt;
*[[Contributions:BioRadioADC]]: Interface to the BioRadio amplifer.&lt;br /&gt;
*[[Contributions:Biosemi2ADC]]: Interface to the Biosemi amplifier.&lt;br /&gt;
*[[Contributions:B-Alert]]: Interface to B-Alert brain monitoring systems.&lt;br /&gt;
*[[Contributions:DAS_ADC]]: Interface to MeasurementComputing AD cards.&lt;br /&gt;
*[[Contributions:DTADC]]: Interface to Data Translation boards.&lt;br /&gt;
*[[Contributions:Emotiv]]: Interface to the Emotiv EPOC.&lt;br /&gt;
*[[Contributions:FieldTripBufferSource]]: Interface to the FieldTrip buffer.&lt;br /&gt;
*[[Contributions:FilePlayback]]: A source module that replays sessions from recorded data files.&lt;br /&gt;
*[[Contributions:gHIamp]]: Interface to the gHIamp.&lt;br /&gt;
*[[Contributions:MicromedADC]]: Interface to the Micromed EEG system.&lt;br /&gt;
*[[Contributions:ModularEEG]]: Interface to the ModularEEG system.&lt;br /&gt;
*[[Contributions:Neuralynx]]: Interface to Neuralynx systems&lt;br /&gt;
*[[Contributions:NIADC]]: Interface to National Instruments boards.&lt;br /&gt;
*[[Contributions:NIDAQ-MX]]: Interface to National Instruments boards using the MX driver.&lt;br /&gt;
*[[Contributions:NIDAQLogger]]: Interface to multiple National Instruments DAQ boards using MX driver (INPUT ONLY).&lt;br /&gt;
*[[Contributions:NIDAQFilter]]: Interface to multiple National Instruments DAQ boards using MX driver (OUTPUT ONLY).&lt;br /&gt;
*[[Contributions:NeuroscanADC]]: Neuroscan Acquire socket protocol client.&lt;br /&gt;
*[[Contributions:NeuroscanAccessSDK]]: Interface to Neuroscan Direct Access SDK.&lt;br /&gt;
*[[Contributions:NeuroSky]]: Interface to Neurosky MindSet.&lt;br /&gt;
*[[Contributions:NicoletOne]]: Interface to NicoletOne nEEG series amplifiers.&lt;br /&gt;
*[[Contributions:ctfneurod]]: CTF RealTime to Neuroscan Acquire relay.&lt;br /&gt;
*[[Contributions:RDAClientADC]]: Brain Vision RDA socket protocol client.&lt;br /&gt;
*[[Contributions:TDTADC]]: Interface to Tucker-Davis Pentusa systems.&lt;br /&gt;
*[[Contributions:TMSiADC]]: Interface to TMSi Refa and Porti systems.&lt;br /&gt;
*[[Contributions:vAmpADC]]: Interface to Brain Products V-amp systems.&lt;br /&gt;
*[[Contributions:EnobioADC]]: Interface to Enobio sensor.&lt;br /&gt;
*[[Contributions:MicRecorderFilter]]: Interface to the system soundcard, logging audio input.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:How to use a Contributed Source Module]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:NeuroSky&amp;diff=6490</id>
		<title>Contributions:NeuroSky</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:NeuroSky&amp;diff=6490"/>
		<updated>2012-02-07T14:08:08Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
NeuroSky Mindset Acquisition Module&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
As of binary release of 3.0.4, the module will erroneously report that COM port baud rate must be set to 57600.  Regardless of what it says, &#039;&#039;&#039;ensure your baud rate is set to 9600&#039;&#039;&#039;.  This has been fixed in HEAD&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/NeuroSky&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Acquires signal data from the NeuroSky Mindset. Device must first be connected and paired via Bluetooth.&lt;br /&gt;
&lt;br /&gt;
Note:  Current module only works with the single channel Mindset device.  A future version (June 2011) will include support for newer NeuroSky devices.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Copy the Thinkgear.dll to the prog directory for the module to work.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
* The device has one channel, so &#039;&#039;&#039;SourceCh&#039;&#039;&#039; must be set to 1.&lt;br /&gt;
* The device&#039;s sampling rate is 512Hz, so the &#039;&#039;&#039;SamplingRate&#039;&#039;&#039; parameter must be set to 512.&lt;br /&gt;
* Ideally, the device has no DC offset, so &#039;&#039;&#039;SourceChOffset&#039;&#039;&#039; should be set to 0&lt;br /&gt;
* &#039;&#039;&#039;SourceChGain&#039;&#039;&#039; must be set to the Neurosky&#039;s actual conversion factor: 0.2197. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;COMPort&#039;&#039;&#039; is an enumerated parameter which allows you to select which COM port the device resides on.  This can be found by looking through your bluetooth settings.  It is also possible to set the COM port to a lower number, if the default COM port is over 16.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
States regarding signal quality are in the works.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:NeuroSky&amp;diff=6489</id>
		<title>Contributions:NeuroSky</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:NeuroSky&amp;diff=6489"/>
		<updated>2012-02-07T14:06:23Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
NeuroSky Mindset Acquisition Module&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
As of binary release of 3.0.4, the module will erroneously report that COM port baud rate must be set to 57600.  Regardless of what it says, ensure your baud rate is set to 9600.  This has been fixed in HEAD&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/SignalSource/NeuroSky&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com)&lt;br /&gt;
&lt;br /&gt;
===Version History===&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
Acquires signal data from the NeuroSky Mindset. Device must first be connected and paired via Bluetooth.&lt;br /&gt;
&lt;br /&gt;
Note:  Current module only works with the single channel Mindset device.  A future version (June 2011) will include support for newer NeuroSky devices.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Copy the Thinkgear.dll to the prog directory for the module to work.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
* The device has one channel, so &#039;&#039;&#039;SourceCh&#039;&#039;&#039; must be set to 1.&lt;br /&gt;
* The device&#039;s sampling rate is 512Hz, so the &#039;&#039;&#039;SamplingRate&#039;&#039;&#039; parameter must be set to 512.&lt;br /&gt;
* Ideally, the device has no DC offset, so &#039;&#039;&#039;SourceChOffset&#039;&#039;&#039; should be set to 0&lt;br /&gt;
* &#039;&#039;&#039;SourceChGain&#039;&#039;&#039; must be set to the Neurosky&#039;s actual conversion factor: 0.2197. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;COMPort&#039;&#039;&#039; is an enumerated parameter which allows you to select which COM port the device resides on.  This can be found by looking through your bluetooth settings.  It is also possible to set the COM port to a lower number, if the default COM port is over 16.&lt;br /&gt;
&lt;br /&gt;
==States==&lt;br /&gt;
States regarding signal quality are in the works.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Filters]], [[Contributions:ADCs]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Data Acquisition]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:GazeMonitorFilter&amp;diff=6211</id>
		<title>Contributions:GazeMonitorFilter</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:GazeMonitorFilter&amp;diff=6211"/>
		<updated>2011-07-19T15:58:17Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Parameters */ New image size parameter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
An application filter which greatly eases using the [[Contributions:EyetrackerLogger|EyetrackerLogger]] extension which is capable of visualizing eye tracker states in real time, manages fixation enforcement, and provides functionality for re-alignment of the subject.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/GazeMonitorFilter&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Griffin Milsap (griffin.milsap@gmail.com).&lt;br /&gt;
===Version History===&lt;br /&gt;
07/08/2011: Initial release&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
*Initial development: 3389&lt;br /&gt;
*Tested under: 3389&lt;br /&gt;
*Known to compile under: 3389&lt;br /&gt;
*Broken since: --&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
GazeMonitorFilter is a &amp;quot;drop-in&amp;quot; application module extension which automatically performs tasks commonly associated with using an eye tracker.  It has been designed for use with the [[Contributions:EyetrackerLogger|EyetrackerLogger]] extension.  When added into an application module, the GazeMonitorFilter is capable of drawing to the application window or in a layer on top of the application visualization screen.  &lt;br /&gt;
&lt;br /&gt;
===Fixation Management===&lt;br /&gt;
Even without eyetracker states, the GazeMonitorFilter is capable of drawing fixation images on the screen, but with Eyetracker&amp;lt;Left/Right&amp;gt;EyeGaze&amp;lt;X/Y&amp;gt; states, GazeMonitorFilter is capable of enforcing this fixation and setting the &amp;lt;code&amp;gt;FixationViolated&amp;lt;/code&amp;gt; state which indicates violation of the fixation should it occur.  The fixation is entirely parameterized and allows for detailed configuration of fixation management.&lt;br /&gt;
&lt;br /&gt;
===Visualization===&lt;br /&gt;
GazeMonitorFilter is also capable of drawing a visualization of eye position (if it&#039;s logged) and gaze location (if it&#039;s logged) to the application window visualization screen.  This enables the experimenter to monitor the eye tracker states visually in realtime for early detection (and later correction) of acquiring poor gaze data.&lt;br /&gt;
&lt;br /&gt;
===Subject Correction===&lt;br /&gt;
With many eye trackers, accuracy diminishes as gaze diverts from the center of the screen.  Even if the eye tracker is well calibrated, a sizable difference can exist between where the subject is actually looking and where the eye tracker gaze data reports the subject is looking.  With Tobii eye trackers, this was seen more prominently as the subject&#039;s head changed position or orientation.  GazeMonitorFilter provides functionality for giving the subject visual feedback and prompts which direct the subject to move back to the position they calibrated in.&lt;br /&gt;
&lt;br /&gt;
If asked nicely, the GazeMonitorFilter may also brew you a cup of coffee. &lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your application modules by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_GAZEMONITORFILTER&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The GazeMonitorFilter is configured in the Application tab within the GazeMonitor section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;VisualizeGazeMonitorFilter&amp;lt;/code&amp;gt;  - Enables/Disables visualization of eye tracker states on the application visualization window&lt;br /&gt;
*&amp;lt;code&amp;gt;EnforceFixation&amp;lt;/code&amp;gt; - Enables/Disables fixation management.&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationX&amp;lt;/code&amp;gt;  - Expression which defines requested fixation location X coordinate. (0.0 - 1.0)&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationY&amp;lt;/code&amp;gt; - Expression which defines requested fixation location Y coordinate. (0.0 - 1.0)&lt;br /&gt;
*&amp;lt;code&amp;gt;BlinkTime&amp;lt;/code&amp;gt; - The amount of time allowed for which eye states reported by [[Contributions:EyetrackerLogger|EyetrackerLogger]] can remain &amp;quot;invalid&amp;quot; before fixation has been violated.&lt;br /&gt;
*&amp;lt;code&amp;gt;SaccadeTime&amp;lt;/code&amp;gt; - The amount of time allowed for which valid gaze data reported by [[Contributions:EyetrackerLogger|EyetrackerLogger]] can exist outside of the designated fixation before fixation has been violated.&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationRadius&amp;lt;/code&amp;gt; - The maximum distance from the center of fixation (FixationX, FixationY) from which the gaze data can deviate without violating fixation.&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationImage&amp;lt;/code&amp;gt; - The image displayed at the center of fixation while fixation is not violated.&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationViolationImage&amp;lt;/code&amp;gt; - The image displayed at the center of fixation while fixation is violated.&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationImageSize&amp;lt;/code&amp;gt; - The fixation image size in percentage of the screen height&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationViolationSound&amp;lt;/code&amp;gt; - The sound played every time fixation has just been violated.&lt;br /&gt;
*&amp;lt;code&amp;gt;LogGazeInformation&amp;lt;/code&amp;gt; - Log information about eye validity and fixation enforcement to the ApplicationLog.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
*For &amp;lt;code&amp;gt;FixationX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;FixationY&amp;lt;/code&amp;gt;, the top left corner of the screen is (0.0, 0.0) and the bottom right corner of the screen is (1.0, 1.0)&lt;br /&gt;
*Specifying large images for &amp;lt;code&amp;gt;FixationImage&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;FixationViolationImage&amp;lt;/code&amp;gt; is not recommended as it may have a detrimental impact on overall system timing.&lt;br /&gt;
*If either of the timing parameters (&amp;lt;code&amp;gt;BlinkTime&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SaccadeTime&amp;lt;/code&amp;gt;) trigger a fixation violation, fixation violation will not occur again when the other timing parameter triggers if fixation has not been acquired again. (Example: One second is allotted for &amp;lt;code&amp;gt;BlinkTime&amp;lt;/code&amp;gt; and 4 seconds is allotted for &amp;lt;code&amp;gt;SaccadeTime&amp;lt;/code&amp;gt;. Gaze moves outside of fixation and eyes close immediately thereafter and remain closed.  &amp;lt;code&amp;gt;FixationViolated&amp;lt;/code&amp;gt; is set after one second of the eyes being closed, and is not thrown again when the four seconds of gaze existing outside the allowed fixation radius elapse.)&lt;br /&gt;
*A Fixation image can be drawn when there is no gaze data available to enforce the fixation.  That said, FixationViolationImage, FixationViolationSound are not ever presented and the fixation timing and radius parameters remain unused due to lack of ability to determine if fixation has indeed been violated.&lt;br /&gt;
*Real time visualization of gaze data on the application visualization screen is controlled by the &amp;lt;code&amp;gt;VisualizeGazeMonitorFilter&amp;lt;/code&amp;gt; parameter declared by GazeMonitorFilter and the &amp;lt;code&amp;gt;AppWindow&amp;lt;Spatial/Temporal&amp;gt;Decimation&amp;lt;/code&amp;gt; parameters declared by the ApplicationWindow class.  Control the performance of your system by decimating how often and how large GazeMonitorFilter visualization updates are.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
*&amp;lt;code&amp;gt;FixationViolated&amp;lt;/code&amp;gt; - This state is set to &amp;quot;1&amp;quot; when the GazeMonitorFilter has determined that fixation is violated and is set back to 0 when fixation is acquired again.&lt;br /&gt;
*&amp;lt;code&amp;gt;GazeCorrectionMode&amp;lt;/code&amp;gt; - This state is monitored by GazeMonitorFilter.  When this state is set to &amp;quot;1&amp;quot;, GazeMonitorFilter will perform the gaze correction procedure.  When the procedure has completed, the state is set by GazeMonitorFilter back to 0.&lt;br /&gt;
&lt;br /&gt;
==Gaze Correction Mode==&lt;br /&gt;
Gaze correction mode is initiated by setting the state &amp;lt;code&amp;gt;GazeCorrectionMode&amp;lt;/code&amp;gt; to &amp;quot;1&amp;quot;.  GazeMonitorFilter will then perform the gaze correction procedure and set the state back to &amp;quot;0&amp;quot; when the procedure has concluded.&lt;br /&gt;
&lt;br /&gt;
During the procedure, a prompt will be displayed to the subject on the application window at their current gaze location.  The prompt position is &amp;quot;smoothed&amp;quot; to increase readability of the prompt and is not an accurate representation of where the subject&#039;s gaze is located at any particular frame.  &lt;br /&gt;
&lt;br /&gt;
===Gaze Correction Procedure=== &lt;br /&gt;
#Subject is prompted to &amp;quot;Fixate&amp;quot;.  The subject will need to move his/her gaze into the fixation position/radius in order to continue in the procedure.&lt;br /&gt;
#Subject is prompted to move &amp;quot;Closer&amp;quot; to the screen or &amp;quot;Further&amp;quot; from the screen.  The subject will need to move his/her eyes to between 550mm and 600mm away from the screen in order to continue in the procedure. Once the subject is fixated and at the correct distance from the screen, the fixation radius indicator will turn green.&lt;br /&gt;
#Subject must hold this position for four seconds.  After four seconds (and a visual count down prompt) the procedure will be complete and the &amp;lt;code&amp;gt;GazeCorrectionMode&amp;lt;/code&amp;gt; will be set back to &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Note -- Eye position data is displayed to the experimenter through the application visualization window through the use of the &amp;lt;code&amp;gt;VisualizeGazeMonitorFilter&amp;lt;/code&amp;gt; parameter if and only if eye position data is being logged.  If the subject calibrated with their eyes centered in the eye tracker&#039;s cameras, the experimenter can re-position the subject&#039;s head during this procedure based on the feedback provided by the application visualization window.  This eye position data was not included explicitly as part of the gaze correction procedure for ease of use.&lt;br /&gt;
&lt;br /&gt;
==Integration of GazeMonitorFilter Capabilities==&lt;br /&gt;
If you wish for your task to interact with the GazeMonitorFilter, you may need to make a few small source code modifications to your task.&lt;br /&gt;
&lt;br /&gt;
===Triggering Gaze Correction Mode from Within a Task===&lt;br /&gt;
Integration of gaze correction mode into a task consists of setting the GazeCorrectionMode state to &amp;quot;1&amp;quot; if it exists, and waiting for the state to be set back to &amp;quot;0&amp;quot; before continuing with the run.  This is done as follows:&lt;br /&gt;
&lt;br /&gt;
*Check for the existence of the GazeCorrectionMode state in &amp;lt;code&amp;gt;Preflight()&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void&lt;br /&gt;
MyTask::Preflight( const SignalProperties&amp;amp;, SignalProperties&amp;amp; ) const&lt;br /&gt;
{&lt;br /&gt;
  ...&lt;br /&gt;
  OptionalState( &amp;quot;GazeCorrectionMode&amp;quot; );&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To turn on gaze correction mode&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( States-&amp;gt;Exists( &amp;quot;GazeCorrectionMode&amp;quot; ) )&lt;br /&gt;
{&lt;br /&gt;
  State( &amp;quot;GazeCorrectionMode&amp;quot; ) = 1;&lt;br /&gt;
  // Disable drawing of your stimuli in here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To wait for gaze correction mode to complete&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void&lt;br /&gt;
MyTask::Process( const GenericSignal&amp;amp;, GenericSignal&amp;amp; )&lt;br /&gt;
{&lt;br /&gt;
  ...&lt;br /&gt;
  if( !OptionalState( &amp;quot;GazeCorrectionMode&amp;quot;, 0 ) )&lt;br /&gt;
  {&lt;br /&gt;
    // Update stimuli and continue performing task related things&lt;br /&gt;
  }&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Triggering Gaze Correction Mode Manually===&lt;br /&gt;
The BCI2000 Operator provides &amp;quot;function&amp;quot; buttons which can be scripted to modify the environment.  The following changes are necessary to set one of the &amp;quot;function&amp;quot; buttons to modify the &amp;lt;code&amp;gt;GazeCorrectionMode&amp;lt;/code&amp;gt; state in order to allow the experimenter to trigger this mode at will:&lt;br /&gt;
&lt;br /&gt;
*Open Operator.exe&lt;br /&gt;
*File-&amp;gt;Preferences&lt;br /&gt;
*In the &amp;quot;Function Buttons&amp;quot; choose a button to modify and set the Name to &amp;quot;Correction&amp;quot; and the command to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SET STATE GazeCorrectionMode 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reacting to Fixation Violation Within a Task===&lt;br /&gt;
It may be the case that you want your task to react to a fixation violation event; for example, you may end a trial if fixation has been violated.  To do this, make the following changes in your task&#039;s source code:&lt;br /&gt;
&lt;br /&gt;
*Check for the existence of the &amp;lt;code&amp;gt;FixationViolated&amp;lt;/code&amp;gt; state in &amp;lt;code&amp;gt;Preflight()&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void&lt;br /&gt;
MyTask::Preflight( const SignalProperties&amp;amp;, SignalProperties&amp;amp; ) const&lt;br /&gt;
{&lt;br /&gt;
  ...&lt;br /&gt;
  OptionalState( &amp;quot;FixationViolated&amp;quot; );&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Read the state this way wherever you need to react to it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( OptionalState( &amp;quot;FixationViolated&amp;quot;, 0 ) )&lt;br /&gt;
{&lt;br /&gt;
  // React to the fixation being violated&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Contributions:EyetrackerLogger]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:Events&amp;diff=6210</id>
		<title>Programming Reference:Events</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:Events&amp;diff=6210"/>
		<updated>2011-07-13T16:57:28Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to record asynchronous information (&amp;quot;events&amp;quot;) along with brain signal data. This usage of the term &amp;quot;event&amp;quot; is unrelated to &amp;quot;events&amp;quot; as part of [[Programming Reference:Contents#Programming_Interface_Documentation|BCI2000 API class interfaces]].&lt;br /&gt;
&lt;br /&gt;
As data are recorded by data acquisition hardware in chunks, BCI2000 processes them synchronously.&lt;br /&gt;
Still, recording information that is asynchronous to brain signal data acquisition may be of interest to an experimenter. Typically, mouse or keyboard input may be of interest to record in an experiment, and ideally should provide a temporal resolution that corresponds to the brain signal&#039;s sampling rate.&lt;br /&gt;
&lt;br /&gt;
==Concept==&lt;br /&gt;
In the BCI2000 programming API, asynchronous information may be represented as &#039;&#039;Events&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Here, an &#039;&#039;Event&#039;&#039; is an object that &lt;br /&gt;
*consists of two elements: a string descriptor and a time stamp, and &lt;br /&gt;
*is recorded in a data file together with brain signals.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
In the current version of BCI2000, events are mapped to [[BCI2000 Glossary#State|state variables]]. By comparing an event&#039;s time stamp to data acquisition time stamps, it is possible to associate events with single samples, and to map an event to a change in a state variable&#039;s value.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
*Time stamps have millisecond resolution. Up to sampling rates of 1kHz, this is not a practical restriction though.&lt;br /&gt;
*Association of event time stamps with sample positions cannot be more accurate than [[User Reference:Timing|time stamps assigned to data blocks]] by the data acquisition module. If data transmission latency between data acquisition hardware, and its associated jitter, are large compared to a single sample&#039;s duration, then event positions cannot be expected to be precise. Still, for data acquisition devices that are connected directly to the machine running the data acquisition module (i.e., not over a network connection), and for sampling rates below 1kHz, transmission latency and jitter may be expected to be below a sample&#039;s duration.&lt;br /&gt;
*Event time stamps must refer to the same physical time base that is used to stamp acquired data packets. This limits the use of events to BCI2000 modules that run on the same machine as the data acquisition module. While the event API is available to all BCI2000 modules, it is advisable to use events in data acquisition modules only, thereby ensuring correct operation also in situations where processing modules are distributed across multiple machines in a network.&lt;br /&gt;
*The &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; asynchronous stream interface should only be called between &amp;quot;StartRun&amp;quot; and &amp;quot;StopRun&amp;quot;.  Logging events with &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; outside of a run could result in delayed state logging through the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; interface.&lt;br /&gt;
&lt;br /&gt;
==Event API==&lt;br /&gt;
When including the &amp;lt;tt&amp;gt;src/shared/accessors/BCIEvent.h&amp;lt;/tt&amp;gt; header file into a source code file, a symbol &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; will be available.&lt;br /&gt;
The &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; symbol behaves like a &amp;lt;tt&amp;gt;std::ostream&amp;lt;/tt&amp;gt;; writing to that stream creates an event, fills it descriptor with whatever has been written into the stream, and stamps the event with the current time.&lt;br /&gt;
The &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; symbol&#039;s &amp;lt;tt&amp;gt;ostream&amp;lt;/tt&amp;gt; behavior makes it convenient to include numeric information into the event&#039;s string descriptor.&lt;br /&gt;
To allow for true asynchrony, BCI2000 events may be issued from any thread within a BCI2000 module, i.e. the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; interface is thread-safe.&lt;br /&gt;
&lt;br /&gt;
==Descriptor Syntax==&lt;br /&gt;
An event descriptor consists of a name, a value, and optionally a duration, with data fields being separated with white space:&lt;br /&gt;
 &amp;lt;name&amp;gt; &amp;lt;value&amp;gt; [&amp;lt;duration&amp;gt;]&lt;br /&gt;
Currently, events are mapped to state variables, so the following restrictions apply:&lt;br /&gt;
*The name field must match the name of a state variable, and that state variable must exist in the system before it appears in an event.&lt;br /&gt;
*The value field must specify an unsigned integer value that &amp;quot;fits into&amp;quot; the number of bits reserved for the corresponding state variable.&lt;br /&gt;
*Currently, the duration must either be omitted, or 0. When mapping the event to a state variable, a duration of 0 means that the state variable is set to the specified value for a single sample only, and to zero for subsequent samples. A non-specified duration means that the state variable is changed, and keeps its value for subsequent samples.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
In this example, an event &amp;quot;MyEvent&amp;quot; will be created, its value field set to &amp;lt;tt&amp;gt;currentValue&amp;lt;/tt&amp;gt;, and its duration field empty.&lt;br /&gt;
Please note that the name is followed with a space character separating name and value.&lt;br /&gt;
The event will be time stamped either when the stream is flushed explicitly, as indicated for the &amp;quot;AnotherEvent&amp;quot; event, or when the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; object goes out of scope, as indicated for the &amp;quot;MyEvent&amp;quot; event. Unless there is time-consuming code between the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; statement, and the next closing brace, there is no need to explicitly flush the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; stream object.&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;BCIEvent.h&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
 using namespace std;&lt;br /&gt;
 ...&lt;br /&gt;
 {&lt;br /&gt;
   int currentValue;&lt;br /&gt;
   ...&lt;br /&gt;
   bcievent &amp;lt;&amp;lt; &amp;quot;MyEvent &amp;quot; &amp;lt;&amp;lt; currentValue; &lt;br /&gt;
   bcievent &amp;lt;&amp;lt; &amp;quot;AnotherEvent &amp;quot; &amp;lt;&amp;lt; currentValue &amp;lt;&amp;lt; flush; // AnotherEvent is time stamped here&lt;br /&gt;
   ...&lt;br /&gt;
  } // MyEvent is time stamped here&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Programming Reference:Environment Class]], [[Technical Reference:State Definition]], [[Programming Tutorial:Implementing an Input Logger]]&lt;br /&gt;
&lt;br /&gt;
Events are used to implement keyboard, mouse, and joystick logging: [[User Reference:Logging Input]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Data Acquisition]] [[Category:Framework API]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:Events&amp;diff=6209</id>
		<title>Programming Reference:Events</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:Events&amp;diff=6209"/>
		<updated>2011-07-13T16:55:30Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to record asynchronous information (&amp;quot;events&amp;quot;) along with brain signal data. This usage of the term &amp;quot;event&amp;quot; is unrelated to &amp;quot;events&amp;quot; as part of [[Programming Reference:Contents#Programming_Interface_Documentation|BCI2000 API class interfaces]].&lt;br /&gt;
&lt;br /&gt;
As data are recorded by data acquisition hardware in chunks, BCI2000 processes them synchronously.&lt;br /&gt;
Still, recording information that is asynchronous to brain signal data acquisition may be of interest to an experimenter. Typically, mouse or keyboard input may be of interest to record in an experiment, and ideally should provide a temporal resolution that corresponds to the brain signal&#039;s sampling rate.&lt;br /&gt;
&lt;br /&gt;
==Concept==&lt;br /&gt;
In the BCI2000 programming API, asynchronous information may be represented as &#039;&#039;Events&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Here, an &#039;&#039;Event&#039;&#039; is an object that &lt;br /&gt;
*consists of two elements: a string descriptor and a time stamp, and &lt;br /&gt;
*is recorded in a data file together with brain signals.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
In the current version of BCI2000, events are mapped to [[BCI2000 Glossary#State|state variables]]. By comparing an event&#039;s time stamp to data acquisition time stamps, it is possible to associate events with single samples, and to map an event to a change in a state variable&#039;s value.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
*Time stamps have millisecond resolution. Up to sampling rates of 1kHz, this is not a practical restriction though.&lt;br /&gt;
*Association of event time stamps with sample positions cannot be more accurate than [[User Reference:Timing|time stamps assigned to data blocks]] by the data acquisition module. If data transmission latency between data acquisition hardware, and its associated jitter, are large compared to a single sample&#039;s duration, then event positions cannot be expected to be precise. Still, for data acquisition devices that are connected directly to the machine running the data acquisition module (i.e., not over a network connection), and for sampling rates below 1kHz, transmission latency and jitter may be expected to be below a sample&#039;s duration.&lt;br /&gt;
*Event time stamps must refer to the same physical time base that is used to stamp acquired data packets. This limits the use of events to BCI2000 modules that run on the same machine as the data acquisition module. While the event API is available to all BCI2000 modules, it is advisable to use events in data acquisition modules only, thereby ensuring correct operation also in situations where processing modules are distributed across multiple machines in a network.&lt;br /&gt;
*The &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; asynchronous stream interface should only be called between &amp;quot;StartRun&amp;quot; and &amp;quot;StopRun&amp;quot;.  Logging events with bcievent outside of a run could result in delayed state logging through the bcievent interface.&lt;br /&gt;
&lt;br /&gt;
==Event API==&lt;br /&gt;
When including the &amp;lt;tt&amp;gt;src/shared/accessors/BCIEvent.h&amp;lt;/tt&amp;gt; header file into a source code file, a symbol &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; will be available.&lt;br /&gt;
The &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; symbol behaves like a &amp;lt;tt&amp;gt;std::ostream&amp;lt;/tt&amp;gt;; writing to that stream creates an event, fills it descriptor with whatever has been written into the stream, and stamps the event with the current time.&lt;br /&gt;
The &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; symbol&#039;s &amp;lt;tt&amp;gt;ostream&amp;lt;/tt&amp;gt; behavior makes it convenient to include numeric information into the event&#039;s string descriptor.&lt;br /&gt;
To allow for true asynchrony, BCI2000 events may be issued from any thread within a BCI2000 module, i.e. the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; interface is thread-safe.&lt;br /&gt;
&lt;br /&gt;
==Descriptor Syntax==&lt;br /&gt;
An event descriptor consists of a name, a value, and optionally a duration, with data fields being separated with white space:&lt;br /&gt;
 &amp;lt;name&amp;gt; &amp;lt;value&amp;gt; [&amp;lt;duration&amp;gt;]&lt;br /&gt;
Currently, events are mapped to state variables, so the following restrictions apply:&lt;br /&gt;
*The name field must match the name of a state variable, and that state variable must exist in the system before it appears in an event.&lt;br /&gt;
*The value field must specify an unsigned integer value that &amp;quot;fits into&amp;quot; the number of bits reserved for the corresponding state variable.&lt;br /&gt;
*Currently, the duration must either be omitted, or 0. When mapping the event to a state variable, a duration of 0 means that the state variable is set to the specified value for a single sample only, and to zero for subsequent samples. A non-specified duration means that the state variable is changed, and keeps its value for subsequent samples.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
In this example, an event &amp;quot;MyEvent&amp;quot; will be created, its value field set to &amp;lt;tt&amp;gt;currentValue&amp;lt;/tt&amp;gt;, and its duration field empty.&lt;br /&gt;
Please note that the name is followed with a space character separating name and value.&lt;br /&gt;
The event will be time stamped either when the stream is flushed explicitly, as indicated for the &amp;quot;AnotherEvent&amp;quot; event, or when the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; object goes out of scope, as indicated for the &amp;quot;MyEvent&amp;quot; event. Unless there is time-consuming code between the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; statement, and the next closing brace, there is no need to explicitly flush the &amp;lt;tt&amp;gt;bcievent&amp;lt;/tt&amp;gt; stream object.&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;BCIEvent.h&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
 using namespace std;&lt;br /&gt;
 ...&lt;br /&gt;
 {&lt;br /&gt;
   int currentValue;&lt;br /&gt;
   ...&lt;br /&gt;
   bcievent &amp;lt;&amp;lt; &amp;quot;MyEvent &amp;quot; &amp;lt;&amp;lt; currentValue; &lt;br /&gt;
   bcievent &amp;lt;&amp;lt; &amp;quot;AnotherEvent &amp;quot; &amp;lt;&amp;lt; currentValue &amp;lt;&amp;lt; flush; // AnotherEvent is time stamped here&lt;br /&gt;
   ...&lt;br /&gt;
  } // MyEvent is time stamped here&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Programming Reference:Environment Class]], [[Technical Reference:State Definition]], [[Programming Tutorial:Implementing an Input Logger]]&lt;br /&gt;
&lt;br /&gt;
Events are used to implement keyboard, mouse, and joystick logging: [[User Reference:Logging Input]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Data Acquisition]] [[Category:Framework API]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Contributions:WebcamLogger&amp;diff=6208</id>
		<title>Contributions:WebcamLogger</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Contributions:WebcamLogger&amp;diff=6208"/>
		<updated>2011-07-13T16:48:48Z</updated>

		<summary type="html">&lt;p&gt;Gmilsap: /* Version History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Synopsis==&lt;br /&gt;
A filter that records video recorded from a webcam to an avi file, and stores the frame number in a State variable.&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
http://{{SERVERNAME}}/svn/trunk/src/contrib/Extensions/WebcamLogger&lt;br /&gt;
&lt;br /&gt;
==Versioning==&lt;br /&gt;
===Authors===&lt;br /&gt;
Adam Wilson (adam.wilson@uc.edu)&lt;br /&gt;
===Version History===&lt;br /&gt;
07/06/11 - Full commit with support for MSVC and MinGW.&lt;br /&gt;
&lt;br /&gt;
07/13/11 - Bugfixes&lt;br /&gt;
&lt;br /&gt;
===Source Code Revisions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Todo===&lt;br /&gt;
* Add geometry decimation (e.g., save other than 320x240).&lt;br /&gt;
&lt;br /&gt;
==Functional Description==&lt;br /&gt;
For many experiments, visual information about how a subject is behaving during an experiment is desired. This extension acquires video from most webcams, and writes to an AVI video file. It also records the current frame number as a state variable, so that the video can be synchronized with brain data with a resolution of the block size. Other options include the ability to overlay the date and time directly on the video (useful for long-term monitoring), and time decimation (i.e., save every Nth frame).&lt;br /&gt;
&lt;br /&gt;
PROTIP: This module can also be used to perform screen capture with the proper virtual screencast webcam driver.  Dubious website, but this product works well: http://www.pcwinsoft.com/screencamera/landing.asp&lt;br /&gt;
&lt;br /&gt;
==Integration into BCI2000==&lt;br /&gt;
Compile the extension into your source module by enabling contributed extensions in your CMake configuration.  You can do this by going into your root build folder and deleting &amp;lt;code&amp;gt;CMakeCache.txt&amp;lt;/code&amp;gt; and re-running the project batch file, or by running &amp;lt;code&amp;gt;cmake -i&amp;lt;/code&amp;gt; and enabling &#039;&#039;&#039;BUILD_WEBCAMLOGGER&#039;&#039;&#039;.  Once the extension is built into the source module, enable it by starting the source module with the &amp;lt;code&amp;gt;--LogWebcam=1&amp;lt;/code&amp;gt; command line argument.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
The webcam should be installed and configured per the device instructions. The Webcam logger uses the OpenCV (version 2.2) library for display and saving; supported webcams can be found at: [http://opencv.willowgarage.com/wiki/Welcome/OS].&lt;br /&gt;
&lt;br /&gt;
Camera options are found in the &#039;&#039;Source&#039;&#039; tab of the Configuration window.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
The Webcam logger is configured in the &#039;&#039;Source&#039;&#039; tab within the WebcamLogger section.  The configurable parameters are:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;LogWebcam&amp;lt;/code&amp;gt;   - Enables/Disables logging of Webcam states&lt;br /&gt;
*&amp;lt;code&amp;gt;CameraNumber&amp;lt;/code&amp;gt; - the webcam number for systems with multiple cameras, 0 for the default camera&lt;br /&gt;
*&amp;lt;code&amp;gt;WebcamDecimation&amp;lt;/code&amp;gt;  - The decimation factor for saving and viewing video; the logger saves/displays every Nth frame.&lt;br /&gt;
*&amp;lt;code&amp;gt;WebcamDateTimeLocation&amp;lt;/code&amp;gt; - The location of the date/time overlay in saved video (0: none, 1: UpperRight, 2: UpperLeft, 3: LowerRight, 4: LowerLeft).&lt;br /&gt;
&lt;br /&gt;
The video is saved with a resolution of 320x240 pixels. A parameter that allows configuration of the geometry will be provided in a future version.&lt;br /&gt;
&lt;br /&gt;
==State Variables==&lt;br /&gt;
&lt;br /&gt;
===WebcamFrame===&lt;br /&gt;
The frame number of the video. This can be used to synchronize the video with the recorded neural data. It is a 24-bit value, allowing 16,777,216 frames before overflowing. If the webcam can capture at 30 frame/sec, and is decimated at a factor of 5 (i.e., 6 frames/sec), this allows more than a month of video before it will go back to frame 0. In other words, this should not be an issue for most users.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[User Reference:Logging Input]], [[Contributions:Extensions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributions]][[Category:Extension]]&lt;/div&gt;</summary>
		<author><name>Gmilsap</name></author>
	</entry>
</feed>