Skip to content

Instantly share code, notes, and snippets.

View colinbdclark's full-sized avatar

Colin Clark colinbdclark

  • Lichen Community Systems Worker Cooperative Canada
  • Toronto, Ontario
View GitHub Profile
@colinbdclark
colinbdclark / leeway-halfway-quadraphonic.js
Created October 30, 2015 23:56
Leeway Halfway Quadraphonic
var lowFadeIn = {
ugen: "flock.ugen.line",
duration: 10,
start: 0,
end: 0.125
};
var midFadeIn = {
ugen: "flock.ugen.line",
duration: 10,
@colinbdclark
colinbdclark / flocking-model-relay.js
Last active October 5, 2015 17:16
Model Relaying Synths
fluid.defaults("colin.synth", {
gradeNames: "flock.modelSynth",
fundamental: 220,
model: {
inputs: {
carrier: {
freq: "{that}.options.fundamental"
}
@colinbdclark
colinbdclark / convolver.js
Last active November 9, 2015 22:25
Using a ConvolverNode with Flocking
var context = flock.environment.audioSystem.context;
var convolver = flock.environment.audioSystem.nativeNodeManager.createOutputNode({
node: "Convolver",
normalize: true
});
flock.synth({
synthDef: {
ugen: "flock.ugen.filter.moog",
@colinbdclark
colinbdclark / index.html
Created August 17, 2015 18:23
Chrome OS Multichannel Test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Multichannel Chrome OS Test</title>
</head>
<body>
@colinbdclark
colinbdclark / just-quad-patterns-phasing.js
Last active August 29, 2015 14:27
Just quadraphonic patterns phasing
flock.synth({
synthDef: [
{
ugen: "flock.ugen.sin",
freq: {
ugen: "flock.ugen.sequencer",
durations: [0.25, 0.25, 0.16666667, 0.16666667, 0.33, 0.25, 0.25],
values: [1, 9/8, 4/3, 3/2, 4/3, 5/4, 1],
mul: 440,
loop: 1.0,
@colinbdclark
colinbdclark / infusion-worker-hack.diff
Created July 21, 2015 02:55
Quick hack to make Infusion work in a Web Worker
diff --git a/third-party/infusion/js/Fluid.js b/third-party/infusion/js/Fluid.js
index 7913a4c..d132d1e 100644
--- a/third-party/infusion/js/Fluid.js
+++ b/third-party/infusion/js/Fluid.js
@@ -24,7 +24,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
*/
// Declare dependencies
-/* global console, opera, YAHOO*/
+/* global self, console, opera, YAHOO*/
@colinbdclark
colinbdclark / akai-lpd8.js
Created May 21, 2015 02:40
Basic Flocking MIDI with the Akai LPD8 Controller
var synth = flock.synth({
synthDef: {
ugen: "flock.ugen.sin",
freq: {
id: "freq",
ugen: "flock.ugen.midiFreq",
source: 60
}
}
});
@colinbdclark
colinbdclark / granulated-sines.js
Last active August 29, 2015 14:21
Granulated sines
var duration = 21 * 60,
fadeOutDuration = 10,
bufferName = "inside-21m-16-48000";
var leftFadeIn = {
ugen: "flock.ugen.line",
start: 0,
end: 0.05,
duration: 4
};
@colinbdclark
colinbdclark / leeway-halfway.js
Last active August 29, 2015 14:17
Leeway, Halfway
var lowFadeIn = {
ugen: "flock.ugen.line",
duration: 10,
start: 0,
end: 0.125
};
var midFadeIn = {
ugen: "flock.ugen.line",
duration: 10,
@colinbdclark
colinbdclark / imperative-adhoc-additive-synthesis.js
Last active August 29, 2015 14:17
Imperative Ad-Hoc Additive Synthesis (Clarinet)
var fundamental = 440,
harmonics = [1, 3, 5, 7, 9, 13, 15], // Clarinets only have odd partials.
baseHarmonicDef = {
ugen: "flock.ugen.saw",
freq: 440,
mul: {
ugen: "flock.ugen.envGen",
envelope: {
type: "flock.envelope.adsr",
attack: 0.1,