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 / adhoc-additive-synthesis.js
Last active August 29, 2015 14:17
Ad-Hoc Additive Synthesis
fluid.defaults("flock.demo.additive", {
gradeNames: ["flock.band", "autoInit"],
harmonicSpec: {
fundamental: 440,
harmonics: [1, 4, 5, 6, 7, 8],
ugenDef: {
ugen: "flock.ugen.saw",
freq: 440,
mul: {
@colinbdclark
colinbdclark / .gpii-user-token.txt
Created January 20, 2015 18:24
Carla's User Token File
carla
@colinbdclark
colinbdclark / .gpii-user-token.txt
Created January 20, 2015 18:24
Nisha's User Token File
nisha
@colinbdclark
colinbdclark / .gpii-user-token.txt
Last active August 29, 2015 14:13
Sammy's User Token File
sammy
@colinbdclark
colinbdclark / one-ugen-multiple-inputs-code.js
Created January 20, 2015 14:06
One unit generator connected to multiple inputs: code
var synth = flock.synth({
synthDef: {
id: "sum",
ugen: "flock.ugen.sum",
sources: [
{
ugen: "flock.ugen.lfSaw",
freq: 440,
mul: {
id: "amp",
@colinbdclark
colinbdclark / one-ugen-multiple-inputs-bus.js
Created January 20, 2015 14:06
One unit generator connected to multiple inputs: buses
var ampSynth = flock.synth({
synthDef: {
ugen: "flock.ugen.out",
bus: 3,
expand: 1,
sources: {
ugen: "flock.ugen.line",
start: 0,
end: 0.1,
duration: 20
@colinbdclark
colinbdclark / hard-sync.js
Created January 16, 2015 12:10
In-progress Flocking hard sync oscillator
flock.ugen.hardSync = function (inputs, output, options) {
var that = flock.ugen(inputs, output, options);
that.gen = function (numSamps) {
var m = that.model,
out = that.output,
leadFreq = that.inputs.leadFreq.output[0],
followFreq = that.inputs.followFreq.output[0],
leak = 1.0 - that.inputs.leakRate.output[0],
@colinbdclark
colinbdclark / moog-triplets.js
Created January 10, 2015 17:37
Moog triplet bassline
var freq = 1;
flock.synth({
synthDef: {
ugen: "flock.ugen.filter.moog",
cutoff: {
ugen: "flock.ugen.lfNoise",
freq: freq,
mul: 5000,
add: 5000,
@colinbdclark
colinbdclark / index.html
Last active August 29, 2015 14:12
Flocking example for Derek Riemer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>A Flocking Project</title>
<script src="flocking/flocking-all.js"></script>
<script src="waveSym-refactored.js"></script>
</head>
<body>
@colinbdclark
colinbdclark / flocking-wiring-spec-sketches.js
Last active August 29, 2015 14:12
Sketches of new Flocking wiring specifications
// Based on the Chowning FM brass instrument (https://gist.github.com/colinbdclark/7a81afd58e8fc41906f8)
// Explicit wire specification. All links between unit generators, no matter how trivial,
// are located in a separate "wires" block.
var signalDef = {
ugens: {
index: 5,
cmRatio: 1,
freq: 440,