I stuck at the point where I can track both hands… at the moment the code looks like this:
for (Hand hand : leap.getHandList()) {
PVector handPos = leap.getPosition(hand);
playerpos = handPos.y;
}
I just need the y axis but how do I transform the "hand" command to the second hand ? I use the LeapMotionP5 Library and somewhere I read that the first recognized hand is hand 0, the second one hand 1 … Would be great if anyone can tell me how to separately use them.
The gesture recognition example can handle two hands separately but has also this code:
I would like to let processing record a sound (microphone) and let it save this as a Boolean Array (?)
In the end it should be something like a morse code (yes /no ) to let the program in the following give me the opportunity of a comparison between the recorded sound and the current microphone input.
Hope you get the basic idea behind it ?!
So my question would be what's the easiest way to record and save a sound in Array?
hey. I guess this is pretty simple but I don't get it anway :( Hopefully anyone can help me out with this:
When I want to load a textfile i have to add the breaks ( \n) happening here
for (int i=0; i < news.length; i++)
{
s += news[i] + "\n";
println (s);
}
Well this works perfectly as long as I got only one textfile. My problem is that I now have about 15 files and I don't want to start my script with 15 times for…
Is there a way I can compress it in 2 for loops, my idea was:
for ( int j=0;j < 15; j++)
{
for (int i=0; i < news[j].length; i++)
{
s[j] += news[j][i] + "\n";
println (s[j]);
}
But this couldn't work because "s" isn't an array…
I got another question relating to the script I posted yesterday:
I have a map and I'm able to zoom in + out.
Now I have some popups you can push up when you click on diffrent places in the card.
The Problem:
When I'm zoomed in you can't see the popups anymore because they have a fixed size. Is there anyway I can scale it down/up when I'm zoomed ?
the zoom is generated here:
void mouseWheel(int delta) {
zoom = zoom+=delta;
the map is translated by:
translate(0, 0, zoom);
zoom is 400 when you start the programm.
I think the problem is that the popup is a class… That's why the translate doesn't affect the popup ( the popup.generate code is mentioned in another class!)
perhaps anyone can help me out with that :) Would be pretty great :)