createVirtualHeadset
This method lets you create a new virtual headset.
Parameters
Name
Type
Required
Description
cortexToken
string
yes
type
string
yes
The type of the headset to create.
The possible values are "MN8", "INSIGHT", "EPOCPLUS", "EPOCX", "EPOCFLEX".
motionRate
number
no
If the type is "EPOCPLUS" or "EPOCX", then you must set the motion rate to 0, 32 or 64 Hertz. The value 64 is only available on Android.
The default value is 0.
name
string
no
powerOn
boolean
no
The default value is false
battery
number
no
The battery level of the headset. It is an integer in the range [0, 4].
The default value is zero.
cq
object
no
This parameter sets the contact quality of each EEG sensor of the headset. It is an object. The keys are the name of the sensors, the values are integers in the range [0, 4].
Example for a MN8 headset: {"T7": 4, "T8": 0}
pm
object
no
See below.
preRecordedSamples
string
no
See below.
mc
object
no
See below.
fe
object
no
See below.
pm and preRecordedSamples
These two parameters sets the output of the performance metric detection.
The possible value for preRecordedSamples are "low", "mid"," high" or an empty string.
Value
Description
"low"
All the PM will output low (around 0.2) random values.
"mid"
All the PM will output medium (around 0.5) random values.
"high"
All the PM will output high (around 0.8) random values.
Empty string
You can use the parameter pm to manually set the output of each individual PM.
The parameter pm is an object. Each key is the name of a PM, and each value is an object. The available PM depends on the type of the virtual headset and the version of Cortex. New PM can be added in the future.
Example for a virtual Insight headset:
mc
This parameter sets the output of the mental command detection. It is an object that contains these fields:
Name
Type
Required
Description
action
string
yes
The name of the action. The possible values are "neutral", "push", "pull", "lift", "drop", "left", "right", "rotateLeft", "rotateRight", "rotateClockwise", "rotateCounterClockwise", "rotateForwards", "rotateReverse", "disappear".
power
number
yes
The power of this action. It must be a number between zero and one.
If you omit this parameter when creating the virtual headset, then the default action is "neutral", with a power of zero.
fe
This parameter sets the output of the facial expression detection. It is an object that contains these fields:
Name
Type
Required
Description
upperFaceAction
string
yes
The action of the upper face. The possible values are "neutral", "frown" and "surprise".
lowerFaceAction
string
yes
The action of the lower face. The possible values are "neutral", "clench" and "smile".
upperFacePower
number
yes
The power of the upper face action. It must be a number between zero and one.
lowerFacePower
number
yes
The power of the lower face action. It must be a number between zero and one.
If you omit this parameter when creating the virtual headset, then the default actions are "neutral", with a power of zero.
Result
Example
Last updated