Skip to content

Instantly share code, notes, and snippets.

@MaZderMind
Created March 4, 2018 20:15
Show Gist options
  • Save MaZderMind/ec0b4c4cd93828e3a06ea717e6585bf8 to your computer and use it in GitHub Desktop.
Save MaZderMind/ec0b4c4cd93828e3a06ea717e6585bf8 to your computer and use it in GitHub Desktop.
Ideas of how the DMX-Processiung might be programed
#include <DmxProxy.h>
PmxProxy dmxProxy(processing_function);
void setup() {
}
boolean processing_function(DmxFrame* in, DmxFrame *out)
{
; set output-channel 0-8 to value 127
out->setRange(0, 8, 127);
; set channel 9 to in-channel 0 and channel 10 to the inverse
out[9] = in[0];
out[10] = 255 - in[0];
; copy channels 1-6 from the input to 11-16 in the output
out->copyRange(11, 5, in[1]
; convert linear movement of in-channel 7 to cubic change of out-channel 17
out[17] = easeInCubic(in[7]);
; return false to drop this incoming frame
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment