My friend has a KORG Electribe and i'm trying to receive his MIDI data. It works with note.getPitch(); but the synth sounds work on channels 1 to 5 and the kick works on channel 10. So there are two note.getPitch values that are two different sounds, is there a way to seperate these? Something like:
if (note.getChannel == 10){
dataKick = note.getPitch();
}
and
if (note.getChannel == 5){
dataSynth = note.getPitch();
}
Also the length of the synth is kinda important, especially when you use apreggiators. But i can't seem to find the length of a note? Only the velocity, wich is always 120 with a KORG Electribe. Or is it a noteOff singal that is begin send ?
I'm making a drawing sketch but i want to draw some guidelines also, but they can't stay on the screen forever. Is there a way to program my sketch so that my actual drawing stays and the guidelines move around and update.
I'm generating my drawing with line() and i use 2 variables 'p' and 'pOld'. 'pOld' is the previous location of 'p'.
So I'm writing a sketch where I use translate en rotate a couple of times, to make some calculations. And with the last variable in my calculation i don't want the local position (wich stays (0,0) cause I'm only rotating it) but the global (seen from top left corner).
this function is from a script i wrote based of of jose sanchez his tutorials. its a flocking script.
this function is drawing lines between them when there within a distance of 20 pixels. but it also calculates distance between particle number 1 and particle number 1, wich is unnecessary.
and also if it already calculated the dist between particle number 1 and number 2, it does it again by calculating the dist between particle number 2 and number 1.
void lineBetween(){
for (int i = 0; i < ballCollection.size(); i++){
Ball other = (Ball) ballCollection.get(i);
float distance = loc.distanceTo(other.loc);
I'm using the Toxiclibs library, started from the example of additive waves.
I've underlined and bolded where the problem is.
I want to change the frequency of the square wave by moving the mouse in the X direction.
I think it has something to do with the fact that I'm making the waves in the void setup so that it only occurs one time, but i don't know how to fix it :/
When I click a button I want the sound to start in ableton and my parameters to change, but what processing does is constantly send noteOn's to ableton, what means that the clip constantly starts over, giving it some sort of noise.
What I want is that it sends a noteOn when I click, I keep my finger pressed on the mouse, the sound stays, and when I move the mouse the knob changes. when I release, the sound must stop.
I've been looking for a very long time for this and i'm stuck too long to not ask a stupid question :)
I'm working with a Kinect and when my hand is 200 units in front of my torso I want it to draw a ellipse, but when I go back with my hand, I want the ellipse to still be there so that I can make a new ellipse when I do it again.
Kinda like when you click, and a ellipse pops up at that location, but when i click again another ellipse appears.
As you can see in the code, when I return my hand to my torso, the ellipse disappears.
void draw() {
.....
rechthoek();
....
}
void rechthoek(){
noStroke();
float relz = tz - lhz; // relative distance in z direction from left hand to torso
if(relz > 300){
ellipseMode(CORNERS);
fill(r,0,0);
ellipse(lhx,lhy,rhx,rhy);
r = r - 5;
if(r == 0){
r = 0;
}
}
}
I'm working on a FFT Audio Analyzer via Internal Routing that can send OSC Data.
So I'm getting data from say Windows Media Player to my processing in three bands, High, Mid and Low.
What I want to know is if there is a way to smooth these data inputs. Is there a way to dampen the data so that it doesnt immediatley jump to high peaks?
I used alot of search terms like easing, damping, smoothin, etc... but couldnt find anything.
VVVV has a really simple solution that is called damping but i don't think processing has that.
Someone got a hint in wich direction i need to look for?
I'm working on an spectral analyser, and I want to use the sound of my computer via Internal Routing (Virtual Audio Cable). Now i don't know how to specify that I DONT want to use my Mic In but I want to use my Virtual Cable 1. I'm thinking it has to do something with getLineIn, but dont know the correct syntax.
Here is my code:
import ddf.minim.*;
import ddf.minim.analysis.*;
Minim minim;
AudioInput in;
FFT fft;
int w;
int q = 2;
void setup() {
size(600, 300);
minim = new Minim(this);
in = minim.getLineIn(Minim.STEREO, 512);
fft = new FFT(in.bufferSize(), in.sampleRate());
fft.logAverages(60, q);
stroke(255);
w = width/fft.avgSize();
strokeWeight(w-4);
strokeCap(SQUARE);
}