This file contains hidden or 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.demo.additive", { | |
| gradeNames: ["flock.band", "autoInit"], | |
| harmonicSpec: { | |
| fundamental: 440, | |
| harmonics: [1, 4, 5, 6, 7, 8], | |
| ugenDef: { | |
| ugen: "flock.ugen.saw", | |
| freq: 440, | |
| mul: { |
This file contains hidden or 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
| carla |
This file contains hidden or 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
| nisha |
This file contains hidden or 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
| sammy |
This file contains hidden or 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: { | |
| id: "sum", | |
| ugen: "flock.ugen.sum", | |
| sources: [ | |
| { | |
| ugen: "flock.ugen.lfSaw", | |
| freq: 440, | |
| mul: { | |
| id: "amp", |
This file contains hidden or 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 ampSynth = flock.synth({ | |
| synthDef: { | |
| ugen: "flock.ugen.out", | |
| bus: 3, | |
| expand: 1, | |
| sources: { | |
| ugen: "flock.ugen.line", | |
| start: 0, | |
| end: 0.1, | |
| duration: 20 |
This file contains hidden or 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.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], |
This file contains hidden or 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 freq = 1; | |
| flock.synth({ | |
| synthDef: { | |
| ugen: "flock.ugen.filter.moog", | |
| cutoff: { | |
| ugen: "flock.ugen.lfNoise", | |
| freq: freq, | |
| mul: 5000, | |
| add: 5000, |
This file contains hidden or 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
| <!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> |
This file contains hidden or 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
| // 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, | |