Attachments:

hi tedor!
Great to hear, that you’re still active in this interesting eeg thingie.
Just wanted to say, that the patch isn’t originally by me, but taken from the classic-vocoder example, that comes with max.

I’ve been taking a look at your bandpass filter patches. To test these more fully, you might want to consider generating a sine wave reference signal so you can compare the methods at a single fixed frequency. I did this with a cycle~ object.

I found that the settings on the fftb~ object needed to be adjusted. If you change the third parameter to an H, you should get equally spaced frequency bins. This is the way most EEG fft data is displayed.

The fftb~ seemed to have attenuated response below 4Hz (assuming the amplitude cycle~ object is constant at low frequencies). I’m not sure why. Perhaps someone closer the the actual code could comment on the algorithm. It was probably not intended for such low frequencies.

I have not had a chance to try the bandpass filters yet, but the change in the ratio parameter to H may produce closer results between the two methods.

Thank you for the replies. I am adding the missing file (freq_analyser_1.maxpat).
Mudang, oh yes, brainwaves will be used sooner or later in many devices, so why not? :)

Using the 'reference cycle' on its own or adding it to the EEG data suggests, that both analysis tool works (attached picture). I also changed the third parameter to H, though now I am not sure how the harmonic series assigns frequencies to the banks. However, maybe with my low frequencies the H gives me more or less the same ratios than the argument 2:

fffb~ 15 2 2 30

fffb~ 15 2 H 30

Hopefully, by tweaking on the Q factor and having the [slide] object for smoother data, I will be able to receive similar results.

I think to solve the problem I will have to understand the differences between the signal and float. As far as I understand, the EEG I receive is a float, which I have to convert into a signal with [sig~] in order to be used with both analysis spectrums (vocoder vs ffb).

But, when using the [ffb~ ] the subpatch first saves the EEG data/float into a buffer, 120 sample rate and it is this buffer that gets read by using [phasor~ 1.] into [ffb~]. So in my understanding the EEG data transforms from being a float into a signal.

To use the 'reference cycle' to test the ffb part, I need to transform the the signal into a float, and this is the part where I go really confused:

If I have a signal for instance [cycle 10] and use a [number~] to make it into a float, will this number represent the same data? When I use a [sig~] object on this float to make a signal again… I don't think I get the original back data back. At least this is what the spectrums suggest in the patch and what I get on a simpler spectroscope~ :

– Pasted Max Patch, click to expand. –

Copy all of the following text. Then, in Max, select New From Clipboard.