Skip to content

✨ Tools used by Chamberlab to sonify & visualise Nanobrain data. 💫

License

Notifications You must be signed in to change notification settings

Chamberlab/node-chamberbrain-lab-kit

Repository files navigation

Chamberbrain Lab Kit

💉🔧🔨 contraption used by :squirrel::shipit: Chamberlab to 🎼 sonify and :tv: visualise Nanobrain data. 💫

Brrrraiiinnz, pls

npm version Code Climate Build Status

Requirements

🚀 Tested on:

  • macOS 10.11 & 10.12
  • Ubuntu 14.04

Dependencies

Build tools

  • macOS: xcode-select --install
  • Ubuntu 14.04: sudo apt-get install build-essential gcc-4.9 g++-4.9

Node.js >= 8.6.0

HDF5 library

Installation

# On Ubuntu 14.04 select the correct compiler
export CC=gcc-4.9 && CXX=g++-4.9

# Otherwise only run this
npm install -g chamberbrain-lab-kit

Usage

⚡ Commands can be executed from the terminal.

nb-convert

blob:node-chamberbrain-lab-kit anton$ nb-convert --help
Commands:
  csv2lmdb  Convert NanoBrains CSV to LMDB                            [default]
  csv2hdf5  Convert NanoBrains CSV to HDF5

Options:
  --infile, -i  CSV input file                                       [required]
  --outdir, -o  LMDB output directory                                [required]
  --type, -t    Value type to be stored
                           [choices: "Float64", "Float32"] [default: "Float64"]
  --help        Show help                                             [boolean]
  --debug, -d                                                  [default: false]

Example convert

# Convert CSV to LMDB as Float32.

blob:node-chamberbrain-lab-kit anton$ nb-convert -i /Users/foo/goo.csv \
> -o /Users/foo -t Float32 csv2lmdb

nb-reduce

blob:node-chamberbrain-lab-kit anton$ nb-reduce --help
Commands:
  fps  Reduce FPS rate of an LMDB db and output as LMDB and HDF5      [default]

Options:
  --infile, -i   LMDB input file                                     [required]
  --outfile, -o  LMDB output file, also used for HDF5                [required]
  --fps, -f      Target frames per second                    [default: "100.0"]
  --help         Show help                                            [boolean]
  --debug, -d                                                  [default: false]

Example reduce

# Reduce LMDB to 50 frames per second.

blob:node-chamberbrain-lab-kit anton$ nb-reduce -i /Users/foo/goo.lmdb \
> -o /Users/foo/goo-50fps.lmdb -f 50.0

nb-playback

⚡ Broadcast can be activated using a remote IP like 192.168.0.255:9999.

blob:node-chamberbrain-lab-kit anton$ nb-playback --help
Commands:
  lmdb2osc  Realtime playback of an LMDB file as OSC packets          [default]

Options:
  --infile, -i   LMDB input file                                     [required]
  --fps, -f      Target frames per second                     [default: "50.0"]
  --local, -l    Local OSC address to listen on     [default: "127.0.0.1:8888"]
  --remote, -r   Remote OSC address to send to      [default: "127.0.0.1:9999"]
  --address, -a  Override default OSC addres
  --help         Show help                                            [boolean]
  --debug, -d                                                  [default: false]

Example playback

# Play back LMDB with 50 frames per second.
# Bind to 0.0.0.0:7878 and broadcast OSC packets to 192.168.0.255:7777.

blob:node-chamberbrain-lab-kit anton$ nb-playback -i /Users/foo/goo.lmdb \
> -f 50.0 -l 0.0.0.0:7878 -r 192.168.0.255:7777

Credits 💶 💴 💶 💴 💶 💴 💸 !

2017 🚬:trollface: / Chamberlab

Licensed under the ✨ Do What The Fuck You Want To Public License

About

✨ Tools used by Chamberlab to sonify & visualise Nanobrain data. 💫

Resources

License

Stars

Watchers

Forks

Packages

No packages published