Getting Raw FFTs on iOS


On the developer site, one section describes the Raw FFT data which is available using the research tools:

Is this data available somehow through the iOS LibMuse library? I’d really like to be able to access this sort of spectral frequency data on mobile.


You can use my Muse Monitor app to display real time FFTs from Muse.

If you’re a developer, you should know that you have to calculate the FFTs yourself. LibMuse just gives you the RAW data at 220/256Hz. This makes sense because there are a ton of options for FFT calculation which you may or may not want. In Muse Monitor I calculate real time de-meaned FFTs with a hamming window and user selectable sample window between 0.5 and 16 seconds.


Thank you for the info! I’m not very familiar with FFT calculation and hamming windows though, could you recommend any good resources that I can use to find out more?


Wikipedia has good articles on FFT and Window functions which explain how and why they work.


Thanks, I think I’m starting to understand it better now. One thing, should the .muse files produced by Muse Monitor work with the IXNMuseFileReader? After unzipping a recording and trying to open the .muse file using the iOS muselib, I’m getting the error

LIBMUSE [E 6.307] muse_file_reader: level:4 code:2 info:Collection length is <= 0: either protobuf file or reader implementation is broken.

This is a result of the calls:

let filePath = NSBundle.mainBundle().pathForResource(“testfile”, ofType: “muse”)//A renamed file from Muse Monitor
let fileReader = IXNMuseFileFactory.museFileReaderWithPathString(filePath)


I would have thought they’d work ok, but, I’ve never tried it.
They were only tested with the Interaxon muse player app and Muse Lab.

Regarding the error you have, I am using the Interaxon protobuf file and entering all required values, so I’m not sure what could cause that error; unless there is a value required by the reader that is not marked correctly in the protobuf file.


I must be missing something - I’ve read about the protobuf file on the Interaxon site, but to read the .muse file, I’m just using the sample “playMuseFile” code provided in MuseStatsIos. However, that project has no protobuf file included with it. I’d assumed all that was built into the IXNMuseFileReader class. Did a skip a step somewhere?