Examples and templates for Max/MSP/jitter, puredata, processing, Reaktor & Traktor
Native Instruments Reaktor
A macro for receiving OSC from Vavdo Knobs & buttons.
Download
macro mdl file Processing
In this example we receive OSC data from Vavdo knobs and in parallel we send OSC data in the LEDs. There are 4 different patterns for rgb lights and you can change the speed of the patterns progression through knobs 3 and 4. To run the example you must install the oscP5 library.
import oscP5.*;
import netP5.*;
NetAddress myRemoteLocation;
OscP5 oscP5;
public float k1,k2,k3,k4,k5,k6,b1,b2,b3,b4,b5;
void setup() {
size(80,80);
frameRate(1);
oscP5 = new OscP5(this,7000);
myRemoteLocation = new NetAddress("127.0.0.1",7001);
}
void draw() {
for(int i=1; i<2; i++){ lights1(); }
for(int i=1; i<2; i++){ lights2(); }
for(int i=1; i<2; i++){ lights3(); }
for(int i=1; i<2; i++){ lights4(); }
}
// send OSC
////////////////////
void lights1() {
for(int i=1; i<7; i++){
OscMessage osc1 = new OscMessage("/vavdo/a/l"+i);
osc1.add(new int[] {1,0,0});
oscP5.send(osc1, myRemoteLocation);
myDelay(k3/4);
OscMessage osc2 = new OscMessage("/vavdo/a/l"+i);
osc2.add(new int[] {0,1,0});
oscP5.send(osc2, myRemoteLocation);
myDelay(k3/4);
}
}
void lights2() {
for(int i=6; i>0; i--){
OscMessage osc1 = new OscMessage("/vavdo/a/l"+i);
osc1.add(new int[] {0,1,0});
oscP5.send(osc1, myRemoteLocation);
myDelay(k3/2);
OscMessage osc2 = new OscMessage("/vavdo/a/l"+i);
osc2.add(new int[] {0,0,1});
oscP5.send(osc2, myRemoteLocation);
myDelay(k4/3);
}
}
void lights3() {
for(int i=1; i<4; i++){
OscMessage osc1 = new OscMessage("/vavdo/a/l"+i);
osc1.add(new int[] {0,1,0});
oscP5.send(osc1, myRemoteLocation);
myDelay(k4/4);
OscMessage osc2 = new OscMessage("/vavdo/a/l"+i);
osc2.add(new int[] {1,0,0});
oscP5.send(osc2, myRemoteLocation);
myDelay(k4/4);
}
}
void lights4() {
for(int i=4; i<7; i++){
OscMessage osc1 = new OscMessage("/vavdo/a/l"+i);
osc1.add(new int[] {0,1,0});
oscP5.send(osc1, myRemoteLocation);
myDelay(k4/4);
OscMessage osc2 = new OscMessage("/vavdo/a/l"+i);
osc2.add(new int[] {0,0,0});
oscP5.send(osc2, myRemoteLocation);
myDelay(k4/4);
OscMessage osc3 = new OscMessage("/vavdo/a/l"+i);
osc3.add(new int[] {0,0,1});
oscP5.send(osc3, myRemoteLocation);
myDelay(k4/10);
OscMessage osc4 = new OscMessage("/vavdo/a/l"+i);
osc4.add(new int[] {0,0,0});
oscP5.send(osc4, myRemoteLocation);
myDelay(k4/10);
}
}
// receive OSC
////////////////////////
void oscEvent(OscMessage theOscMessage) {
if(theOscMessage.checkAddrPattern("/vavdo/a/k1")==true) {
k1 = theOscMessage.get(0).floatValue()+70;
println(k3);
return;
} else if(theOscMessage.checkAddrPattern("/vavdo/a/k2")==true) {
k2 = theOscMessage.get(0).floatValue()+70;
return;
} else if(theOscMessage.checkAddrPattern("/vavdo/a/k3")==true) {
k3 = theOscMessage.get(0).floatValue()+70;
return;
} else if(theOscMessage.checkAddrPattern("/vavdo/a/k4")==true) {
k4 = theOscMessage.get(0).floatValue()+70;
return;
} else if(theOscMessage.checkAddrPattern("/vavdo/a/k5")==true) {
k5 = theOscMessage.get(0).floatValue()+70;
return;
} else if (theOscMessage.checkAddrPattern("/vavdo/a/k6")==true) {
k6 = theOscMessage.get(0).floatValue()+70;
return;
}
}
// delay function
void myDelay(float ms)
{ try { Thread.sleep(int(ms)); }
catch(Exception e){}
}
PureDATA
Here is an example to simply receive OSC data from your Vavdo. The paths and the port are the factory defaults of Alpha controller. We used [import] for the mrpeach externals for OSC. So either you have to use pd-extended or add yourself the mrpeach externals.
And this is a patch to send OSC to Vavdo’s RGB LEDs. Interesting stuff may come if you include metros or dependencies from knob’s & buttons or by automating functions and patterns.
Download the
pd patch file Traktor DJ
A mapping setup for controlling effects and loops with Vavdo A2.
Download
tsi file