This was just a short introduction to the possibilities MadMapper will offer in the future. Reply MadMapper replies with a message for each control that matches the URL_PATTERN, the address of the message is the address of a Control and the value of the message is the current value of this control.Įxample If we have one surface in MadMapper called “Quad 1” and we send a message with this address: /getValues?url=/surfaces/Quad 1/handles/.*&normalized=1 MadMapper sends back two messages without data on this addresses: /surfaces/Quad 1/handles/0/x 0.5 *Remark: RGBA and STRING values cannot be normalised, so MadMapper won’t send a reply for such addresses if normalised value is requested. ” – NORMALIZED (Boolean ): Defines if you want to receive the normalised value (FLOAT 0.0-1.0) or the value as it is (FLOAT, INT, BOOL, STRING, RGBA). A simple example is just the URL of a control “/surfaces/Quad 1/opacity”, but we might ask all controls of a surface using “/surfaces/Quad 1/. getValues?url=URL_PATTERN&normalized=NORMALIZED Parameters – URL_PATTERN ( String): The url pattern of the Controls we are looking for, as a regular expression. Get values is to receive the values of the nodes from MadMapper. Reply MadMapper replies with a message for each child of the requested node on the address of the node.Įxample If we have one surface in MadMapper called “Quad 1” and we send a message with this address: /getAddresses?root=/surfaces&recursive=0 MadMapper sends back two messages without data on this addresses: /surfaces/selected – RECURSIVE ( Boolean): Defines if MadMapper should send only the direct children of ROOT_URL node, or if it should send back all controls below this node. getAdresses?root=ROOT_URL&recursive=RECURSIVE Parameters – ROOT_URL ( String): The node from where to search for other nodes. Get addresses is to receive the available nodes from MadMapper. But I just want you to get an overview how it works.Īt the moment there are two addresses which will return data form MadMapper. It could change till public release and maybe will be extended. Now what are we able to send and to get specifically with MadMapper? The APIĪs I already mention, the API is still in just an early preview state. The code is not very nice, but it is just to get an idea: Simple Quad Editor Here is the code of my prototype in processing. This is like the same as in computer science the actor model. Osc.send(msg, madMapper) So the idea behind the API is to send a message that you want to have an information and get back an answer from MadMapper. But a message does always contain an address to which it is related to: OscMessage msg = new OscMessage("/getValues?url=/surfaces/Quad 1/handles/.*&normalized=0") Messages could contain data but it could also just be empty. void oscEvent(OscMessage msg) To send data to MadMapper we can just create a new message and send it. Here we can process the data we received. MadMapper = new NetAddress("127.0.0.1",8000) To get the OSC messages from MadMapper we have to declare a function called oscEvent. osc is my server and madMapper is the client: //init osc The drawback of this is that if you want to create a bidirectional channel between your software and MadMapper, we have to open a server and a client on each side.Īnd this is what I am doing in the processing example. The benefit of this is that it is really fast and simple. Or how many client’s are listening to our message. UDP gives us the ability to just send data and don’t care about, if the client is listening or not. OSC is a simple UDP network protocol between a server and multiple clients. I’ve written it in processing and you can find the code at the end of the post.Ĭheck out the video to get an idea how my prototype looks like:īefore I get into the API I give you a short introduction to OSC and how my prototype works. I started to create a prototype of a remote surface controller, which would be able to read data from MadMapper and also send back. The idea behind this is to provide a simple API over the OSC interface. So a few days ago, Matthieu sent me a link to a preview version of MadMapper 2.1.1 which will have extended OSC support. It just provides a simple OSC interface which is great for mapping controllers to the surface, but not a real api. Unfortunately MadMapper did not has this ability. Together with the Modul8 it is a powerful VJ tool for creating and presenting visuals.įrom Modul8 we were used to have a full python environment to create new modules and extend the software with other great tools. MadMapper from the Geneva based firm GarageCUBE is a great piece of software to create stunning visual mappings and even LED & light shows.
0 Comments
Leave a Reply. |