Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

ofxArtnet | control individual channels x512

$
0
0

@novas_fronteiras wrote:

hi there!

i am getting into ofxArtnet, by hiroyuki, and am only having success to send 3 channels through artnet to a dmx equipment (code below). but, actually, would like to know how to send individual channels throughout all 512 channels of one universe.

it seems that before you could send something like artnet.sendDmx(ip address, dmxData, 512);, but not in this version of the addon, as i found out.

in short, i would like to specify directly channel 1 (value 0-255), channel 2 (value 0-255), … , channel 512 (value 0-255), but only can change 3 channels on the way below by altering red, green and blue of ofColor.

ofApp.h

ofFbo fboArt;
ofxArtnetSender artnet;

ofApp.cpp

#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){
	fboArt.allocate(1, 1, GL_RGB); 
	artnet.setup("192.168.1.200");
}

//--------------------------------------------------------------
void ofApp::update(){
	fboArt.begin();
	ofClear(0);
	ofColor color;
	color.r = 255;
	color.g = 255;
	color.b = 255;
	ofSetColor(color);
	ofDrawRectangle(0, 0, 1, 1);
	fboArt.end();

	ofPixels data;
	fboArt.readToPixels(data);
	artnet.sendArtnet(data);
}

//--------------------------------------------------------------
void ofApp::draw(){
	ofBackground(0);
	ofSetColor(255);
	fboArt.draw(0, 0);
}

also tried to send unsigned char directly into data, but it seems to only receive pixels data.

any tips, would be great!!
thank you!

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles