Does anyone know of any sample code for taking another input source, like a data glove, a cursor (mouse), or an infrared positional tracker, and storing its data in the SIGNALS in a BCI2000 dat file?
I recognize there'd be some synchronization problems, but the alternative of 1 value per block (i.e., in states) won't suffice. I guess I could also record those other sources independently and include in each source some synchronization signals, but that's actually difficult to do for the particular hardware I'm looking into. Also, I need to update part of the feedback based on the positional tracker or touch screen, so it makes sense to have that information in BCI2000.
If you don't know of any sample code, please take a look at the following and let me know if you see any pitfalls I'm missing:
During initialization & Preflight
-Set the signal output properties to include the added channels (e.g., x, y, z, joint_angle_1, etc)
-Initialize any buffers these other 'sources' will use
-Get the last N samples from the device|buffer, where N is the number of samples that corresponds to a brain signal block period
-Sometimes the device might not have N samples available, I don't think I can wait until it does... or can I?
-Up- or down-sample (filtering as needed) to match the brain signal sampling rate
-Add them to the signal
Forum for software developers to discuss BCI2000 software development
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest