NeuroPlayPro API reference 1.9.18
1. Intro
NeuroPlayPro software works as a server and is available for HTTP requests and WebSockets connection.
This page provides live data requests - press
Run near each command.
HTTP interaction parts are marked with
blue outlines.
NeuroPlayPro is available across your local network as HTTP server at "
http://127.0.0.1:2336"
WebSockets interaction parts are marked with
green outlines.
WebSocket server is available on port "
1336"
The server works in two modes:
-
JSON (e.g. '{"command":"meditation"}')
-
simple text (e.g. "meditation") which
corresponds to HTTP commands
All commands are case insensitive (e.g. "RAWDATA", "rawData", "RawData").
NeuroPlayPro server's output will be in JSON format, which will always have
"result" and
"time", where
"result" will be
true if the command was performed successfully.
{
"result": true,
"time": "2020-10-25 10:20:30"
}
2. Device
Data frequency depends on the number of selected channels. For devices with higher amount of supported channels it is possible to select less channels for greater data frequency.
Channels | Frequency | Names |
---|
8 channels | 125 Hz | O1, P3, C3, F3, F4, C4, P4, O2 |
6 channels | 125 Hz | O1, T3, Fp1, Fp2, T4, O2 |
1 channel | 1000 Hz | O1 |
StartSearch
StopSearch
ListDevices
DeviceCount
GetDeviceInfo
StartDevice
CurrentDeviceInfo
CurrentDevicesInfo
MakeFavorite
GetFavoriteDeviceName
SetMontage
3. Storage time and 'Data grab mode'
All data comes channel-wise. To get channel names use the "
CurrentDeviceInfo" command.Data samples are stored for 'StorageTime' seconds, 10 seconds by default.'Grab...' commands get data and clear the queue, so the next time it is called - it returns only newly added samples.Some commands (e.g.
RawData and '...
History') require enabled 'Data Grab Mode' in which the software stores data for several seconds. By default this feature is off for memory/processor optimisations.
EnableDataGrabMode
DisableDataGrabMode
SetDataStorageTime
GetDataStorageTime
Filters
Original data from the device is processing by several filters:
- Low-pass filter (LPF) - minifies occurence of signals below it's value in Hz. Default is 40 Hz.
- Hi-pass filter (HPF) - minifies occurence of signals over it's value in Hz. Default is 2 Hz.
- Band stop filter (BSF) - strictly minifies signals equal to it's value in Hz. Default is 50 Hz.
If a filter value is "0" - it is turned off.
GetFilters
SetFilters
SetLPF
SetBSF
SetHPF
Data samples
FilteredData
GrabFilteredData
RawData
GrabRawData
AddEDFAnnotation
Spectrum
Spectrum is calculated via FFT of the filtered data. The dimension is in uV
LastSpectrum
GrabSpectrum
GetSpectrum
Rhythms
By default the software calculated standard rhythms (alpha, beta, delta, gamma, theta) and outputs their respective percentage (of overall spectrum) values.
Rhythms
RhythmsHistory
Recording
The software starts recording filtered data to EDF and other data (rhythms, meditation/concentration) to NPD file (stands for "NeuroPlayData", really just a "CSV")
StartRecord
StopRecord
PauseRecord
ContinueRecord
AddFileToRecord
GetUserRecords
Records
4. BCI: meditation, concentration, mental states
Standard BCI modes in NeuroPlayPro are:
Meditation
Percentage of how much the user is relaxed, meditated (high alpha)
Meditation
MeditationHistory
Concentration
Percentage of how much the user is focused
Concentration
ConcentrationHistory
Mental states
Discrete brain state recognition (states are recorded for every user and every session separately)
MentalStateStatus
RecordMentalState
EraseMentalState
StartMentalStateRecognition
StopMentalStateRecognition
GetMentalStateFile
Shorthand
BCI
BCIs
5. Miscellaneous
Help
Version
ControlOptions
Close
AddLogItem
ScreenInfo
GetAllSettings
GetSettings
SetSettings