Skip to content

Instantly share code, notes, and snippets.

@colinbdclark
Created July 2, 2016 16:38
Show Gist options
  • Save colinbdclark/4b63e152b6e7b4ee895699cd8bb2d023 to your computer and use it in GitHub Desktop.
Save colinbdclark/4b63e152b6e7b4ee895699cd8bb2d023 to your computer and use it in GitHub Desktop.
Flocking kick drum sketch
flock.synth({
synthDef: {
ugen: "flock.ugen.sinOsc",
freq: {
ugen: "flock.ugen.envGen",
envelope: {
type: "flock.envelope.adsr",
attack: 0,
decay: 0.2,
sustain: 0,
release: 0,
},
// In a real implementation, this would be bound to MIDI input.
gate: {
ugen: "flock.ugen.lfPulse",
width: 0.5,
freq: 1
},
// TODO: This needs wires!
// In a real implementation, this would be bound to MIDI input.
mul: {
ugen: "flock.ugen.midiFreq",
note: 60
},
add: {
ugen: "flock.ugen.midiFreq",
note: 60,
mul: 0.25
}
},
mul: {
ugen: "flock.ugen.envGen",
envelope: {
type: "flock.envelope.adsr",
attack: 0.01,
decay: 0.5,
sustain: 0,
release: 0,
},
// In a real implementation, this would be bound to MIDI input.
gate: {
ugen: "flock.ugen.lfPulse",
width: 0.5,
freq: 1
},
mul: 0.25
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment