Skip to content

Instantly share code, notes, and snippets.

View eamonnbell's full-sized avatar

Eamonn Bell (Personal) eamonnbell

View GitHub Profile
@eamonnbell
eamonnbell / VR_viz.pde
Last active November 14, 2015 19:57
VR experiments with Processing
import org.jsfml.audio.*;
import org.jsfml.window.event.*;
import org.jsfml.window.*;
import org.jsfml.system.*;
import org.jsfml.internal.*;
import org.jsfml.graphics.*;
import java.util.*;
import java.text.*;
import java.nio.file.*;
@eamonnbell
eamonnbell / VISexperiment.ipynb
Created November 7, 2015 00:42
VIS Experiments
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eamonnbell
eamonnbell / sketch.pde
Created September 26, 2015 19:47
boxes in 3D space - Janky first go at Processing.org
int n = 12;
void setup()
{
noStroke();
size(600, 600, P3D);
frameRate(24);
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eamonnbell
eamonnbell / ts_videos.ipynb
Last active September 5, 2015 18:46
A computer-assisted exploration of visual themes in Taylor Swift's music videos
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eamonnbell
eamonnbell / sort.sh
Last active August 29, 2015 14:26
Sort images by aspect ratio (requires ImageMagick)
identify *.pbm | \
gawk '{split($3,sizes,"x"); print $1,sizes[1]/sizes[2]}' | \
sed 's/\[.\]//' | \
sort -gk 2
@eamonnbell
eamonnbell / time_finder.py
Last active August 29, 2015 14:06
Time finder
import itertools
import operator
# Student availability represented as a vector of truth values
# aka a binary number. First entry is 9am etc.
time_vector_list = [0b11101001110111101100,
0b11100011110111101000,
0b11110011110111100001,
0b11110011110111100101,
@eamonnbell
eamonnbell / map.py
Created May 25, 2014 19:22
RGB pitch/chroma - color mapping after Sapp (2001)
# Chroma - color mapping suggested by Sapp (2001)
# Sapp, Craig. "Harmonic Visualizations of Tonal Music"
# in the Proceedings of the International Computer Music Conference (ICMC) 2001, Havana, Cuba.
# Uses music21 pitch.Names (?)
color_map = {
'A': (127, 31, 255),
'B': (255, 127, 0),
'C': (0, 255, 0),
'D': (63, 95, 255),
@eamonnbell
eamonnbell / dbz.bas
Created August 28, 2013 03:00
DBZ.BAS, possibly the earliest computer program I ever worked on back in (no troll) primary school. QBASIC
acrd = 250
bcrd = 250
4676 CLS
PRINT "LadBroken - Betting Xtreme - Planet Namik Special!"
PRINT
INPUT "Better 1 : ", nba$
INPUT "Better 2 : ", nbb$
PRINT nba$; " : Credit E"; acrd
INPUT "How much do you want do bet? ", amnt
@eamonnbell
eamonnbell / in-c.py
Last active June 15, 2021 15:59
Generate a performance of Terry Riley's In C
import music21
import itertools
from random import randint
MIN_REPETITIONS = 4
MAX_REPETITIONS = 10
NUMBER_OF_PARTS = 10
motives = ['e4 e e', 'e8 f8 e4', 'r8 e f e', 'r8 e f g', 'e8 f g r',