James Halliday substack

View grime.js
1 2 3 4 5 6 7 8 9 10
var melody = [ 0, -2, 7, 7, 3, 1, 4, -1 ];
var snares = [ 4, 2, 1, 16, 4, 30, 25, 8 ];
var speeds = [ 2, 2, 2, 2, 1/8, 1/16, 4, 4, 1, 1/4, 2, 2 ];
var d = snare();
 
return function (t) {
var speed = speeds[Math.floor(t / 4) % speeds.length];
var m = Math.pow(2,melody[Math.floor(t*speed)%melody.length]/12);
var sn = snares[Math.floor(t*speed)%snares.length];
View hotdub.js
1 2 3 4 5 6 7 8 9 10
var melody = [ -2, -2, -1, -1, 0, 0, 3, 0, 3, 0 ];
var base = [ 12, 11 ];
 
var times = [ 16, 16, 16, 16 ];
var duration = times.reduce(function (sum, t) { return sum + t });
var offsets = times.reduce(function (acc, t) {
return acc.concat((acc[acc.length-1] || 0) + t);
}, []);
 
return function (t) {
View index.js
1 2 3 4 5 6 7 8 9
//Load shell
var shell = require("gl-now")({ clearColor: [0,0,0,0] });
var camera = require("game-shell-orbit-camera")(shell);
var xtend = require('xtend');
 
//Mesh creation tools
var createMesh = require("gl-simplicial-complex");
var polygonize = require("isosurface").surfaceNets;
var createAxes = require("gl-axes");
View test.html
1 2 3
$ node tr.js
<html>
<meta id="id" content="TESTING123"></html>
View data.json
1 2 3 4 5
[{ "size": 3000000 },
{ "size": 4000000 },
{ "size": 5000000 },
{ "size": 1500000 },
{ "size": 520000 }]
View made-for-tv-drama.js
1 2 3 4 5 6 7 8 9 10
var melody = [ 1, -1, 3, -2, 5 ];
var alt = [ 9, 4, -1, 2, -3 ];
var sn = snare();
 
return function (t) {
if (t % 32 < 8) return intro(t)
else if (t % 32 < 9) {
var d = (t % 32 - 8) / (9 - 8);
return intro(t) * (1 - d) + main(t) * d;
}
View workpocalypse.js
1 2 3 4 5 6 7 8 9 10
var work = [ 100, 400, 200, 300 ];
var melody = [ 1, 2, 5, 1, 0, -2, 6 ];
var plucks = [ 1, 5/2, -2, 1/9, 1/3 ];
var times = [ 1, 1024, 64, 1, 1, 8064, 16, 256, 1, 32, 1024 ];
 
return function (t) {
var w = work[Math.floor(t*4)%work.length];
var tm = times[Math.floor(t/8)%times.length];
var m = melody[Math.floor(t*tm)%melody.length];
var x = Math.pow(2,m/12);
View actionwave.js
1 2 3 4 5 6 7 8 9 10
var melody = [ 5, 7, 3, 5, 1, 7, 2 ];
var side = [ 90.125, 180.25 ];
var pace = [ 4, 12, 8, 4 ];
var sn = snare();
 
return function (t) {
var m = melody[Math.floor(t*2) % melody.length];
var p = pace[Math.floor(t/8) % pace.length];
var s = side[Math.floor(t*p) % side.length];
var x = Math.pow(2, Math.floor(t%2)*m/12);
View par_server.js
1 2 3 4 5 6 7 8 9 10
// parallel steps
 
var co = require('co');
var http = require('http');
var fs = require('fs');
var thunkify = require('thunkify');
 
var server = http.createServer(co(function *(req, res) {
var files = yield {
a: thunkify(fs.readFile)('a.txt'),
View mac_startup.sh
1 2 3 4 5 6
#!/bin/bash
ytdl 'https://www.youtube.com/watch?v=i9qOJqNjalE'
ffmpeg -i *.mp4 -vn mac_startup.wav
sox mac_startup.wav mac_warp.mp3 chorus 0.6 0.9 25 0.9 1 8 -s \
echos 0.8 0.7 40 0.25 63 0.3 phaser 1 0.7 3 0.7 0.5 -t
play mac_startup.wav
Something went wrong with that request. Please try again.