Skip to content

Instantly share code, notes, and snippets.

@sport4minus
sport4minus / load_sequence.pde
Created June 23, 2012 13:52
load image sequence in processing
/**
* this code snippet can be used in the processing environment to load all images in a folder
* "input" in the sketches' data folder into an array of PImages.
* ideally, the images are sequentially named, like 0001.jpg, 0002.jpg etc.
* in this demo, te images are sequentially displayed.
*/
PImage[] imageSequence;
String[] imageFilenames;
void setup() {
@sport4minus
sport4minus / MIDI_Loader.pde
Created June 22, 2012 09:52
Convenient classes for loading and analyzing midi files in Processing / java, using the Sequence Object
class MidiLoader {
/**
*loads a midi file from disk and stores all notes in a nested Array List, using the Helper class "Note"
* needs some cleanup though
*/
ArrayList<ArrayList<Note>> tracks;
long maxTicks = 0;
final boolean DO_PRINT = false;
MidiLoader(String fileName) {
@sport4minus
sport4minus / P5_image_blur_demo.pde
Created May 17, 2012 10:34
Animated Processing Image Blur Demo
PImage myImage;
void setup() {
size(400,300);
myImage = loadImage("image.jpg");
}
void draw() {