Hello world of tech-people, n00b asking for help!
I want to connect my wiimote to osculator (it works) and then I want to connect it to Processing so I can decide wich movement triggers different mixing in a program called Virtual DJ (if you know another DJ program that works better, tell me).
I've just started "sniffing" on Processing and I have absolutely no knowledge at all about stuff like this, so if you know the answer...please explain it to me like I'm a 5 year old girl. Or just a girl in particular
This is what I've got:
/**
* Play a sound as a key is typed.
*
*/
import ddf.minim.*;
AudioPlayer player;
AudioPlayer player2;
Minim minim = new Minim(this);
AudioSample kick;
void setup () {
size(512, 200, P2D);
minim = new Minim(this);
// load a file, give the AudioPlayer buffers that are 1024 samples long
// player = minim.loadFile("groove.mp3");
// load a file, give the AudioPlayer buffers that are 2048 samples long
player = minim.loadFile("underthebridge.mp3", 2048);
player2 = minim.loadFile("underthebridge.mp3", 2048);
}
void keyPressed()
{
if (key == 's') player.play();
if (key == 't') player2.play();
}
// keep processing 'alive'
void draw() {}
void stop()
{
// always close Minim audio classes when you are done with them
kick.close();
minim.stop();
super.stop();
}
and I want to combine it with this (can't make this one work tho):
import oscP5.*;
import netP5.*;
OscP5 osc;
float[] pitchDraw;
float[] rollDraw;
float[] yawDraw;
void setup() {
size(400, 400);
osc = new OscP5(this,8000);
osc.plug(this,"pry","/wii/1/accel/pry");
osc.plug(this,"pitch","/wii/1/accel/pry/0");
background(255);
smooth();
noFill();
stroke(0);
// Drawing Wii values
pitchDraw = new float[width];
rollDraw = new float[width];
yawDraw = new float[width];
}
float pitch;
float roll;
float yaw;
void pry(float _pitch, float _roll, float _yaw, float _accel) {
pitch = _pitch;
roll = _roll;
yaw = _yaw;
}
void pitch(float _pitch){
pitch = _pitch;
print("pitch "+pitch);
}
void draw(){
}
I want the accelorometers data instead of the key-press to handle the MP3.
Thank you!
I want to connect my wiimote to osculator (it works) and then I want to connect it to Processing so I can decide wich movement triggers different mixing in a program called Virtual DJ (if you know another DJ program that works better, tell me).
I've just started "sniffing" on Processing and I have absolutely no knowledge at all about stuff like this, so if you know the answer...please explain it to me like I'm a 5 year old girl. Or just a girl in particular
This is what I've got:
/**
* Play a sound as a key is typed.
*
*/
import ddf.minim.*;
AudioPlayer player;
AudioPlayer player2;
Minim minim = new Minim(this);
AudioSample kick;
void setup () {
size(512, 200, P2D);
minim = new Minim(this);
// load a file, give the AudioPlayer buffers that are 1024 samples long
// player = minim.loadFile("groove.mp3");
// load a file, give the AudioPlayer buffers that are 2048 samples long
player = minim.loadFile("underthebridge.mp3", 2048);
player2 = minim.loadFile("underthebridge.mp3", 2048);
}
void keyPressed()
{
if (key == 's') player.play();
if (key == 't') player2.play();
}
// keep processing 'alive'
void draw() {}
void stop()
{
// always close Minim audio classes when you are done with them
kick.close();
minim.stop();
super.stop();
}
and I want to combine it with this (can't make this one work tho):
import oscP5.*;
import netP5.*;
OscP5 osc;
float[] pitchDraw;
float[] rollDraw;
float[] yawDraw;
void setup() {
size(400, 400);
osc = new OscP5(this,8000);
osc.plug(this,"pry","/wii/1/accel/pry");
osc.plug(this,"pitch","/wii/1/accel/pry/0");
background(255);
smooth();
noFill();
stroke(0);
// Drawing Wii values
pitchDraw = new float[width];
rollDraw = new float[width];
yawDraw = new float[width];
}
float pitch;
float roll;
float yaw;
void pry(float _pitch, float _roll, float _yaw, float _accel) {
pitch = _pitch;
roll = _roll;
yaw = _yaw;
}
void pitch(float _pitch){
pitch = _pitch;
print("pitch "+pitch);
}
void draw(){
}
I want the accelorometers data instead of the key-press to handle the MP3.
Thank you!