Git Product home page Git Product logo

mind_control_synth's Introduction

Mind_Control_Synth.py

This example project demonstrates how the Pinaps information can be used to interface with a synthesizer by calculating MIDI messages from the EEG information and sendin it to the synthesizer to manipulate control parameterss. The vibrato rate is changed according to the attention values measured every second. These follow simple Newton equations of motion to simulate momentum as the vibrato rate changes. Full blog writeup at: PLACEHOLDER

There are two versions of for a wired setup, and a bluetooth wireless setup. The wired setup uses a single Raspberry PI zero which collects EEG data and sends MIDI messages over the USB:MIDI converter to the synthesizer. This is problamatic, as there is potential for a lot of noise which can effect the signal from the EEG electrodes. Considering the EEG singal is in the range of a millionths of a voltage, any noise can disrupt the signal and make it unusable. Therefore, a pair of python scripts for a wireless version have been provided. The msc_client.py is run on the raspberry pi which handles the MIDI messages, so can sit on the table away from the user. The msc_server.py is run on the rapsberry PI zero with the Pinaps, being worn by the user.

Setup Raspberry Pi

The raspberry pi zero needs to be setup to communicate with the synthesizer via the MIDI control protocol. In this project, we use the Mido python package to control the MIDI messages over the USB port. To do this, the OS needs to be configured and Mido needs to be installed.

Setup USB port for MIDI

Mido is a very simple python library which exposes functions for communicating MIDI messages over USB ports available on the system.

Install Mido using:

pip install mido

Install port support using:

pip install python-rtmidi

Finally, to use Mido with USB ports:

pip install python-rtmidi

The documentation for Mido can be found here. The source code for Mido, along with instructions on how to install can be found here.

Setup Pinaps

The Pinaps setup process is documented at: http://docs.blino.io/

Control parameters.

Particular parameters of interest are:

vibratoVel = 0 #Controls the velocity, which effects which direction vibrato is moving.

vibratoAcc = 4 #Controls the rate of change of the velocity, which controls the change in vibrato.

By changing these, can control the sensitivity of changes as attention values are measured.

Queries or suggestions? Email [email protected]

mind_control_synth's People

Contributors

harri-renney avatar

Stargazers

 avatar

Watchers

 avatar  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.