From: Jim Peters (jim_at_uazu.net)
Date: 2001-12-23 02:39:35
sademade wrote:
> I know GREAT tool for this, but very few people know of it, though
> it is free on sourceforge, namely meme\metatopia. But, that is
> not for anyone anymore than Bash/C is, but it is superior to any
> other library out there. THe lib has already been used to visualize
> EMG and EEG signals by several U PhDs and Psychologists to treat
> obsessive compulsive people, very potent development system for
> those who can code both C and forth-like shell language.
Someone else will have to look at that. I've never done 3D work.
I'll look it up, though, when I get a chance.
> And, yet you were ready to shoot down the idea of using RAD
> tools to gain speed ... I do not want to say no for designing
> multi-stage analog amp just because I am bad in analog shielding,
> though using A/D and single stage amp might help to make it easier,
> however, I am suggesting explorint it, as it might speed things
> up ...
Get it right -- I was suggesting that VB is no good for a project that
(as far as I was aware) was aiming for a cross-platform solution. If
you don't care about cross-platform, then sure, go for whatever
proprietory RAD tool you fancy.
I personally have no interest in Windows-only solutions.
> > However, libSDL was designed for game coders, so I can understand
> > it. Whether it's suitable for the job, we won't know until
> > someone has tried it.
>
> Isn't the goal to get basic EEG software together first, and leave
> the games way to the future, as the treatment and helping people
> to feel better should override need for entertainment or how ?
God knows. I'm a newcomer here, just trying to put something in. If
the big plan calls for something other than what I'm trying to do,
then I'm sorry. I'll just carry on with what I'm doing anyway, and
you can dictate the big plan for everyone else.
The app in question wasn't a game, by the way. It was a training
tool.
> I do NOT want to spend my short life to something that could be
> avoided, is there something wrong with that ? Why not seek for
> fastest tools, no matter where they come from, and if they are
> available on the linux, the better, I love free open stuff, of
> course.
The fastest tools often depend on what you are already accustomed to
using. You obviously don't care about cross-platform, so no problem,
go with VB.
> I already mentioned the "Buzz" packag which has great open-source
> filters available for it, and I would RECOMMEND looking at it
> as a model for structure how to implement parametric filter blocks,
> as that software has been out there for long, and proven itself ...
>
> Did you give any effort to look at it ?
No I haven't. I've not had a good look at parametric filters yet -- I
simply came across a paper about it whilst looking for something else.
My approach has been this: I've been working stuff out for myself, and
then finding stuff on the 'net written by people who've met the same
problems and solved them themselves. My ability in Maths is not too
strong after 10 years of disuse. I've just about got a handle on the
z-transform. Given my lack of Maths, I'm taking a more practical
route, borrowing whatever I can from the 'net.
What I'm finding so far is that what I want to do, e.g. shift a 256Hz
sampled signal up 8 octaves, has been implemented in theory many
times, but the detail makes these solutions completely inappropriate
for our particular application.
(An 8-octave shift (256x) would map 0.2Hz to 51Hz, and 40Hz to 10kHz.
This seems a fairly good mapping of interesting brain-wave frequencies
to the audible range, although other shifts than 8-octave should also
be possible from the same code. I'd like to keep with whole octaves,
so that the frequencies have a clear relation to the original
frequencies, in case that matters).
Wavelets are no good. There is something called the "Lifting Scheme"
which is an easy-to-understand way to implement wavelets, which
apparently has been proven to cover all the existing methods, and
allows new possibilities as well. However, looking at this proves to
me that there are always elements of one octave encoded in other
octaves -- it's never a totally clean separation, not even in theory.
So I'm looking now at a simple stack of octave filters, downsampling
as soon as I can without losing data (rather than downsampling too
early, as with wavelets). If I can implement it using IIR filters of
just a few samples, I can get a fast response where we need it: at the
higher frequencies. Lower frequencies will always be delayed a bit
simply because of the length of the waveform (you can't expect a 1
second response on a waveform of period 5 seconds).
Short-period FFT is no good, because to cover the range (say 0.1Hz ->
40Hz), you'd need a long long window, which means that there would be
a huge delay and really bad smearing of high-frequency signals. If
you tried to get better response, the low frequencies would just
completely disappear. I don't think a combined filter / short-period
FFT solution would be any good either.
I already have some code working partially using some rather rough FIR
filters for splitting out the octaves, and then using the octave
filtered channels to generate 256x as many output samples by repeating
sections and fading between them, taking care to match up wave-trains
where I can (doing a least-square-difference search). I was maybe
overdoing it by fitting to sub-sample offsets using interpolation.
I'm not sure if I will include that in the final version.
My original aim was to not just pitch-shift the signal, but also to
pitch-shift it by different factors for the left and right ears, which
would generate a binaural difference, which would oscillate at the
same rate as the original brain-wave. This would mean that you could
(in theory) entrain to the recording of someone else's brainwaves, or
at least get a binaural `nudge' in the direction of how that person
was operating. However, to pull this off, I would need to be
extremely accurate, which is why I was attempting to match to
sub-sample offsets. Any slight shift in the reproduced wave-train
would cause a shift in phase and an acceleration/deceleration of the
beat effect. I'm not sure that this is viable now. It would still be
nice to try, though.
I've found some more work done in Italy in which a signal can be
analysed and reduced to just pure sine waves and noise, for
reconstruction later. The tools are available on the 'net. This is
going to be useless for real-time work, but it may provide a way to
get the binaural effect from recorded signals. It's easy to get a
couple of binaural tones accurate when you know the frequencies
before-hand (rather than trying to do it just-in-time as with a
real-time pitch shifter).
My aim now would be to get a reasonably clean 8-octave pitch-shifter
working at a decent rate (to run on my P-133 laptop, or faster than
that if I can). This probably means working with integers rather than
floating point, which means even more attention to practical detail.
To be honest, I don't really care whether this fits into the big group
plan (whatever that may be). It's just something I want to do.
The advantage of working things out for myself is that I now know
*why* things are as they are. Maybe it's all been done 1000 times
before in Matlab, but without covering the ground myself, how could I
hope to think of an innovative solution, or even a vaguely optimal one ?
> Found personally "Contemporary Linear Systems" Using Matlab
> by Kirk and Strum much better and easier to understand than
> most of the FFT/IIR/FIR/Median/Z-transform/Hillebrand etc
> stuff ...
I'll see if I can get to look at a copy. Might be in the library if
I'm lucky. Hopefully I can apply it without needing Matlab.
> Then again, trying to make things easier for the less gifted
> has always made some academic types to spit venom
You really do want to have a fight, don't you ? What's your problem ?
Well, the less gifted is certainly me. I burned myself out when I was
at Oxford doing Physics. A bit young to burn out, don't you think ?
I dropped out after two years of the course. My way of understanding
is intuitive, not mathematical. In my attempt to get an intuitive
understanding of all the material put forward, I overloaded. It was
simply not possible for me to construct and test all the mental models
I would need to operate with the material.
They expected most people to simply take on board and accept all the
existing work without questioning it. That is not my style. I wanted
to prove it all for myself, to get a *real* understanding. I wanted
to see all the holes in their ideas. My approach was not possible in
the time provided, so I burned out.
Now, maybe the Maths could save me a lot of time, but to be honest, it
hurts to think that hard, and it hurts to read academic texts. It is
a necessary evil to get the job done.
Who are you accusing of being an academic ?
I know what I want, and I've been struggling through the maths to find
what I need. I couldn't care less about the theory so long as I get
the result I want.
> This project does not need it, it needs ease, rapidness, and
> openness.
I think it needs portable code written, tested and made available for
everyone to use. Talk is cheap.
> Did that already with matlab and matcom trials, when had access
> to it. Runs well on Siemens C167CR embedded 16-bitter, with
> practically no changes. Reason discovered was because some
> englithtened soul in Germany had figured this as a really rapid
> method, and followed it. Recommend giving deeper look at it.
Do you have a working 8-octave pitch-shifter that will fit the
requirements I've outlined ? If so, show us the code.
If that isn't what you've already got, then what do you have ? Any
good-quality well-tested signal processing stuff might be useful for
the project.
Jim
-- Jim Peters (_)/=\~/_(_) Uazú (_) /=\ ~/_ (_) jim@ (_) /=\ ~/_ (_) www. uazu.net (_) ____ /=\ ____ ~/_ ____ (_) uazu.net
This archive was generated by hypermail 2.1.4 : 2002-07-27 12:28:36 BST