Page 1 of 1

Extension API for MadMapper

Posted: Fri Oct 02, 2015 8:07 pm
by cansik
Dear Garagecube Developers

I think you heard it a lot but it is still a feature which is missing in MadMapper. It would be great if we would have an API to interact with MadMapper and get informations about the current setup.

I would like to build an app which let you move the handles of the surfaces in MadMapper to map directly in front of the object and let the laptop behind the desk.
OSC would work to just move the handles but I can't get a list of the current surfaces.

At the moment we don't need a full python environment like in Modul8 but if this is the simplest way for you, got for it. It would just be great to interact with MadMapper.

What do you think?
Is this planned for the (near) future?

Thank you & cheers
Florian

Re: Extension API for MadMapper

Posted: Mon Oct 12, 2015 9:49 pm
by Xaver2k
+1

Re: Extension API for MadMapper

Posted: Wed Oct 14, 2015 9:40 pm
by mad-matt
Hi,
We were thinking to add the possibility to request the list of nodes and their value from OSC. if you'd like to test, send me your email in PM.
Cheers,
Matt

Re: Extension API for MadMapper

Posted: Fri Oct 30, 2015 7:36 pm
by franz
@cansik: we usually listen to our users ... ;) cannot say more

Re: Extension API for MadMapper

Posted: Wed Nov 18, 2015 3:28 pm
by cansik
@franz It seems like you do :D Thank you!
I'm testing it at the moment:

https://vimeo.com/143710495

Re: Extension API for MadMapper

Posted: Wed Dec 16, 2015 6:00 am
by broken
cansik wrote:@franz It seems like you do :D Thank you!
I'm testing it at the moment:

https://vimeo.com/143710495


That is very cool.

I was just thinking about the possibility of something like this in order to perform chases or "bumps" (http://chaser.hybridvisuals.nl/) like the Resolume community is mad about, where each surface is activated/deactivated in a pattern or via timeline.
I just didn't know of a way to grab the data for the surfaces.. but if all this is possible via OSC I'm wondering if it would be possible to setup in Lemur/TouchOSC to manipulate or toggle surfaces on or off.

Is it just the list of nodes/values for the handles that are able to be requested, or are there other values that can be grabbed and manipulated as well? Very curious :)

Re: Extension API for MadMapper

Posted: Wed Dec 16, 2015 5:19 pm
by cansik
broken wrote:Is it just the list of nodes/values for the handles that are able to be requested, or are there other values that can be grabbed and manipulated as well? Very curious :)


Thank you! Yes it is possible to get a list of controls like surfaces and it is also possible to get the actual values. But these two functions are not in the public release at the moment. I'm currently just testing the alpha builds.

Setting the value should be already implemented in the current version. You don't have to map the OSC address, you can just call the address you would like to change and MM will set the value to it. But without getting the controls and values it makes not much sense.

Building a chaser would of course be possible with this API :)

Re: Extension API for MadMapper

Posted: Wed Dec 16, 2015 7:24 pm
by broken
cansik wrote:
broken wrote:Is it just the list of nodes/values for the handles that are able to be requested, or are there other values that can be grabbed and manipulated as well? Very curious :)


Thank you! Yes it is possible to get a list of controls like surfaces and it is also possible to get the actual values. But these two functions are not in the public release at the moment. I'm currently just testing the alpha builds.

Setting the value should be already implemented in the current version. You don't have to map the OSC address, you can just call the address you would like to change and MM will set the value to it. But without getting the controls and values it makes not much sense.

Building a chaser would of course be possible with this API :)


Thank you for the reply! This is great news.. I imagine a chaser could even be implemented in something like Vezér since it already does the timeline thing very well and works great with OSC. At least once the API is out of alpha/beta. (edit: it's kind of possible with the surface opacity being available via OSC, - can't quite get the visibility flag to work, which would be ideal)

This is all very exciting! This API thing was a fantastic suggestion :)

Re: Extension API for MadMapper

Posted: Mon Jan 25, 2016 12:20 am
by fastfourier
Thank you very much for implementing this API. This certainly beats wading through the XML/SVG output.

Can you make it do polygons next? Please?

Re: Extension API for MadMapper

Posted: Fri Feb 19, 2016 3:15 pm
by cansik
For all who want to use this API (which still is under development) I have created a github repository which contains a documentation and some examples. The examples have been written for MadMapper version 2.2.2.

Since then the API already changed so it really is not very stable. I didn't update the documentation yet (maybe this weekend), but it should work with version 2.2.2.

https://github.com/cansik/madmapperapi

If you have something to contribute or have some questions just open an issue.

Re: Extension API for MadMapper

Posted: Thu Feb 25, 2016 9:17 am
by btownshend
Thanks for the API -- that's great!

One request: it would be great if the mesh coordinates could also be sent/received via OSC. I have an application that does an autoalignment using a camera and test images, but setting the mesh coordinates is then a manual affair once they are determined.

Thanks!

Re: Extension API for MadMapper

Posted: Fri Feb 26, 2016 10:15 am
by cansik
What do you mean with mesh coordinates?

Re: Extension API for MadMapper

Posted: Tue Apr 19, 2016 1:46 am
by btownshend
I thought I had replied to this previously, but apparently not...

What I mean is that when a mapping is setup that uses "Mesh Warping", the anchors for that mesh can be moved via the GUI, but there is no way to set or query them via the OSC interface.

Similarly, when a mask is added, the coordinates of the vertices of the mask cannot be set or retrieved via the existing OSC API using getControls or getControlValues.

Re: Extension API for MadMapper

Posted: Sat Apr 23, 2016 4:46 pm
by fastfourier
I would love to be able to get the mask handles especially!