import processing.serial.*; import processing.sound.*; import gohai.glvideo.*; SoundFile[] soundfile = {null,null,null,null,null,null,null}; GLMovie video; Serial myPort; String dataIn = ""; char linefeed = '\n'; int currentLang = 0; int ms = 0; String[] langs = {"NONE","Italian","English","Spanish","German","French","Russian"}; void setup() { size(1920, 1080, P2D); for(int i=0; i 0 ? ms-1 : 0; } tint(255, ms); /* float sw = textWidth(langs[currentLang]); fill(255); stroke(255); textSize(16); textAlign(CENTER, CENTER); text("Selected language:", width/2, (height/2)-50); textSize(22); text(langs[currentLang], width/2, height/2); */ } void serialEvent(Serial thisPort) { if(myPort.available() > 0) { dataIn = myPort.readStringUntil(linefeed); if (dataIn != null) { String[] split = dataIn.split("\t"); currentLang = parseInt(trim(split[1])); for(int i=0; i "+currentLang); } } }