MuseSharp, a complete, light-weight MCP library for .NET, with a scrolling chart UI


So far, the UI only supports real-time display of a single EEG channel, or accelerometer channel, but I’ll address this soon
Simply hit File -> Discover to discover your Muse headset via Bluetooth (connection, and streaming in preset 14 mode will start automatically).
Please report any issues


  • All Muse packet types implemented
  • Very simple user interface, giving feedback for current connection status
  • Simple interface for connecting to, and streaming from your Muse device (using 32feet.NET)
  • User-state persistence allowing 1-click connect, once a device has been discovered
  • Lightweight processing of streaming data, using (mostly) bit-shifting for binary arithmetic
  • Scrolling chart, showing real-time EEG data (single-channel at the moment), or accelerometer data
Future directions:
  • Implement more charting features
  • Signal processing, real-time wavelet analysis


Code looks good Hashmeer Good Work!


Thanks! Hope it’s useful to someone
This real-time binary stream processing is completely new to me, and it was a lot of fun putting together the app


Great job Hashmeer,

It will certainly be very useful, not only the library (why not make it a COM DLL ?) and the application itself, but there is also much to learn from your coding expertise. Thanks for sharing.
I am impressed with your programming speed - I think we should suggest Interaxon to hire you for the development of their API :slight_smile:

On the other thread (btw very polite of you), but if you read carefully you are asking “my” permission to implement “your” idea! (I’ll answer there later).

Below is my first test with your MuseSharp, looks great!


Now it is possible to extend MUSE to window 8.1 phone. Good Job! We need more testing to show that the data generated from MuseSharp is as good as MuseIO.


HI Eduardo, could you please point to reference how the heart beat data is captured? Thanks


Eduardo, thank you for your kind words! It’s my pleasure. I don’t remember in which thread you posted it, but the idea was yours. I’m happy to claim it though if you insist :wink: Unfortunately, I only know .NET, and my impression from forum posts is that the guys at Muse don’t have a lot of love for the Microsoft “family”. I do have a very strong background in biophysics, signal processing, and mathematical modelling though, which I’ve been dying to dive into again since I left academia… Can’t wait to get stuck in to that part of my app, when the time comes

DavTomas, I really hope it works for you, drop me a line if you need help. I’m not sure that the bluetooth library that I’m using in my solution (32Feet.NET) is compatible with WP8… DavidVivancos demonstrates connection to Muse via in-built .NET libraries in his solution, in case that helps


DavTomas, we are already using it for Windows phone.

you can adapt our code here: , you dont neeed 32Feet, change the serialport stuff with PeerFinder, & StreamSocket classes to do the comm stuff with Muse, just mind to connect to HostName 1 of the Muse.


HI Hashmeer,
=> one interesting way (I google) to implement wavelet analysis for EEG is e.g. Matching Pursuit, please see ,

HI DavidVivancos,
IF you have a simple working WP 8.1 version of your code, I would like to take a look.


DavTomas, our WP code is embeded in our code so not shareable at this point, but with Muse code from my previous post you only need to deal with the bluetooth simple connection stuff, ie: and adapt the code.


Thank[B]s Hashmeer. This works amazingly good! Can you please tell us how to set notch filter to 50Hz. Where is that in the code[/B]?


Hi Marko, thanks!
I’ll put this in the next release which I’m hoping to get done tonight. I’ll put a message here when I’ve updated the project.


Committed the latest version, includes functionality to record and output raw data (as 10-bit integer values) from EEG channels, and also display the Fourier transform of the stream (top-right, averaged over several time-points), and its time-dependent predominant peak
The values for the EEG channels in Muse Lab are given in mV (I’m guessing, since the average is usually around 840 - 850 mV, which is what one should expect), but I don’t know how to normalise the raw values I get from the Muse, which average at 512. If someone knows, please tell me, and I’ll normalise the values in MuseSharp too.


Thanks Hashmeer, to get the uv from the raw
[SIZE=2]uV=(x/1023)3.3V(1/A)*1000000; x= this value; A=gain of AFE(Analog Front End)=1961. Max microvolts: 1682, Min microvolts: 0[/SIZE]


HI Hashmeer, Just downloaded the latest version, the Colour.cs is missing in Common.dll


Thanks hashmeer


you can also check for google free chart or Koolchart.


Hi Hashmeer,
Where can i find the Color.cs??