

initialize array of averages for running average calculationĪverages = new float Int averageBins = 6 //we have 6 types of brain waves Int averageLength = 200 //averages about the last 5 seconds worth of data Constants used to create a running average of the data. ex: blinking your eyes for a split second Int cutoffHeight = 200 //frequency height to throw out "bad data" for averaging afterīoolean absoluteBadDataFlag //data that is bad because it's way too far out of our desired range -īoolean averageBadDataFlag //data that's bad because it spikes too far outside of the average for Constants mainly used for scaling the data to readable sizes.įloat scaling = Variables used to store data functions/effects. Static int alphaBandwidth = 2 //really bandwidth divided by 2 Static int freqAvgScale = 50 //does same for averages of frequency data

Important constants that may need to be changed.įloat timeScale = 50 //scales the amplitude of time-domain data, can be changed The scaleFreq parameter, which is used frequently. The frequency bands have a bandwidth of 1.33 instead of 1, asĦ0Hz noise peaks out at band 45. * One issue: when taking the FFT of the data, it seems as if * (you'll see it for a second or two after you open your eyes, before it * increase in height by 2-3x when you close your eyes and relax The alpha wave bar is the 3rd one (purple), and should * make sure its in "focus", and hit the "a" key to bandpass the alpha * To view this function, play the program, click the window to * best, however, measuring alpha waves across the occipital lobe. * This sketch will measure all brain waves, from 0 - 30 Hz. * For reference, the frequency bars are ordered/classified as * the concentration of different brain waves. * components, and then averages of frequencies that estimate * computer, then displays the signal in time, its frequency Heres the code: * Reads in EEG data through the microphone input of the I know im probably asking a lot, but i will be grateful for any type of feedback.
#Sycning osculator to max msp code#
I assume it will be to enter “clareInlet(“xPosition”) ” in the part of the code where it says “//Draw un-averaged frequency bands of signal.”īut i am new to processing and fairly new to Max and cant work out where i would put it and how i would get Max to recognise it using Maxlink. All i want to do is be able to send the data of these six bands into six different flonums in Max so i can process them. To start viewing messages, select the forum that you want to visit from the selection below. You may have to register before you can post: click the register link above to proceed. I have built an EEG from Instructables, and it came with a processing sketch which separates the data into the different brainwave categories (alpha, beta etc…). Todays Posts Member List Calendar Forum Support Wiimote If this is your first visit, be sure to check out the FAQ by clicking the link above.
#Sycning osculator to max msp how to#
I am at a bit of a loss as to how to send a float from processing to max, i have read the various but limited instructions that i have found online but have not offered much help.
