Coder Social home page Coder Social logo

museeg's Introduction

MusEEG

website: hugofloresgarcia/museeg

MusEEG is a python package designed to function as the software component for a music-oriented Brain-Computer Interface. The code is currently designed for the 14-Channel Emotiv EPOC+ (that's the only headset I have available at the moment), but it should be easily modifiable, provided that you have a means of obtaining a RAW EEG stream from your device.

MusEEG is capable of sending OSC and MIDI messages, allowing for direct communication with a software instrument (MIDI) and for more customizable communication with music programming languages (SuperCollider/Max)

Motivation

The primary goal of MusEEG is to expand the creative capabilities of musicians past any bodily limitations by creating a direct interface between the human brain and a musical instrument. By cutting the medium between the brain and music, MusEEG results in an instrument that is highly accessible to people with motor disabilities. This interdisciplinary project consists of multiple technical and creative modules nested in the fields of computer science, electrical engineering, music performance and composition, concluding with the performance of a piece composed for guitar and EEG.

Requirements

The MusEEG module uses the following libraries

  • numpy
  • tensorflow
  • scipy
  • pywt
  • mido
  • python-rtmidi
  • audiolazy
  • matplotlib
  • pandas
  • osc4py3

see requirements.txt for the full list of dependencies

Installation (Python 3.7)

Install Python

Install pip

install requirements.txt:

pip install -r requirements.txt

Using with SuperCollider

MusEEG is capable of sending

  • Discrete OSC messages for each facial expression (e.g. /smile)
  • Continuous OSC messages for band power data (e.g. /theta)

which makes it easy to use with music programming languages (such as SuperCollider). Examples of usage with supercollider are in the /SuperCollider directory.

The MusEEG Module

Currently, the MusEEG package contains six main modules:

  • music.py (MIDI objects, chords, and melodies)
  • classifier.py (build, train, save keras models easily)
  • eegData.py (import, process, plot, save EEG data).
  • cerebro.py (methods to use music, classifier, and eegData together, store and load MIDI-facial expression dictionaries)
  • client.py (TCP client to receive real-time raw EEG stream form CyKit)
  • processor.py (real-time processing methods)

Processor

the Processor.py module contains real-time processing methods. Running the Processor.py module with python Processor.py starts an EEG client and connects to a CyKit server (github.com/CymatiCorp/CyKit to run the EEG stream server), picks up raw EEG data, processes it, displays the classification result in the command line, and plays its respective MIDI event from the expression-MIDI dictionary.

Acknowledgments

Special thanks to Dr. Fernando Ríos and Dr. John Thompson for being awesome faculty mentors!

museeg's People

Contributors

hugofloresgarcia avatar

Stargazers

Sean Stevens avatar irmakoz avatar

Watchers

 avatar

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.