This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"you are": "a catttt!" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flock.midiAmp = function (velocity) { | |
return velocity / 127; | |
}; | |
flock.midiVibrato = function (value) { | |
return value / 32; | |
}; | |
var synth = flock.synth({ | |
synthDef: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flock.midiAmp = function (velocity) { | |
return velocity / 127; | |
}; | |
flock.midiVibrato = function (value) { | |
return value / 32; | |
}; | |
flock.band({ | |
components: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.midiBand = flock.band({ | |
components: { | |
synth: { | |
type: "flock.synth", | |
options: { | |
synthDef: { | |
id: "carrier", | |
ugen: "flock.ugen.sinOsc", | |
freq: 440, | |
mul: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new synth consisting of a sine wave, | |
// modulating its amplitude slowly with another sine wave. | |
var synth = flock.synth({ | |
synthDef: { | |
id: "carrier", | |
ugen: "flock.ugen.sinOsc", | |
freq: 440, | |
mul: { | |
id: "mod", | |
ugen: "flock.ugen.sinOsc", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fluid.defaults("flock.midi.controller", { | |
gradeNames: ["fluid.eventedComponent", "autoInit"], | |
members: { | |
controlMap: "@expand:flock.midi.controller.optimizeControlMap({that}.options.controlMap)" | |
}, | |
controlMap: {}, // Needs to be specified by the user. | |
components: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Represents a trigger from some external (i.e. non-ugen graph) source. | |
// Whenever it receives a change to its "msg" input, this trigger will fire. | |
flock.ugen.msgTrigger = function (inputs, output, options) { | |
var that = flock.ugen(inputs, output, options); | |
// Only runs at control rate or lower. | |
that.gen = function (numSamps) { | |
var m = that.model, | |
inputs = that.inputs, | |
out = that.output; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flock.ugen.writeBuffer = function (inputs, output, options) { | |
var that = flock.ugen(inputs, output, options); | |
that.gen = function (numSamps) { | |
var m = that.model, | |
out = that.output, | |
inputs = that.inputs, | |
sources = that.multiInputs.sources, | |
bufferDesc = that.bufferDesc, | |
numInputChans = sources.length, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var synth = flock.synth({ | |
synthDef: [ | |
{ | |
ugen: "flock.ugen.sinOsc", | |
freq: { | |
ugen: "flock.ugen.xLine", | |
start: 60, | |
end: 90, | |
duration: 120 | |
}, |
OlderNewer