I have to build an application which send a command to a GrandMA over an artnet network.
I am trying this addon https://github.com/tobiasebsen/ofxArtNet but i can’t really understand how it works.
of course i read documentation about artnet protocol but in this library i can’t understand the kind of data i should send !
anyone into artnet ? and/or explain how to use these methods (like sendDmx() for instance) from this library ?
Are you using a GrandMA 1 or 2? If you are simply trying to send the console a command to trigger an executer button/fader, you would be far better sending a telnet command if its a 2. Or Midi trigger if its a 1 or 2. Another option is using OLA (opendmx.net).
I’ve never been able to get artnet to work with OF. Its been on my list of things I would like to have, but just hasn’t happened yet.
Yes i know i could use MIDI. There was actually already a patch doing this but it was in max and required a software midi interface to receive and send command to the GrandMA. So wanted to use oF with DMX and wanted to understand Artnet.
So i managed to make my app use Artnet. That was tricky but everything works fine now.
I should have a look to OLA anyway. What is it about exactly ?
I would love some code for Artnet if you don’t mind!
OLA is a pretty cool little app which basically takes anything in and converts it to anything out. Patching between too. Its very cool. Its a bit limited though with artnet since it sticks to the original Artnet spec of only being 4 universes.
//DECLARE AN ARTNET NODE
ofxArtnet anNode;
//DECLARE DMX DATA = 512 BYTES
unsigned char dmxData[512];
in testApp.cpp - setup()
// ARTNET SETUP
// IP is our Node IP : machine on which the app runs
// 0xFD corresponds to the Subnet+Universe we are referencing in Hexadecimal
// Here we have Subnet 16 (F) Subnet 13 (D)
anNode.setup("2.20.20.20", 0xFD);
// Building Data DMX frame
// DMX Frame is 512 bytes with value 0 to 255. Here we set every channel to 0.
for(int i = 0; i<512; i++) {
dmxData[i] = 0;
}
// Set DMX channel 1 with the value 255
dmxData[0] = 255;
in testApp.cpp - keyPressed(int key)
// When key stroke, send the DMX frame (dmxData) which is 512 Bytes long over artnet to the specified IP (Here GrandMA)
anNode.sendDmx("2.168.14.52", dmxData, 512);