I need to use the cam in processing but it's already used by OSC Face and it seems to be a problem. Is there a way to make one cam used by 2 softwares? In this case, Processing and OSC Face?
I try to code a program which display successively thousands of pics and hundreds of Gif.
I cant' declare them all so a float load one randomly while the previous one is displaying.
The part with the pics only worked just fine.
I tried to add the same program for diplaying Gif too (randomly choosing between a Gif and a Pic) and it just doesn't work
The Gifs are displaying fine (successively and randomly) but one pic (and always the same each time I launch the program) is displaying too, while the gifs are running.
So two questions here.
Why it's always the same Pic and the float isn't working?
How do I stop the Pic display function while the Gif is looping.
Here is my code.
/**
BBGif
Correction: romée by basile
*/
PImage img;
String[] files;
int timer;
float Pic ;
int PicFragNumber;
int xPic = 1191;
int speed;
import gifAnimation.*;
PImage[] animation;
float Gifanime;
int GifFragNumber;
int xGif = 74;
int n;
int framesPlayed = 0;
int picorgif;
int boopicorgif;
void setup() {
size(1300,760);
//Pic loading
float Pic = random(1,xPic);// a est une valeur au hasard comprise entre les deux valeurs données (n'apelle pas tes images "0001" mais "1");
int PicFragNumber = int (Pic);//fragNumber est l'arrondi de a (10,55 --> 11)
img = loadImage("Pic_" + PicFragNumber +".jpg");
//Gif loading
float Gifanime = random(1,xGif);// a est une valeur au hasard comprise entre les deux valeurs données (n'apelle pas tes images "0001" mais "1");
int GifFragNumber = int (Gifanime);//GifFragNumber est l'arrondi de a (10,55 --> 11)