How to save pictures to new folder

edited February 2016 in Library Questions

Hi guys, so I have this bit of coding I'm working with which I'm doing for a research. Test run went ok...ish.

Here is a bit of code I'm using to record a reaction of participants being played a sound. However, when I run it few times, images of users are getting mixed and I had to move them to separate folders one by one, which takes way too much of my time. Here is the question.

Can a new folder be created on mouse release, so when the new mouse press is happening, images are saving to a new folder, so basically each users footage would be saved into a separate folder on my disc. Any ideas? Here is a bit of code I'm using to run the application:

import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;
import processing.sound.*;
import processing.video.*;
Minim minim;
AudioPlayer one; //variable name
Capture cam;

void setup(){
//println(Capture.list());
  size(640,360);

 cam = new Capture(this,640,360,30);


  minim = new Minim(this);
  one =minim.loadFile("german.wav");


}

void draw(){

  //background(0);
 if (cam.available()) {
    cam.read();
if (mousePressed == true);    
     saveFrame();
  }


image(cam,0,0);

}

void mousePressed(){
 //if (mousePressed == true);
  one.loop();
  cam.start();
  //  saveFrame();
}

void mouseReleased()
{
  if (mousePressed || true);
  one.close();
  one =minim.loadFile("german.wav");
  //cam.close() 
  cam.stop(); 
} 

Answers

Sign In or Register to comment.