class PitchTextLayer extends Layer { // La courbe Haut: Pitch PitchTextLayer(PApplet parent) { super(parent); } void setup() { // textFont(maFonte); smooth(); noStroke(); } void draw() { if (Tete > 0) { // Texte courbe Haut pitch NombreDeChild2 = kidkid1Data[CoucheHaut].getChildCount(); if (IndexXMLHaut < NombreDeChild2) { kid1 = kidkid1Data[CoucheHaut].getChild(IndexXMLHaut); // n = kid1.getInt("n"); xmin = kid1.getFloat("xmin"); xmax = kid1.getFloat("xmax"); Content1 = kid1.getContent(); // println("Child(" + IndexXMLHaut + "): n = " + n + " xmin = " + xmin + " xmax = " + xmax + " " + Content1); if (Content1 == null) IndexXMLHaut = IndexXMLHaut + 1; else if (Content1.equals("_") == true) IndexXMLHaut = IndexXMLHaut + 1;//Elimination des caracteres _ qui separe les segments else { // if ((temps > xmin) && ! Pause) { // if ((temps > xmax) && ! Pause) { if ((temps > (xmin + xmax) / 2) && (! Pause)) { if (FlagTexteHaut) { // fill(255, 255, 255, PitchActuel/3 + 50); // Texte blanc fill( PitchActuel+9, PitchActuel+22,PitchActuel+78);//multico2 // fill(255); // Texte blanc // textFont(maFonte, LignePitch[1] / 10); textFont(maFonte3, PitchActuel / 6+4); // Plantage avec Font autre que Helvetica si Size = NaN smooth(); // yApresPitch = YPitch(LignePitch[1]) ; // text(Content1, xApresPitch % width, yApresPitch - 20); // text(Content1, xApresPitch % width, YPitch(PitchActuel) - 20); text(Content1, yApresPitch + 400, height - (xApresPitch % height+ random(-50, +50))); } IndexXMLHaut = IndexXMLHaut + 1; colFixe = col; } } } if ((frameCount % AdjustBlurPitch == 0) & FlagBlurPitch) filter(BLUR, 0.572); // > 0.575 if (temps > DureeFichier) { Fin =true; background(0, 0, 0, 0); } } else background(0, 0, 0, 0); } }