python

From: Michal Wallace (sabren_at_manifestation.com)
Date: 2002-06-14 02:09:44


Hello again,

I've done some spot research, and I think I'll be able to
build a nice cross-platform prototype in python.

I worked as a Java developer for a few months, but mostly my
skill is with python, so that's what I'm going to use, at
least for now. I saw python mentioned a couple times in this
group, so if anyone pythoneers are still around, please feel
free to pitch in...

On the other hand, I know the real "players" in this group
favor C, C++, and Java. Personally, I think that most of
this project is a job for C, but since I've got a huge
learning curve in front of me already (with the DSP/FFT and
the circuitry), I figure I'll stick to python, but try to
use libraries that are built in C.

And in fact, python has interfaces to two libraries that
have already been used here by Jim Peters:

- FFTW for python is part of http://pylab.sourceforge.net/
(not sure if the python wrapper is cross-platform or not,
but I there are some alternatives if it's not)

- SDL is available from http://pysdl.sourceforge.net/
(there's also a higher-level interface at pygame.org,
but I think I'll stick to what's available from C)

Eventually, it will need to talk to the serial port:

- http://pyserial.sourceforge.net/

But in the meantime, we'll use data files. I looked at Jim
P's code for reading Jim M's data, and it's just a couple
lines. I'll probably port it rather than try to figure out
how to wrap it in python. His data is here:

- http://www.meissnerresearch.com/Upload/download.htm

It also occurred to me that the data structures we're
dealing with are exactly the same as the data structures in
a WAV file. Python comes with a tool to read and write wave
files, so it's probably easy to convert Jim M's data into a
WAV file. Then people could look at it with all sorts of
tools, if they wanted, or even shift the frequency up a few
octaves in something like sound forge (cool edit?) and
listen to their own brainwaves. :)

Here's my plan:

- get a simple mind-mirror display working in pySDL,
based on a simple 2D array (bar[channel][freq]=size)

- figure out how to generate frequency arrays using
FFT, and do so based on Jim M's data.

- build Jim M's old circuit, if I can figure out how.
(or find someone who can build it for me)

- hook one side up to my head and the other side up to
my serial port, and run Jim M's old program to see
if my circuit works.

- If so, attempt to read the incoming data myself
from python.

After that I'd like to try and work with the ModularEEG and
get some help making the signal aquisition and processing
stuff into a C library.

Any thoughts or advice? I'll post the source code as I go
along.

(Hope I'm not bugging people with all these messages!)

Cheers,

- Michal http://www.sabren.net/ sabren_at_manifestation.com
------------------------------------------------------------
Switch to Cornerhost! http://www.cornerhost.com/
High Powered Hosting - With a Human Touch. :)
------------------------------------------------------------



This archive was generated by hypermail 2.1.4 : 2002-07-27 12:28:43 BST