Coder Social home page Coder Social logo

backyardbrains / spike-recorder Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 27.0 368.76 MB

A neural recording app for the Windows, OS X (Mac) and Linux.

Home Page: https://backyardbrains.com/products/spikerecorder

C++ 12.27% C 87.18% Objective-C 0.36% NSIS 0.02% Makefile 0.05% Objective-C++ 0.01% Shell 0.01% CMake 0.01% M4 0.06% Fortran 0.02%

spike-recorder's People

Contributors

duolabs333 avatar gagegreg avatar laochailan avatar stanislavmircic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spike-recorder's Issues

Windows Compiling - Docs needed

Hi,
I'm trying to compile this repo on Windows 10 machine.
No visual studio installed, just the WinGm compiler (g++ exe).

Currently using the following command to compile:

g++ src\main.cpp -I"<DIR>\SpikeRecorder\support" -I"<DIR>\SpikeRecorder\src" -I"<DIR>\SpikeRecorder\src\libraries" -I"<DIR>\SpikeRecorder\src\engine\firmware" -I"<DIR>\SpikeRecorder\SDL2.framework\Versions\A\Headers" -L"<SDL_DIR>\SDL2-2.0.10\i686-w64-mingw32\lib" -lmingw32 -lSDL2main -lSDL2

Currently trying to compile I get the following errors:
C:\Users\NETABR~1\AppData\Local\Temp\cc6saPGb.o:main.cpp:(.text+0x32): undefined reference to 'BackyardBrains::Log::msg(char const*, ...)' C:\Users\NETABR~1\AppData\Local\Temp\cc6saPGb.o:main.cpp:(.text+0xfc): undefined reference to 'BackyardBrains::Log::fatal(char const*, ...)' C:\Users\NETABR~1\AppData\Local\Temp\cc6saPGb.o:main.cpp:(.text+0x109): undefined reference to 'BackyardBrains::Game::Game()' C:\Users\NETABR~1\AppData\Local\Temp\cc6saPGb.o:main.cpp:(.text+0x116): undefined reference to 'BackyardBrains::Widgets::Application::run()' C:\Users\NETABR~1\AppData\Local\Temp\cc6saPGb.o:main.cpp:(.text+0x122): undefined reference to 'BackyardBrains::Log::msg(char const*, ...)' C:\Users\NETABR~1\AppData\Local\Temp\cc6saPGb.o:main.cpp:(.text+0x134): undefined reference to 'BackyardBrains::Game::~Game()' C:\Users\NETABR~1\AppData\Local\Temp\cc6saPGb.o:main.cpp:(.text+0x167): undefined reference to 'BackyardBrains::Game::~Game()' collect2.exe: error: ld returned 1 exit status

Any help regarding this issue?

Windows compiling docs will be great.

Spike trains not cleared when user connects to shield

If user:
1.) opens file that has spike train associated with it (or if user sort spikes for file)
2.) connect to any SpikerShield

signal from SpikerShield will be displayed along with spike trains from last loaded file.

We should clear spike train when connecting to SpikerShield.

SR on Rspberry Pi

Hi Stan, thanks for your fast reply.
I fulfill the web instrucctions for instalation:

  1. $ sudo apt-get update

  2. $ sudo apt-get install build-essential libsdl1.2-dev libsdl-image1.2-dev

  3. Downloaded the last dependency libbass from http://www.un4seen.com/download.php?bass24-linux

  4. and unpack it into a temporary directory.
    $ mkdir /tmp/bass
    $ cd /tmp/bass
    $ unzip ~/path/to/bass24-linux.zip

  5. When copy the library to the system library directory
    $ sudo cp x64/libbass.so /usr/lib/
    then I get an error (not allowed to copy, no permition)
    I tried to copy decompressed files to system folder (/usr/lib/) but fail

  6. Compilation was not possible because there is no BYB-Neural-Recorder (or any new one) folder

Maybe I miss one or two necessary steps (not described) during installation.

Would you find out the problem?
The benefits to run BYB Spike Recorder on the Raspberry Pi ($39 computer) are enormous!

Thanks a lot

Antonio

Multiple board support

Hi :)

I was wondering if it's possible to run Spike recorder with multiple boards at the same time?
And is there a way to export in real time the read values (not the sound) to another software?

SpikeRecorder Spike Analysis Averaging

Stan,
During analysis, the second channel average waveform after selecting spikes seems to not display the AP. Needs to be investigated. We noticed doing 2 channel cockroach leg recordings that the Red channel average seems to be just noise and not showing the AP average.

Zach

Feature Request

Stan,

Would be great to add a feature in the software that can give us some sort of y-axis scale. A way we could do this is having a maximum zoom in and out then display the percentage/zoom level that you currently have. That way you can easily compare signal sizes. This would be a stop gap in software until we can get a calibration setup and mV scale.

Export File types

It would be be nice if SpikeRecorder could export to other analysis software: Matlab, Excel, or ADI (.ADIDAT header). We get this question often.

Unable to connect to Heart and Brain box in Linux

Perhaps the issue is a mismatch of baudrate? Theerror I'm getting looks something like this:

1643760566 748 - askForBoardType - Ask for Board type 1643760566 748 - writeToPort - Try to write 4 bytes to port 1643760566 748 - writeToPort - 4 bytes written to port 1643760566 748 - writeToPort - 4 bytes written to port 1643760566 848 - checkAllPortsForArduino - Read board type response. checkAllPortsForArduino - Read board type response. Baud rate: 500000 1643760566 908 - Serial read error: Timeout 1643760566 909 - checkAllPortsForArduino - After reaading board type response. # of Bytes: -1 checkAllPortsForArduino - After reaading board type response. # of Bytes: -1

List of audio inputs should refresh

List of audio inputs should refresh each time Config screen is opened. Currently user needs to close application in order to refresh list of audio inputs.

labstreaminglayer integration

Hello,

I made a small app to take data from the spikerbox pro and stream it over LSL. The app can be found here: https://github.com/labstreaminglayer/App-BackyardBrains/

By running this application, the data can be retrieved easily in Python/Matlab/C#(Unity). However, my app has a problem in that it won't run properly in Release mode, only in Debug! This makes it quite difficult to distribute because the MSVC redistributable doesn't include debug DLLs.

I don't have access to your hardware; I was remote controlling a colleague's computer while testing this. It would be great if someone with the hardware could take this up and help out.

Or, an even better solution would be if you were to integrate LSL streaming directly in your spike-recorder application, so your users could simply toggle a button to enable the LSL output. If this is something that you're interested in then I could provide a skeleton of a pull request to outline how this might be achieved, but without the hardware I can't do much to get all the details right.

SpikeRecorder Crashes on MacOS

SpikeRecorder has crashed in an oddly serious way... I had to reboot computer, as restarts of app would have a jumping icon (loading?). Another student in the fellowship has the app crash on her Mac. I am not sure if they are related.

I notice mine occurs only when connecting external monitors. It happened once on LiveTV in DC, but the system came back just in time. In Serbia, the app crashed and paused the Fabelgrade talk for ~2m. I would love to get this figured out.

Problem Installing "Makefile:72: recipe for target 'src/widgets/LoadTexture.o' failed"

I'm trying to install Backyard Brains' "Spike-Recorder". I have the dependencies installed, but I'm still getting an error.

~/Spike-Recorder$ apt-file search SDL_image.h
cmake-doc: /usr/share/doc/cmake-data/html/module/FindSDL_image.html
emscripten: /usr/share/emscripten/system/include/SDL/SDL_image.h
libsdl-image1.2-dev: /usr/include/SDL/SDL_image.h
libsdl2-image-dev: /usr/include/SDL2/SDL_image.h

$ ~/Spike-Recorder$ apt-cache policy libsdl2-devlibsdl2-dev:
  Installed: 2.0.4+dfsg2-1ubuntu1
  Candidate: 2.0.4+dfsg2-1ubuntu1
  Version table:
 *** 2.0.4+dfsg2-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages
        100 /var/lib/dpkg/status

But I'm still having problems~/Spike-Recorder$ make

g++ -o src/widgets/LoadTexture.o -c src/widgets/LoadTexture.cpp -g -O2 -Isrc -Isupport -I. -Wall -DSIGSLOT_PURE_ISO --std=c++11 `sdl2-config --cflags`
src/widgets/LoadTexture.cpp:2:23: fatal error: SDL_image.h: No such file or directory
                       ^
compilation terminated.
Makefile:72: recipe for target 'src/widgets/LoadTexture.o' failed
make: *** [src/widgets/LoadTexture.o] Error 1

~/Spike-Recorder$ apt-file search SDL_image.h
cmake-doc: /usr/share/doc/cmake-data/html/module/FindSDL_image.html
emscripten: /usr/share/emscripten/system/include/SDL/SDL_image.h
libsdl-image1.2-dev: /usr/include/SDL/SDL_image.h
libsdl2-image-dev: /usr/include/SDL2/SDL_image.h

I'm running Ubuntu 16.10 Gnome

If SpikeRecorder is added to PATH it fails to start

SpikeRecorder runs on my PC but if I add it to the PATH, instead of running it with the full path to the binary it fails. Is it because on src/main.cpp:32 it changes the working directory? Perhaps because in Game.cpp it loads icons with relative paths?

Build Fail

On raspberry pi4b and followed instructions. Everything seemed ok until make and then got the following error:

In file included from src/CalibrationWindow.cpp:6:
src/engine/RecordingManager.h:19:10: fatal error: BYBBootloaderController.h: No such file or directory
19 | #include "BYBBootloaderController.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:78: src/CalibrationWindow.o] Error 1
smbaca@chinchilla:~/Spike-Recorder $

Request for Voltage indicator, Peak to Peak Voltage in measurements

Note from Brian (our EMG collaborator)

On the ADI system, we measured the peak to peak amplitude AND the RMS of numerous responses across a large range of amplitudes. Here, I carefully defined the time window exactly at the beginning of the response and exactly at the end of the response. Then, also using careful definitions of the onset and end of the response, I measured the RMS of those same responses on the data recorded via EMG Spikerbox on Spike Recorder.

Results: The peak to peak amplitude and the RMS values from the ADI system were very strongly correlated, suggesting that the RMS provides similar information to the peak to peak amplitude measure. And, the RMS responses from the Spike Recorder software reflected the RMS measured from the ADI system. The RMS response from BYB equipment changed as expected across the range of taps.

Conclusion: You most definitely can precisely measure the amplitude of discrete, rapid, reflex responses like this using the RMS function in Spike Recorder, as long as you blow up the response on the time scale and then very carefully delineate the beginning and the end of the response, not including any baseline before or after the response. This is important because this means you can teach more quantitatively about how reflex responses change based on the strength of the input (hammer tap force) and based on changing conditions that would change the input/output excitability of the reflex arc. Your BYB hammers measure the acceleration, so I presume that you can precisely measure the strength of the input to the reflex.

I responded:
Thanks, Brian. This is very helpful. Let me ask you.... what are the most useful measurements to have in SpikeRecorder? RMS, time of window is all we have. You mention Peak to peak voltage. Are there other measurements we should consider?

To which his response was:
Greg – the time window, RMS of the signal, and Peak to Peak amplitude captures the things I would want to be able to measure for experiments that are typically done with the spikerbox in the educational setting.

Making an issue so we capture this feature request.

Binary distribution

Are there any plans or limitations for making this a compiled binary release instead of having to build it from source on each machine?

Change default settings for SpikerBox Pro

When user connects first time to SpikerBox Pro it should have:
For Neuron:

  • FIlters set to 300Hz (or 600Hz) -1200Hz
  • Just one channel visible

For Muscle

  • Filter set to the same bandpass as on hardware
  • Just one channel visible

Linux version did not run on Raspbian (Raspberry Pi)

Dear Friends,
I have tried to install the Spike Recorder on a Raspberry Pi 3+ (under Raspbian), following your web Linux instructions but it was non possible. Do you know this issue? , is it possible to obtain the binary instead to build the program ?
Thanks

Heart and Brain Connectivity Issues

When SpikeRecorder has been running / been connected to other devices, I have a hard time getting the Heart and Brain to connect. I will plug it in, sit, and wait, and sometimes get nothing.

Solved by totally closing spike recorder and unplugging USB every time I need to reconnect.

Failed installing on OS X

I'm trying to install this on OS X Yosemite (10.10.1), but to no avail.

I download the dependencies described in the README and attempt to install by doing make in the BYB-Neural-Recorder directory, and it throws an error very early. This is the entire output:

g++ -o src/widgets/LayoutItem.o -c src/widgets/LayoutItem.cpp -g -O2 -Isrc -Isupport -I. -Wall -DSIGSLOT_PURE_ISO
In file included from src/widgets/LayoutItem.cpp:2:
In file included from src/widgets/Widget.h:12:
src/widgets/Event.h:5:10: fatal error: 'SDL_keysym.h' file not found
#include <SDL_keysym.h>
         ^
1 error generated.
make: *** [src/widgets/LayoutItem.o] Error 1

It seems like the makefile can't find my libsdl installation, which I got by doing brew install libsdl, and after that didn't work, with sudo port install libsdl. I also installed libsdl_image using the same commands.

Any insight into what the issue here is, and what I can do to resolve it?

Compiling on Linux Ubuntu/Mint

I followed the instructions and ran into a few issues. Will a bit of help, I was able to solve the first few, but can't solve the last one.

Issue # 1.1
It appears that the current version of the code is looking for certain header files on the system and not in the downloaded folder.

~/Spike-Recorder-master$ make
g++ -o src/CalibrationWindow.o -c src/CalibrationWindow.cpp -g -O2 -Isrc -Isupport -I. -Wall -DSIGSLOT_PURE_ISO --std=c++11 sdl2-config --cflags
In file included from src/engine/RecordingManager.h:18:0,
from src/CalibrationWindow.cpp:6:
src/defaults/DefaultConfig.h:4:10: fatal error: ./tinyxml2.h: No such file or directory
#include "./tinyxml2.h"
^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:77: src/CalibrationWindow.o] Error 1

Solution to Issue #1.1
In src/defaults/DefaultConfig.h, change to #include "src/libraries/tinyxml2.h"

Issue 1.2
Compiling gets further with the above fix, but it hits a similar error for SDL.

src/widgets/LoadTexture.cpp:2:10: fatal error: SDL_image.h: No such file or directory
#include <SDL_image.h>

Solution to Issue #1.2

This can be fixed by changing one of the top lines in src/widgets/LoadTexture.cpp to #include "SDL2_image.framework/Versions/A/Headers/SDL_image.h"

Issue # 2
The last error I obtain when running make is below.

/usr/bin/ld: cannot find -lSDL2_image
collect2: error: ld returned 1 exit status
make: *** [Makefile:80: SpikeRecorder] Error 1

Help on this issue would be appreciated.

Event marker issue/bug

Wes noticed a bug with event markers in his recording. When he pauses his recording and add event markers, they end up positioning oddly with no relation to the main event at with a delay.

Attached are the sample pics of the issue.

image

image

Autosave event markers

We had the app crash in a one hour session, but the data could not be used as the text file wasn't written out properly. It would be nice to have an autosave of event times be written out periodically.

What is the unit of the y-axis scale of EMG signal?

I purchased a muscle spike box and used the SpikeRecorder app to record EMG. I exported the data as .wav file and I am now analyzing the data. However, I did not know the unit of the y-axis scale. How do I convert it into mV?

crash when connecting to port or sound server

I can not see the output of Neuron SpikerBox (connected via audio cable, not usb). I'm on Ubuntu 18.04 LTS (5.10.4-051004-generic).

  1. When I attempt to connect to a different port in settings, the gui crashes (see log1.txt). Terminal gives "buffer overflow" error.
  2. When I attempt to connect to a different sound server (e.g. PulseAudio sound server or my integrated sound card HDA Intel PCH) the gui crashes (see log2.txt). Terminal gives segfault error.

log1.txt
log2.txt

Problems with Linux

There's an error when compiling under Linux (I'm using Ubuntu 20.04). Line 827 in src/engine/ArduinoSerial.cpp references a macro that is only defined for OSX - if (ioctl(portDescriptor, IOSSIOSPEED, &speed) == -1). I got things compiling and running by commenting this section and uncommenting the section above ("the comment described it as the traditional setup of baud rates").

That led to another error - I find that when I run SpikeRecorder, it starts up just fine, but it doesn't detect my MuscleBox plugged in. If I try with the Windows version of SpikeRecorder in a virtual machine, it works ok.

/usr/bin/ld: cannot find -lbass

Hi,

I tried to install Spike Recorder for Linux Mint based on the instruction in the ReadMe.md file but had a problem:

I installed sdl 2.0 and sdl_image 2.0
downloaded the libbass package, unzipped and copied to usr/lib/ with sudo cp x64/libbass.so /usr/lib/

Then for the Compilation the construction is:
$ cd BYB-Neural-Recorder
$ make

First, since I couldn't find BYB-Neural-Recorder folder anywhere in the instruction or among the downloaded file, I went to Spiker-Record-master (I also tried the same story with Spiker-Recorder-ReleaseV1.3). Then, I tried 'make' command and got the following error:

/usr/bin/ld: cannot find -lbass

After searching for solution for an hour I gave up. Thanks in advance for anyone who can help with this issue!

Heart rate line graph

Users have requested that in addition to seeing the heart rate #, that it would be super useful to see a line graph as well. This way one could watch the rising and falling ekg rates during various exercises.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.