Real-Time dataviz with Neurosky Mindwave mobile

Hi, I have a visual that reacts to the live data from the EEG headset, the problem is the data streams at a 1 sec interval and the form of the visual changes accordingly, when there is a huge jump in the data value the animation looks broken. Is there a way to either transition the animation from one value to another or reduce the time interval to make the animation look more smoother?



Hey There!
Maybe something that stores the current size of the animation and gradually increments to the new size after 1 sec ?

Makes sense… How would I go about it? Also would it create a greater delay to real time values?

1 Like

It wouldn’t create much delay. Not noticeable depending on how fast you set the values to increase to that current it could feel delayed. But it won’t have any impactful performance issues. To go about this you can do this storeC = currentSize storeF = futureSize if storeC < storeF storeC+=0.5 or whatever value.

1 Like

Thanks :slight_smile: will try it out and let you know…

What is the object / array you are animating? Ideally you should cross-fade over about 0.5 seconds between oldSnapshot and newSnapshot.

Its a particle-sphere…

Are there always the same number of points, and are the points well-ordered? Then you can just lerp each old point to the new point–eg PVector.lerp