Skip to content

Commit

Permalink
Factors out group-related synths into separate files.
Browse files Browse the repository at this point in the history
Sources sheep.js from npm, updates tests.
Renames unit test folder.
  • Loading branch information
colinbdclark committed Sep 6, 2015
1 parent a211f31 commit f393d51
Show file tree
Hide file tree
Showing 55 changed files with 945 additions and 680 deletions.
3 changes: 3 additions & 0 deletions Gruntfile.js
Expand Up @@ -33,6 +33,9 @@ module.exports = function(grunt) {

flockingBase: [
"flocking/flocking-core.js",
"flocking/synths/group.js",
"flocking/synths/polyphonic.js",
"flocking/synths/band.js",
"flocking/flocking-buffers.js",
"flocking/flocking-parser.js",
"flocking/flocking-audiofile.js",
Expand Down
4 changes: 4 additions & 0 deletions demos/playground/index.html
Expand Up @@ -50,6 +50,10 @@
<script src="../../third-party/simjs/js/random-0.26.js"></script>

<script src="../../flocking/flocking-core.js"></script>
<script src="../../flocking/flocking-core.js"></script>
<script src="../../flocking/synths/group.js"></script>
<script src="../../flocking/synths/polyphonic.js"></script>
<script src="../../flocking/synths/band.js"></script>
<script src="../../flocking/flocking-buffers.js"></script>
<script src="../../flocking/flocking-audiofile.js"></script>
<script src="../../flocking/flocking-audiofile-encoder.js"></script>
Expand Down
3 changes: 3 additions & 0 deletions demos/playground/live/index.html
Expand Up @@ -54,6 +54,9 @@
<script src="../../../third-party/simjs/js/random-0.26.js"></script>

<script src="../../../flocking/flocking-core.js"></script>
<script src="../../../flocking/synths/group.js"></script>
<script src="../../../flocking/synths/polyphonic.js"></script>
<script src="../../../flocking/synths/band.js"></script>
<script src="../../../flocking/flocking-buffers.js"></script>
<script src="../../../flocking/flocking-audiofile.js"></script>
<script src="../../../flocking/flocking-audiofile-encoder.js"></script>
Expand Down
157 changes: 141 additions & 16 deletions dist/flocking-all.js
Expand Up @@ -19476,12 +19476,12 @@ if (typeof window === "undefined" && typeof module !== "undefined" && module.exp
;/*! Flocking 0.1, Copyright 2011-2014 Colin Clark | flockingjs.org */

/*
* Flocking - Creative audio synthesis for the Web!
* http://github.com/colinbdclark/flocking
*
* Copyright 2011-2015, Colin Clark
* Dual licensed under the MIT and GPL Version 2 licenses.
*/
* Flocking - Creative audio synthesis for the Web!
* http://github.com/colinbdclark/flocking
*
* Copyright 2011-2015, Colin Clark
* Dual licensed under the MIT and GPL Version 2 licenses.
*/

/*global require, Float32Array, window, AudioContext, webkitAudioContext*/
/*jshint white: false, newcap: true, regexp: true, browser: true,
Expand All @@ -19497,8 +19497,6 @@ var fluid = fluid || require("infusion"),
(function () {
"use strict";

var $ = fluid.registerNamespace("jQuery");

flock.fluid = fluid;

flock.init = function (options) {
Expand Down Expand Up @@ -21404,6 +21402,36 @@ var fluid = fluid || require("infusion"),
});


/*******************************
* Error Handling Conveniences *
*******************************/

flock.bufferDesc = function () {
throw new Error("flock.bufferDesc is not defined. Did you forget to include the flocking-buffers.js file?");
};
}());
;/*
* Flocking Synth Group
* http://github.com/colinbdclark/flocking
*
* Copyright 2011-2015, Colin Clark
* Dual licensed under the MIT and GPL Version 2 licenses.
*/

/*global require*/
/*jshint white: false, newcap: true, regexp: true, browser: true,
forin: false, nomen: true, bitwise: false, maxerr: 100,
indent: 4, plusplus: false, curly: true, eqeqeq: true,
freeze: true, latedef: true, noarg: true, nonew: true, quotmark: double, undef: true,
unused: true, strict: true, asi: false, boss: false, evil: false, expr: false,
funcscope: false*/

var fluid = fluid || require("infusion"),
flock = fluid.registerNamespace("flock");

(function () {
"use strict";

fluid.defaults("flock.synth.group", {
gradeNames: ["flock.nodeList", "flock.node"],

Expand Down Expand Up @@ -21489,6 +21517,30 @@ var fluid = fluid || require("infusion"),
eventAction(method);
}
};
}());
;/*
* Flocking Polyphonic Synth
* http://github.com/colinbdclark/flocking
*
* Copyright 2011-2015, Colin Clark
* Dual licensed under the MIT and GPL Version 2 licenses.
*/

/*global require*/
/*jshint white: false, newcap: true, regexp: true, browser: true,
forin: false, nomen: true, bitwise: false, maxerr: 100,
indent: 4, plusplus: false, curly: true, eqeqeq: true,
freeze: true, latedef: true, noarg: true, nonew: true, quotmark: double, undef: true,
unused: true, strict: true, asi: false, boss: false, evil: false, expr: false,
funcscope: false*/

var fluid = fluid || require("infusion"),
flock = fluid.registerNamespace("flock");

(function () {
"use strict";

var $ = fluid.registerNamespace("jQuery");

fluid.defaults("flock.synth.polyphonic", {
gradeNames: ["flock.synth.group"],
Expand Down Expand Up @@ -21681,7 +21733,6 @@ var fluid = fluid || require("infusion"),
for (var i = 0; i < maxVoices; i++) {
freeVoices[i] = createVoiceFn();
}

};


Expand Down Expand Up @@ -21745,14 +21796,88 @@ var fluid = fluid || require("infusion"),
}
}
});
}());
;/*
* Flocking Band
* http://github.com/colinbdclark/flocking
*
* Copyright 2013-2015, Colin Clark
* Dual licensed under the MIT and GPL Version 2 licenses.
*/

/*******************************
* Error Handling Conveniences *
*******************************/
/*global require*/
/*jshint white: false, newcap: true, regexp: true, browser: true,
forin: false, nomen: true, bitwise: false, maxerr: 100,
indent: 4, plusplus: false, curly: true, eqeqeq: true,
freeze: true, latedef: true, noarg: true, nonew: true, quotmark: double, undef: true,
unused: true, strict: true, asi: false, boss: false, evil: false, expr: false,
funcscope: false*/

flock.bufferDesc = function () {
throw new Error("flock.bufferDesc is not defined. Did you forget to include the flocking-buffers.js file?");
};
var fluid = fluid || require("infusion");

(function () {
"use strict";

/**
* flock.band provides an IoC-friendly interface for a collection of named synths.
*/
// TODO: Unit tests.
fluid.defaults("flock.band", {
gradeNames: ["fluid.component"],

invokers: {
play: {
func: "{that}.events.onPlay.fire"
},

pause: {
func: "{that}.events.onPause.fire"
},

set: {
func: "{that}.events.onSet.fire"
}
},

events: {
onPlay: null,
onPause: null,
onSet: null
},

distributeOptions: [
{
source: "{that}.options.childListeners",
removeSource: true,
target: "{that fluid.component}.options.listeners"
},
{
source: "{that}.options.synthListeners",
removeSource: true,
target: "{that flock.synth}.options.listeners"
}
],

childListeners: {
"{band}.events.onDestroy": {
func: "{that}.destroy"
}
},

synthListeners: {
"{band}.events.onPlay": {
func: "{that}.play"
},

"{band}.events.onPause": {
func: "{that}.pause"
},

"{band}.events.onSet": {
func: "{that}.set"
}
}
});
}());
;/*
* Flocking Audio Buffers
Expand Down Expand Up @@ -24026,7 +24151,7 @@ var fluid = fluid || require("infusion"),
creatorName = creatorName.substring(0, nodeStrIdx);
}

var node = context[creatorName].apply(context, nodeSpec.args);
var node = context[creatorName].apply(context, args);
flock.webAudio.initNodeParams(context, node, nodeSpec);
flock.webAudio.initNodeProperties(node, nodeSpec);
flock.webAudio.initNodeInputs(node, nodeSpec);
Expand Down
12 changes: 6 additions & 6 deletions dist/flocking-all.min.js

Large diffs are not rendered by default.

0 comments on commit f393d51

Please sign in to comment.