Close
0%
0%

Mind Control Synthesizer

This project uses a Pinaps to collect processed EEG information from a single channel electrode to control synthesizer parameters using MIDI

Similar projects worth following
Starting from
$149.00
fb10847e has 2 orders / 0 reviews
Ships from United Kingdom
This project demonstrates the use of processed EEG information to control synthesizer parameters in real-time. This is achieved by collection EEG information on a Raspberry PI zero using a Pinaps shield/hat. Using a processed "Attention" value, control for the vibrato parameter on the synthesizer is calculated and sent as a MIDI message to the Roland System-1 synthesizer once per second. In theory, this provides a hands-free way of controlling a single parameter of the synthesizer... with your mind. Single-channel EEG is quite limiting, but should provide this one-dimensional degree of control!This simple project aims to highlight the ease of including EEG in a Raspberry PI project by providing the hardware and software for people to inspect and use.Pinaps is Blino's Rapsberry PI EEG shield/hat (https://www.blino.io/post/announcing-pi-naps). It sits on top

Wired and Wireless Versions

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.


Hardware

In our setup, we used the following equipment

* Roland AIRA SYSTEM-1 PLUG-OUT Synthesizer - https://www.roland.com/us/products/system-1/
* USB to Midi cable - https://www.amazon.co.uk/Interface-OIBTECH-Upgrade-Professional-Converter/dp/B07FQSFMRZ
* Raspberry pi Zero - https://www.amazon.co.uk/Raspberry-Pi-Zero-Wireless-Essentials/dp/B06XCYGP27
* Pinaps -  https://www.blino.io/product-page/pi-zero-eeg-hat

Additionally, for the wireless version, a Raspberry PI Model 3 B is used manage sending MIDI messages to the synthesizer. Any raspberry PI should be able to take the place of this though, as long as it supports Bluetooth.


Software

This project involves the installation of exisiting python packages and python scripts which run on either the single wired Raspberry PI, or the pair of Raspberry PIs in the wireless setup.

The python software packages involved in this project include the following: EEG Pinaps (http://docs.blino.io), serial port interfacing (https://github.com/mido/mido) and for the wireless versions PyBlueZ (https://github.com/pybluez/pybluez).

These packages are used in the python script which is run on the Raspberry PI zero with the Pinaps. The wireless setup involves two python scripts addtionally using PyBlueZ for bluetooth.
For the full set of instructions on setting up and running the this project as designed. See the guide section.

Python Code

Let's dive into the python code of the wired setup. The wireless setup follows the same design here but breaks the python code into two scripts and involves the management of a bluetooth connection. These details will not be covered here but are available in the source code for inspection: https://github.com/Harri-Renney/Mind_Control_Synth/tree/master/wireless_version

Constants

A number of constants are defined globally as:

# Constants
CTRL_LFO_PITCH = 26
CTRL_LFO_RATE = 29
MIDI_MESSAGE_PERIOD = 1

The first to constants preceded by CTRL are control constants for the Roland low frequency pitch and rate/speed respectively. The values for these indices are found in the Roland control numbers are documented in the SYSTEM-1 Midi document: https://www.roland.com/uk/support/by_product/system-1/owners_manuals/

The MIDI_MESSAGE_PERIOD is the time in seconds between updating the Roland synth with new conrol parameters. Currently set to one second.

Mido

Setting up Mido on the USB port with an initialization...

Read more »

  • Demonstration Video and Pictures to come

    HarriRenney07/03/2020 at 18:13 0 comments

    This project is for the most part, completed. It is currently an "ongoing project" as I want to upload some nice demonstration videos to show it in action! Due to the cirumstances imposed during the carona virus pandemic, I can't be sure when this can be done to a standard I am happy with. But stay tuned!!


View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates