import processing.pdf.*; PFont font; float in = 144; // dpi // N.B. You need the "HelveticaNeue-Bold" font // for the type to display correctly. void setup() { size(17 * 144, 11 * 144, PDF, "dueEastFinal.pdf"); // 144 dpi // for sketches, change the horizontal resolution textMode(SHAPE); noLoop(); } void draw() { // background fill(0); rect(0, 0, 17*in, 11*in); // music staff design float[] pt = new float[2]; // plot point float[] offsets = { random(0.0, 0.2), random(0.0, 0.2) }; float[] reds = { random(0, 255), random(0, 255) }; float[] blues = { random(0, 255), random(0, 255) }; reds = sort(reds); blues = sort(blues); float lineLength = 0.4*in; // h float staffSpace = 0.04*in; // v float chunkLength = lineLength + 0.1*in; // h float groupHeight = 4 * staffSpace + 0.2*in; // v float patternLength = 5 * chunkLength + 0.3*in; // h float massHeight = 5 * groupHeight + 0.2*in; // h // cheap centering pt[0] = (17 * in - (5 * patternLength - 0.1*in) ) / 2; pt[1] = (11 * in - (5 * massHeight - 0.2*in ) ) / 2; stroke( random(reds[0], reds[1]), 0, random(blues[0], blues[1]) ); // line color strokeWeight(0.02*in); // line thickness noFill(); // a complex of masses expanded vert. for (int i=0; i<=4; i++) { // a mass of patterns expanded horiz. for (int j=0; j<=4; j++) { // patterns of five groups of chunks, vert. for (int k=0; k<=4; k++) { // groups of five chucks in a row, horiz. for (int l=0; l<=4; l++) { // chunk of five staff lines for (int m=0; m<=4; m++) { stroke(random(0, 200), 0, random(0, 200)); // draw line* line ( pt[0] + random(-offsets[0], offsets[0])*in, pt[1] + random(-offsets[1], offsets[1])*in, pt[0] + lineLength + random(-offsets[0], offsets[0])*in, pt[1] + random(-offsets[1], offsets[1])*in ); // shift pen vert. pt[1] = pt[1] + staffSpace; } // reset pen pt[1] = pt[1] - (5 * staffSpace); // shift pen horiz. pt[0] = pt[0] + chunkLength; } // reset pen pt[0] = pt[0] - (5 * chunkLength); // shift pen vert. pt[1] = pt[1] + groupHeight; } // reset pen pt[1] = pt[1] - (5 * groupHeight); // shift pen horiz. pt[0] = pt[0] + patternLength; } // reset pen pt[0] = pt[0] - (5 * patternLength); // shift pen vert. pt[1] = pt[1] + massHeight; } // reset pen pt[1] = pt[1] - (5 * massHeight); // Text font = createFont("HelveticaNeue-Bold", 48); textFont(font); textAlign(LEFT, TOP); fill(255); // adjustment pt[1] = pt[1] - 0.15*in; // 1a. text("NYU First", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Performance", pt[0], pt[1]); // reset pen pt[1] = pt[1] - groupHeight + massHeight; // 1b. text("Presents", pt[0], pt[1]); // shift horiz. pt[0] = pt[0] + patternLength; // 2a. text("Due East", pt[0], pt[1]); pt[1] = pt[1] + massHeight; // 2b. text("Erin Lesser", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("Flutes", pt[0], pt[1]); pt[1] = pt[1] - groupHeight + massHeight; fill(255); // 2c. text("Gregory", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Beyer", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("Percussion", pt[0], pt[1]); pt[1] = pt[1] - 2 * groupHeight + massHeight; fill(255); // 5d. text("www.", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("dueeast.", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("net", pt[0], pt[1]); // reset and shift pt[1] = pt[1] - 2 * groupHeight - 4 * massHeight; pt[0] = pt[0] + patternLength; // 4b. text("Jessica", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Schwartz", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("A Two-", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Dimensional", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Silhouette", pt[0], pt[1]); pt[1] = pt[1] - 4 * groupHeight + 2 * massHeight; fill(255); // 3. text("New Music", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("By NYU", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Composers", pt[0], pt[1]); // reset pt[1] = pt[1] - 2 * groupHeight - 2 * massHeight; pt[0] = pt[0] + patternLength; // 4a. text("Yoni Niv and", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("David", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Schmidlapp", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("The Reality", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("of Corn", pt[0], pt[1]); pt[1] = pt[1] - 4 * groupHeight + 3 * massHeight; fill(255); //4d. text("Sunday", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("April 20", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("8:00 pm", pt[0], pt[1]); pt[1] = pt[1] - 2 * groupHeight + massHeight; // 5c. text("Free", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Admission", pt[0], pt[1]); // reset pt[1] = pt[1] - groupHeight - 4 * massHeight; pt[0] = pt[0] + patternLength; // 5a. text("Alexander", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Ness", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("Xayaal", pt[0], pt[1]); // In the original poster, I used // "long a" ("a with macron") instead of "aa", // but the Processing interface isn't good // at saving Unicode characters pt[1] = pt[1] - 2 * groupHeight + massHeight; fill(255); // 4e. text("Yoon-Ji", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Lee", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("Infinity", pt[0], pt[1]); pt[1] = pt[1] - 2 * groupHeight + massHeight; fill(255); // 5b. text("Clara", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Latham", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("I am the Beat", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("That Waits for", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("You to See Me", pt[0], pt[1]); pt[1] = pt[1] - 4 * groupHeight + 2 * massHeight; fill(255); // 5b. text("TENRI", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Cultural", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; text("Institute", pt[0], pt[1]); pt[1] = pt[1] + groupHeight; fill(255, 255, 0); text("43A W 13th St.", pt[0], pt[1]); pt[1] = pt[1] - 3 * groupHeight + massHeight; fill(255); exit(); }