Skip to content

Instantly share code, notes, and snippets.

View drart's full-sized avatar

Adam Tindale drart

View GitHub Profile
@colinbdclark
colinbdclark / osc-port.js
Last active September 19, 2019 17:54
TUIO Touch Source
// From https://github.com/colinbdclark/phet-osc-bridge
/*
* PhET-OSC Bridge OSC Port
* http://github.com/fluid-studios/phet-osc-bridge
*
* Copyright 2017, OCAD University
* Licensed under the New BSD license.
*/
@colinbdclark
colinbdclark / index.html
Last active August 10, 2019 14:48
Infused MPE MIDI Example
<html>
<head>
<script src="node_modules/flocking/dist/flocking-all.js"></script>
<script src="seaboard-block-instrument.js"></script>
<script src="mpe-voice.js"></script>
<script src="mpe-synth.js"></script>
<style>
body {
padding: 0;
@colinbdclark
colinbdclark / dynamic-source-synths.js
Last active November 6, 2017 01:03
Dynamically creating synths based on a source array
fluid.defaults("adam.noiseSynth", {
gradeNames: "flock.synth",
freq: 300,
synthDef: {
ugen: "flock.ugen.sum",
sources: {
ugen: "flock.ugen.filter.biquad.bp",
freq: "{that}.options.freq",
@colinbdclark
colinbdclark / midi-controller-wiring.js
Created May 11, 2016 22:02
New MIDI controller binding specification, harmonized with the wiring specification format.
fluid.defaults("my.midiController", {
gradeNames: "flock.midi.controller",
components: {
// All "target" declarations are relative to this component.
synthContext: "${myComposition}.band"
},
inputMap: {
noteOn: [
@traviskirton
traviskirton / WorkSpace.swift
Last active September 19, 2017 15:35
Code from the Basics Tutorial
// Copyright © 2016 C4
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: The above copyright
// notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
@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 / 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 / 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,
@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 / wobbling-sines.js
Last active August 29, 2015 14:10
Wobbling Sines
var synth = flock.synth({
synthDef: [
{
ugen: "flock.ugen.sinOsc",
freq: {
ugen: "flock.ugen.xLine",
start: 60,
end: 90,
duration: 120
},