This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 水戸黄門の曲のイントロはクロスリズムになってるよ | |
bps 0.85 | |
-- 4/4 | |
d1 $ sound "[[bd*4], [~ sn:1 ~ sn:1], [hc hc hc ho:1]]" | |
-- 3/4 | |
d1 $ sound "[[bd*3], [~ sn:1 [~ sn:1 ~ ~]], [hc hc ho:1]]" | |
-- beat off | |
d1 $ silence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; db => https://github.com/Factual/clj-leveldb | |
;; json => https://github.com/clojure/data.json | |
(def json-db (atom nil)) | |
(defn val-encoder [m] | |
(let [s (json/write-str m)] | |
(byte-array (map byte s)))) | |
(defn val-decoder [ba] | |
(let [s (byte-streams/to-string ba) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'scissor/echonest' | |
s = Scissor(ARGV.shift) | |
Scissor.join( | |
s.bars.map do |bar| | |
segment = bar / 32 | |
Scissor.join(segment.each_slice(4).to_a.map{|x| x.sort_by{rand}}.flatten) | |
end | |
) >> 'out.mp3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
crypto = require('crypto'); | |
var through = require('through'), | |
base64 = require('base64-stream'), | |
mime = require('mime'), | |
koa = require('koa'), | |
router = require('koa-router'), | |
parse = require('co-busboy'), | |
level = require('level'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.mixin({ | |
pluckNest: function(obj,names){ | |
return _.reduce(names,function(o,n){ | |
return _.pluck(o,n) | |
},obj); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target InDesign-7.0 | |
function queue(funcs,scope){ | |
(function next(){ | |
if(funcs.length>0){ | |
var f = funcs.shift(); | |
f.apply(scope,[next].concat(Array.prototype.slice.call(arguments,0))); | |
} | |
})(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function *(){ | |
this.type = 'text/html'; | |
this.body = '<h1>20131227</h1><p>Shigoto Osame</p>'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Writable = require('stream').Writable, | |
TmpFile = require('temporary').File, | |
exec = require('child_process').exec, | |
util = require('util'); | |
util.inherits(InDesignWritableStream, Writable); | |
function InDesignWritableStream(opt){ | |
var self = this; | |
self.cmd = ['osascript']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns make-noise.s | |
(:use overtone.live)) | |
;;;;;;;;;; SYNTH | |
(definst noise1 [freq 440 dd 70 attack 0.01 sustain 0.4 release 0.1 vol 0.6] | |
(* (env-gen (lin-env attack sustain release) 1 1 0 1 FREE) | |
(lf-noise2 (line (* freq dd) freq sustain)) | |
vol)) |