OSC server with C++ and Visual Studio 2010?


I want to install OSC server on my laptop which runs on windows 7. I want to use Microsoft visual studio 2010 for taking all EEG data from MUSE. please help me out with the OSC server of C++ installation asap.


Hey Suhas,

We use liblo (http://liblo.sourceforge.net/), which is in C. It’s well documented and comes with good examples: http://liblo.sourceforge.net/example…_server.c.html

Another one I know of that is actually in C++ is oscpack (http://www.rossbencina.com/code/oscpack) It comes with examples as well. You should be able to just integrate the basic SimpleReceive.cpp code into your own. Haven’t used it myself, though, so fair warning.

Let me know how it goes!


Hi tom,
Now, am trying to install Pyliblo in my windows laptop. Below is a screen shot of the error that i am getting when i type “python setup.py build”. Please help me out to debug the error.


Suhas, can you copy and paste the text of the error here? For some reason the image you attached is very small, and I can’t read any of the text in it.


Hi Suhas,

Last year I tried to install PyLiblo in my windows 7 also, and it was a nightmare, since Pyliblo is just a wrapper for Liblo and building Liblo on windows gave me just headaches.

I don’t remember how I got it but at the end I realized that for using it just with Python 2.7 all I need to do is to copy these 3 files from the Muse installation directory to my C:\Python27\DLLs directory and everything worked fine with Python IDLE interface (note: I don’t know what to do for use with Visual Studio):
pthreadVC2.dll [/B]

(I could not just register liblo.dll with regsvr32 so I was not able to use it with other developping tools)

          Hi Tom and Eduardo,

I have uploaded a new pic of the same error i am getting. Even after copying those three files from Muse Installation files as said by Eduardo , i am getting the same error when i try to build setup.py file. ( “python setup.py build” ).
If at all i think pyliblo is installed after copying those three files, “lilblo 0.28” needs to be installed next. Please help me out with installing both.


Hi Suhas,

I’m not quite sure I understood what you want to do:

  • building pyliblo-0.9.2 for using liblo inside Python27 ? (developping in Python?)
    (pyliblo is just a wrapper for liblo enabling its use inside Python.[B] liblo 0.28 needs to be installed first [/B]- so setup of pyliblo can find liblo’s libraries)
  • or just install any OSC server for use with Visual Studio? (getting Muse EEG data with VS2010 and rebroadcasting to your network) ?
    (in this case I believe you will find better/easier installation OSC packages)

By copying the 3 files I mentioned in my first post above to my C:\Python27\DLLs directory was all that I needed to use liblo inside Python IDLE, not using Visual Studio at all.
(the picture I have posted is of an old installation of Muse’s SKD in my laptop, and I made the copy and test showed above just before writing my post to you. I do not even have VS installed in my laptop, and do not have Pyliblo installed also).

I just did a search in my desktop computer trying to find what I did last year to get pyliblo to install with success in my Windows 7 (using Visual Studio 2008 to build and link liblo.dll)
As I said, it was a nightmare … the error you mention above is just the first of a series of about 10 errors that will come after this one.

At that time I found the article in the link bellow that has helped me a lot, but I still had to edit and make some changes in my PyLiblo SETUP.PY file:


Bellow is the part of what my setup.py looks like after all changes (all changes inside extra_compile_args section):

ext_modules = [
        [use_cython and 'src/liblo.pyx' or 'src/liblo.c'],
        extra_compile_args = [
        libraries = ['C:\\pyliblo-0.9.2\\liblo-0.28\\lib\\ReleaseDLL\\liblo']

But read that article first, before making any changes (BTW: I uncompressed liblo-0.28 installation files inside my pyliblo-0.9.2 directory)

HTH, Eduardo


hi Eduardo,
Thanks a lot for that link you have sent. Now i am completely done with building pyliblo. :slight_smile:
i am just not getting weather i should start developing with [B]python[/B] or [B]C/C++ language[/B]? please suggest me any one of these. and please send me any sample code to get readings from muse.


Hi Suhas,

Glad to know you got it ! much faster than me :slight_smile:

I don’t feel like able to suggest how to start … I’m a 64 years old electronic engineer, and changed career to analysis / windows development 35 years ago when the procedural programming was the only way to go. When the OOP paradigm started by the midle’s 90’s it was a pain to me, and I allways hated C, C++, C# and .NET languages :slight_smile:
What I’m doing now is only for Arduino, wich is a very limited C/C++ based language, but easier and enough to what I want to do. But my code is very dirty and hard to anyone else to read.

I’m pretty sure that the topics bellow, from Interaxon and other users contributions (all open source) will help you find your own and better way to go, ok ?

Good luck !


[B]MusePlayer by Interaxon (Open Source in Python)[/B]
MusePlayer is a utility for recording, replaying, rerouting, and converting EEG and accelerometer data from Interaxon Muse EEG devices. It can save to and convert between the native Muse datatype (.muse), Matlab (HDF5), CSV, and OSC replay formats.

[B]Muse Communication Protocol - MCP[/B]
(A must, if you want to connect direct to Muse and get its data)

[B]Bluetooth connection to Muse [/B]
(Using the Muse Communication Protocol - MCP, and how to parse the compressed EEG packets)

[B]MuseSharp C+ by Hashmeer[/B]
A simple app written in C# for streaming, and charting raw data from the Muse headset.

[B]MuseDotNet by David Vivancos[/B]
Muse EEG Bluetooth Direct Connection Class for Dot Net (C#)
First Implementation of Interaxon Muse Communication Protocol

Bluetooth Connectivity on Linux

OK Eduardo, thanks a lot for those suggestions. Hope i will find a way to do some coding using MUSE now. :slight_smile:
I will get back to you once i start working on Arduino.


Hi all, i have posted one more issue about error while executing python code. Please go through below link