[ Launch: timbre.js reich ] 5893325 by enjalot
[ Launch: timbre.js reich ] 5893317 by enjalot
[ Launch: timbre.js ] 5893276 by enjalot
[ Launch: timbre.js ] 5893159 by enjalot
-
-
Save enjalot/5893325 to your computer and use it in GitHub Desktop.
timbre.js reich
This file contains 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
{"description":"timbre.js reich","endpoint":"","display":"svg","public":true,"require":[{"name":"supercollider","url":"http://mohayonao.github.io/subcollider.js/builds/subcollider-min.js"},{"name":"timbre-mod","url":"https://gist.github.com/enjalot/5893275/raw/3a9f3430225510d2258381c9e6ab1506ff8bb86f/timbre-mod.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/NlmUnFy.png"} |
This file contains 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
//http://mohayonao.github.io/timbre.js/ | |
var svg = d3.select("svg"); | |
TReset(); | |
TFactory(); | |
timbre.rec(function(output) { | |
var midis = [89, 91, 82, 96, 79, 91, 92, 76].scramble(); | |
var msec = timbre.timevalue("bpm184 l8"); | |
var synth = T("OscGen", {env:T("perc", {r:msec, ar:true})}); | |
T("interval", {interval:msec}, function(count) { | |
if (count < midis.length) { | |
synth.noteOn(midis[count], 100); | |
} else { | |
output.done(); | |
} | |
}).start(); | |
output.send(synth); | |
}).then(function(result) { | |
var L = T("buffer", {buffer:result, loop:true}); | |
var R = T("buffer", {buffer:result, loop:true}); | |
var num = 400; | |
var duration = L.duration; | |
R.pitch = (duration * (num - 1)) / (duration * num); | |
T("delay", {time:"bpm120 l16", fb:0.1, cross:true}, | |
T("pan", {pos:-0.6}, L), T("pan", {pos:+0.6}, R) | |
).play(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment