Forum rss-feed

Forum

Developers: Prototype open-source OSC EigenD agent available

STICKY

written by: geert

Hi everyone,

Given the current developer interest and barnone's motivation to dig into the code, Jim has spent some time creating a prototype EigenD agent that is able to output EigenD data streams directly through OSC.

This implementation is just a start and was quickly written in two days to bootstrap the learning process of users that wish to participate in the development. Its serves both as a documented example for creating agents as well as an initial step towards the OSC plans that we've been making. As time progresses, our OSC support will mature and the EigenD OSC protocol will be formalized in more detail, but this should give you an idea of the direction we're heading into. We've discussed various approaches towards how to handle the OSC representation over the network and have hit limitations of the network stack in the past due to the massive amount of performance data that the Eigenharp generates. This performance data is essential to the expressiveness of the Eigenharp and we obviously want to allow it to be exposed in as much detail as possible. The document named "OSC" that comes with this example agent briefly explains what we consider the best approach, it will mature as we further work on the OSC support.

The document named 'Roadmap' explains how to use this OSC agent and gives a high-level developer-centric explanation of EigenD's internal architecture. The source code is heavily documented and should make it easy to adapt towards any other functionalities that you might want to implement with an agent.

The source code can be found on GitHub in the 1.4 branch of EigenD. Here is a direct link towards the source of just the plg_osc agent:
https://github.com/Eigenlabs/EigenD/tree/1.4/plg_osc

More information about getting involved in EigenD development can be found on this wiki page:
http://www.eigenlabs.com/wiki/Developers/

Please realize that we have very limited resources to provide direct support to external developers as we're hard at work wrapping up the initial release of EigenD 2.0 and Workbench. We hope that this example will give you enough information to make EigenD development more accessible.

Take care,

Geert

written by: geert

Sat, 8 Oct 2011 13:32:28 +0100 BST

Hi everyone,

Given the current developer interest and barnone's motivation to dig into the code, Jim has spent some time creating a prototype EigenD agent that is able to output EigenD data streams directly through OSC.

This implementation is just a start and was quickly written in two days to bootstrap the learning process of users that wish to participate in the development. Its serves both as a documented example for creating agents as well as an initial step towards the OSC plans that we've been making. As time progresses, our OSC support will mature and the EigenD OSC protocol will be formalized in more detail, but this should give you an idea of the direction we're heading into. We've discussed various approaches towards how to handle the OSC representation over the network and have hit limitations of the network stack in the past due to the massive amount of performance data that the Eigenharp generates. This performance data is essential to the expressiveness of the Eigenharp and we obviously want to allow it to be exposed in as much detail as possible. The document named "OSC" that comes with this example agent briefly explains what we consider the best approach, it will mature as we further work on the OSC support.

The document named 'Roadmap' explains how to use this OSC agent and gives a high-level developer-centric explanation of EigenD's internal architecture. The source code is heavily documented and should make it easy to adapt towards any other functionalities that you might want to implement with an agent.

The source code can be found on GitHub in the 1.4 branch of EigenD. Here is a direct link towards the source of just the plg_osc agent:
https://github.com/Eigenlabs/EigenD/tree/1.4/plg_osc

More information about getting involved in EigenD development can be found on this wiki page:
http://www.eigenlabs.com/wiki/Developers/

Please realize that we have very limited resources to provide direct support to external developers as we're hard at work wrapping up the initial release of EigenD 2.0 and Workbench. We hope that this example will give you enough information to make EigenD development more accessible.

Take care,

Geert


written by: NothanUmber

Sat, 8 Oct 2011 14:19:19 +0100 BST

Thanks a lot, especially the overview and brpc description in the "Roadmap" chapter will help tremendously to get started for all sorts of agents.

Greetings,
NothanUmber


written by: dhjdhj

Sat, 8 Oct 2011 23:45:09 +0100 BST

Can I use this agent with an existing EigenD app (I.e the stable 1.3 or test 1.4 version) ?
I'd love to just try and connect directly to Max and get that going.
Also, assuming this works, is it worth having a Max forum for posting patchers? I eider how many other existing users already have access to max?


written by: geert

Sun, 9 Oct 2011 00:12:36 +0100 BST

This is a prototype agent, not intended for real use. It has been written in two days, immediately made available without extensive testing and is geared toward developer documentation. The 'Roadmap' document explains how to use it as a developer with EigenD 1.4. It is however unsupported, untested and is almost certainly not going to behave the same as the official OSC support that we've planned.


written by: dhjdhj

Sun, 9 Oct 2011 16:11:06 +0100 BST

Thanks, Geert. A changing OSC specification is not a concern --- it would simply mean that a bottom level Max patcher dealing with OSC input would get changed as the specifications change. It would still (for me) pass the same information back to higher level Max objects.

The [speedlim] Max object will no doubt be very helpful to thin out the data so that MIDI processing doesn't get overwhelmed.

I'll have a go trying to get that agent working...frankly I haven't even turned on the Eigenharp in months and so have forgotten whatever little I ever knew (grin). But direct access with Max is a very exciting prospect, worth the pain. I assume however form your message that I will be able to get that agent working with the 'stock' 1.4 version that is already built.

It is however unsupported, untested and is almost certainly not going to behave the same as the official OSC support that we've planned.


written by: dhjdhj

Sun, 9 Oct 2011 19:30:18 +0100 BST

I've installed the CNMAT libraries which includes the OpenSoundControl package to facilitate creation of Max data from incoming UDP packets.

If somebody actually gets an OSC agent working with EigenD and can give me whatever is needed to get it going WITHOUT having to build stuff first, I would really appreciate it. Would love to spend time building a collection of Max objects for the EigenD.

By the way, doing this will require me to get another BaseStation as my BaseStation Pro is built in to a rack that travels with my live rig. Is there any reason why I need another Pro or could I just use the regular base station? (I don't need to connect pedals or anything)


written by: john

Sun, 9 Oct 2011 21:49:58 +0100 BST

David

The OSC Agent prototype is very unlikely to make it into the 1.4 series formal releases, as Geert said it's completely untested and is unsupported as a result. 1.4 is also now in Testing and has been feature frozen. You'll need to compile an EigenD yourself I think if you want to play with it.

It's purpose is an aid for people wanting to write their own Agents - Jim spent a long time commenting it's code to this effect (quite a bit longer than he spent writing it in fact) and adding the Roadmap document to outline the broad system architecture from a developers viewpoint. There has been a lot of interest in writing Agents and an OSC Agent seemed like a great one for people to play with from a coding point of view - it illustrates a lot of things about EigenD that one needs to understand in order to work with it and enables people to mess with getting data out of the system over the network as they develop.

The other thing you might want to bear in mind is that the data that is being shipped via OSC doesn't look anything like MIDI - it's performance data streams and does not contain the idea of notes as such. If you want MIDI style data you are a lot better off with one of Geert's new MIDI only setups and a Coreaudio virtual MIDI connection to MAX - the new(ish) MIDI routing and configuration matrix gives you excellent control over how performance data is mapped, scaled and generally squashed into the MIDI format.

If you don't want pedals a standard Basestation will work fine for you - the only thing is that it uses a 'wall wart' rather than a built in power supply. It's a very high quality wall wart (medical grade in fact) but still, it's a wall wart.

John


written by: dhjdhj

Sun, 9 Oct 2011 23:14:08 +0100 BST

OK --- I haven't been able to get EigenD (open source) to compile so I guess I'm stuck. Maybe some other person outside of Eigenlabs who HAS been able to build an EigenD and integrate the OSC agent into it could give it to me (for a Mac).

As for the OSC, I was assuming that "performance data" means I could get raw information about what keys were pressed (or released), and such things as pressure values, roll/yaw amounts and so forth. I don't need MIDI and in fact by the time it is turned into MIDI, it's too late as information has already been lost.

If that's the case, then once I get hold of an EigenD with OSC, then I'm good to start creating Max patchers to process incoming OSC data, which is real easy to do.


The reason I would need another basestation is because my development environment is nowhere close to my performance environment.

D


written by: barnone

Mon, 10 Oct 2011 03:17:33 +0100 BST

Geert & Jim.

Thanks for taking the time. I know you don't have a lot to spare. I just got back from a weekend off the internet, so I'll be digging in shortly.

[edit] Just poked around a bit. This looks fantastic! Great orientation docs regarding the source tree and look at those comments in the source code. Thx guys.

Chris


written by: barnone

Tue, 11 Oct 2011 02:57:28 +0100 BST

It's alive!!

Nice instructions!

/keyboard_1/key/5 siffff "44" 43 2.000000 0.054688 -0.016602 -0.007812
/keyboard_1/key/5 siffff "44" 43 2.000000 0.056641 -0.011719 -0.003906
/keyboard_1/key/5 siffff "44" 43 2.000000 0.058105 -0.010742 -0.002930
/keyboard_1/key/5 siffff "44" 43 2.000000 0.058838 -0.009766 -0.004883
/keyboard_1/key/5 siffff "44" 43 2.000000 0.059082 -0.013672 -0.006836
/keyboard_1/key/5 siffff "44" 43 2.000000 0.059570 -0.017578 -0.008789
/keyboard_1/key/5 siffff "44" 43 2.000000 0.060547 -0.017578 -0.005859
/keyboard_1/key/5 siffff "44" 43 2.000000 0.062256 -0.013672 -0.000977
/keyboard_1/key/5 siffff "44" 43 2.000000 0.062256 -0.014648 -0.000977
/keyboard_1/key/5 siffff "44" 43 2.000000 0.061523 -0.015625 -0.000977
/keyboard_1/key/5 siffff "44" 43 2.000000 0.061768 -0.015625 0.000000
/keyboard_1/key/5 siffff "44" 43 2.000000 0.062256 -0.013672 0.000000
/keyboard_1/key/5 siffff "44" 43 2.000000 0.061768 -0.014648 0.000977
/keyboard_1/key/5 siffff "44" 43 2.000000 0.061768 -0.013672 0.002930
/keyboard_1/key/2 siffff "68" 67 0.000000 0.047363 -0.016602 0.041016
/keyboard_1/key/2 siffff "68" 67 0.000000 0.052734 -0.017578 0.038086
/keyboard_1/key/2 siffff "68" 67 0.000000 0.059570 -0.013672 0.041992
/keyboard_1/key/2 siffff "68" 67 0.000000 0.063477 -0.013672 0.049805
/keyboard_1/key/2 siffff "68" 67 0.000000 0.065674 -0.011719 0.053711
/keyboard_1/key/2 siffff "68" 67 0.000000 0.069092 -0.011719 0.046875
/keyboard_1/key/2 siffff "68" 67 0.000000 0.072998 -0.009766 0.036133
/keyboard_1/key/2 siffff "68" 67 2.000000 0.074707 -0.008789 0.033203
/keyboard_1/key/2 siffff "68" 67 2.000000 0.073486 -0.013672 0.037109
/keyboard_1/key/2 siffff "68" 67 2.000000 0.073242 -0.016602 0.043945
/keyboard_1/key/2 siffff "68" 67 2.000000 0.073242 -0.017578 0.043945
/keyboard_1/key/2 siffff "68" 67 2.000000 0.071533 -0.010742 0.038086
/keyboard_1/key/2 siffff "68" 67 2.000000 0.066650 -0.008789 0.029297
/keyboard_1/key/2 siffff "68" 67 2.000000 0.061768 -0.012695 0.021484
/keyboard_1/key/2 siffff "68" 67 2.000000 0.058594 -0.013672 0.018555
/keyboard_1/key/2 siffff "68" 67 2.000000 0.054688 -0.014648 0.024414
/keyboard_1/key/2 siffff "68" 67 2.000000 0.049561 -0.013672 0.034180
/keyboard_1/key/2 siffff "68" 67 2.000000 0.043701 -0.018555 0.036133
/keyboard_1/key/2 siffff "68" 67 2.000000 0.038086 -0.025391 0.024414


written by: barnone

Tue, 11 Oct 2011 03:44:09 +0100 BST

Here's a MAX patch to intercept the raw OSC.

Interesting way you channel the OSC events using N event streams
/AGENT/eigend-port/N

I kinda like that approach. It makes it easier to track key off events and continuous data.

I really like the way you send a message to the admin port 9999 to register the callback. I imagine that port could register as an oscbonjour destination and be discoverable in the future.


----------begin_max5_patcher----------
536.3oc0U98aaBCDG+YxeEm34zLrgLn6spt8vj1OdXuroppJG3RhWAaD1LRV
U+eelCHKckD0tnI0Qjvx2cw962ObFtahm+B8Fz3CuAtB77tahmGEpMfW+bO+
BwlzbggJyOUWTfJq+ztbVbikh+AowhJPqfRckERBBhfk5JvtFgBzXDqPCHTY
PYkTYAqlx7wK9JzHUY5lgELWpvTcshV0v9fkBa5ZoZ0MUXpsSsggrYASAVRD
MLmFhRlE.W2+mjYjvzK99YICq9RsxpDEHk4hJoHeHiptPpxQK4R1dkaj+jJm
wc6vtZ001ghCZCd+jIs2ldhT7xbY5sNxHMCPCVf45FhWXdN7N4JT811oFzAy
awsKzhpLfAYBqnM9N7OC9ltFREJHcsP4VoVfSYkKgstTMRy5Qw97CicVv4sf
NLYOpGOebpG+Ri58H8QT+UU3p112pyVJL1cP8FFwwgx61b61RrCE996L8nfp
CQ7t1z3vtt0wIUzyjT7mCoX+EjRgMNc8HPUmURscLd7r.2OFbt6x+HTfEP9N
JtaflwCFmBguz5WN.E5dC1m+xku+SGw573WSlsyysmQNry4+m3b2yemAQ4Ov
S3jAmSMCbRvtFniAF1+Rvr+ACZyo2B9GeMjLPa7GRKittJcvt8JE9sExPiUp
DVoVsWM7GTyZYVFRoGjWgLqT65s5k.b8nO4dpJJ5InnvSPQtI2O4Wb6s5GE
-----------end_max5_patcher-----------


written by: dhjdhj

Tue, 11 Oct 2011 04:21:26 +0100 BST

I feel like Moses who never made it to the promised land!


written by: dhjdhj

Tue, 11 Oct 2011 12:17:31 +0100 BST

@barnone Any chance I could get a binary image of EigenD + that OSC agent from you so that I can play with the Max stuff directly?

Perhaps binaries of the builds could be included with the source on git so others who are Max users but not developers could play this stuff too.

D


written by: barnone

Tue, 11 Oct 2011 17:11:33 +0100 BST

I don't think anyone wants to start dealing with uploading binaries in the open source area. This stuff is definitely just a proof of concept to document how to build an agent for developers. It's very difficult to use for a non-developer right now.

What are the specific problems you are having building? Can you start a thread for getting you unblocked on building EigenD?


written by: dhjdhj

Tue, 11 Oct 2011 17:17:48 +0100 BST

I'm not in a position to install all the legacy tools that are needed to build EigenD. Nor am I an experienced "Open Source" developer. I am however a very experienced Max developer and would like to start creating patchers for processing raw Eigenharp data. I've been "bitching" (sorry, John) about this for the last year and a half.

I realize that the open source code is for proof of concept stuff for building agents, but I'm not interested in building agents, I just want enough working stuff so I can do some serious Max hacking for the Eigenharp --- that is at least something I can contribute back to the community.


written by: NothanUmber

Tue, 11 Oct 2011 18:15:51 +0100 BST

Perhaps this could help regarding legacy tools (in the current state you will most probably have to extend the OSC agent at some point so just having the binaries would be a big limitation):

http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4

Or if you are on a company machine where you can't "mess around" with the configuration then you most certainly have a virtualization solution available there - why not install Snow Leopard + XCode3 into a "legacy build VM"? Then you are independent and can build EigenD versions whenever you want.

Greetings,
NothanUmber


written by: dhjdhj

Tue, 11 Oct 2011 18:46:02 +0100 BST

Honestly, this is just not where I want to spend my time. It seems pointless to invest significant effort. Im never going to be exploring or developing in that platform. I'd like to be able to leverage what has already been accomplished and build new stuff


written by: NothanUmber

Tue, 11 Oct 2011 19:47:49 +0100 BST

Sigh... based on how much time you want to spend I am not sure whether you underestimate the effort required to rebuild major parts of EigenD in Max...
But ok, here some Mac OS X binaries based on the sources from saturday. (This is presumably not interesting for anybody but dhjdhj as beside the experimental OSC agent there is nothing to see what is not in the official 1.4.6 build - minus everything that's not included in the open source release. So please spare my traffic quota ;) ).
You still have to build yourself the matching minimal OSC setup as described in the Roadmap document via Belcanto commands though, didn't play with this yet.


written by: dhjdhj

Tue, 11 Oct 2011 20:23:22 +0100 BST

You misunderstand. I don't want to spend time dealing with legacy environments. I'm excited to spend time building Max patchers.

However, it's not my plan to replace core EigenD functionality although I suspect that it would not be that hard as Max has a lot of high-level functionality already built-in (as well as lots of 3rd party externals....someone just released a new timeline object for it, by the way).

I never got my head around stuff like Belcanto and agents but I would be interested to understand what they can do that could not be easily done with Max. Anyone care to comment on this?

(By the way, I have plenty of bandwidth available which I'm happy to share and so I can arrange for others to get stuff from me, if that would be helpful)


written by: NothanUmber

Tue, 11 Oct 2011 21:32:11 +0100 BST

Anyone care to comment on this?

Well, some point come to mind:
* Relying on Max would either nearly double the price of a Pico (if people have to buy Max just for being able to use it) or would greatly limit the potential user base (if you just want to address those who already own Max)
* the part that would have been replaced by Max is only a small part of what represents EigenD (essentially Max could presumably replace the Workbench and some parts of the Python code - the latter being presumably easier to understand and maintain than a Max patch of equal complexity). And the C++ parts would most probably also have to be written in C++ in the Max case, so there is no big advantage
* For many highlevel components in Max there are comparable third party APIs for (at least) C++ available which can be exposed to Python were helpful, so using Python/C++ doesn't mean you have to reinvent the wheel. E.g. the plugin host and much of the graphics aspects are from Juce as far as I understood etc.
And for many fundamental things like a control language (Belcanto) that allows on the fly reconfiguration just from the instrument, the network transparency that allows distributed setups etc. there are presumably no ready to use solutions for either Max nor anything else (only lower level protocols like OSC where you can start to build on).
* The number of people who know Python&C++ is undeniably bigger than the number of Max users, so the chance for open source contribution could be (potentially) higher.
* The future of Max is not in Eigenlab's hands. If Cycling74 runs out of money, decide to drop certain platforms or shift focus a Max based EigenD (which would presumably not have been significantly cheaper to develop) could suffer or even die with it.

So imho it not the question whether it couldn't also have been done with Max+C++ instead of Python+C++ (most certainly it could) but which advantages and disadvantages each solution brings - and at least I can understand why they went with the Python+C++ route :)

If you want to host the binaries linked above - feel free to do so :) Presumably future, more fledged out versions of the OSC agent might be more interesting for a broader audience then this one though.



Please log in to join the discussions