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 / gist:8212014
Created January 1, 2014 22:07
Flocking port of simple FM synthesis example from the Cottle SuperCollder 3 book.
/*
// SuperCollider original
SynthDef("cottle-simple-fm", {
var modulator = SinOsc.ar(
freq: 123,
mul: 100
);
var carrier = SinOsc.ar(
freq: 400 + modulator,
@colinbdclark
colinbdclark / gist:8380094
Created January 12, 2014 02:49
GPII Slow Demo Preference Set
{
"http://registry.gpii.org/common/fontSize": [{ "value": 21 }],
"http://registry.gpii.org/common/highContrastEnabled": [{ "value": true }],
"http://registry.gpii.org/common/cursorSize": [{ "value": 1.0 }]
}
@colinbdclark
colinbdclark / gist:8412295
Last active January 3, 2016 04:59
Example output logs for the GPII architecture "slow demo"
21:42:16.007:
A key-in request was received for token gpii-511-architecture-demo
--------------------
21:42:16.009:
Requesting an N&P set from the Preferences Server at:
http://localhost:8081/user/gpii-511-architecture-demo
--------------------
@colinbdclark
colinbdclark / gist:8580936
Created January 23, 2014 15:49
An example of playing two audio buffers at the same time, one in each channel.
var synth = flock.synth({
synthDef: [
{
ugen: "flock.ugen.playBuffer",
buffer: {
id: "chord",
url: "../../shared/audio/hillier-first-chord.wav"
}
},
{
@colinbdclark
colinbdclark / gist:9179042
Last active August 29, 2015 13:56
Wiring Flocking up to Web Audio nodes
flock.init();
var as = flock.enviro.shared.audioStrategy;
// Create the new gain node and set some parameters on it.
var gainNode = as.context.createGain();
gainNode.gain.setValueAtTime(0.0, as.context.currentTime);
as.insertOutputNode(gainNode);
@colinbdclark
colinbdclark / cat.json
Last active August 29, 2015 14:01
A cat is a cat is a...
{
"you are": "a catttt!"
}
@colinbdclark
colinbdclark / gist:8601024d090d867f94ce
Last active October 20, 2017 21:16
Using Flocking with Infusion
fluid.defaults("lucas.vibrato", {
gradeNames: ["flock.synth"],
synthDef: {
ugen: "flock.ugen.out",
bus: 1,
expand: 1,
sources: {
id: "beat",
ugen: "flock.ugen.lfSaw",
@colinbdclark
colinbdclark / flocking-midi-demo.js
Last active August 29, 2015 14:02
Flocking MIDI example
flock.midiAmp = function (velocity) {
return velocity / 127;
};
flock.midiVibrato = function (value) {
return value / 32;
};
var synth = flock.synth({
synthDef: {
@colinbdclark
colinbdclark / declarative-flocking-midi.js
Last active August 29, 2015 14:02
Infusion-style Flocking MIDI example
flock.midiAmp = function (velocity) {
return velocity / 127;
};
flock.midiVibrato = function (value) {
return value / 32;
};
flock.band({
components: {
@colinbdclark
colinbdclark / minimal-declarative-flocking-midi.js
Created June 14, 2014 01:55
Minimal declarative MIDI example
window.midiBand = flock.band({
components: {
synth: {
type: "flock.synth",
options: {
synthDef: {
id: "carrier",
ugen: "flock.ugen.sinOsc",
freq: 440,
mul: {