//modification by Ed Purver of Dan Shiffman's king lear code, to work with Tony Blair's 2005 speech to the Labour Party conference PFont f; // A variable to hold onto a font String[] blairspeech; // The array to hold all of the text int counter = 1; String delimiters = " ,."; // We will use space, comma, and period as delimiters float x = 1; float y = 1; void setup() { size(800,600); background(0); // Load font f = loadFont("1942report-48.vlw"); // Load Blair's speech into an array of strings String content = "Blair2.txt"; String[] rawtext = loadStrings(content); String everything = join(rawtext," "); // join the big array together as one long string blairspeech = split(everything,delimiters); // split the array into words using any delimiter framerate(40); } void draw() { textFont(f); fill(255,0,0,175); String theword = blairspeech[counter]; String threat = "threat"; String ideology = "ideology"; String religious = "religious"; y = y + 8; if (y > 600) { y = 1; x = x+30; } if (x > 800) { x = 1; } textSize(14); text(theword,x,y); if (theword.equals(threat) == true) { fill(0,0,255); textSize(90); text(theword,x-20,y); } if (theword.equals(ideology) == true) { fill(255,255,255); textSize(70); text(theword,x-20,y); } if (theword.equals(religious) == true) { fill(0,0,255); textSize(40); text(theword,x-20,y); } // Move onto the next word counter = (counter + 1) % blairspeech.length; }