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
// 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. | |
*/ |
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
<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; |
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("adam.noiseSynth", { | |
gradeNames: "flock.synth", | |
freq: 300, | |
synthDef: { | |
ugen: "flock.ugen.sum", | |
sources: { | |
ugen: "flock.ugen.filter.biquad.bp", | |
freq: "{that}.options.freq", |
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("my.midiController", { | |
gradeNames: "flock.midi.controller", | |
components: { | |
// All "target" declarations are relative to this component. | |
synthContext: "${myComposition}.band" | |
}, | |
inputMap: { | |
noteOn: [ |
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
// 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. |
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 context = flock.environment.audioSystem.context; | |
var convolver = flock.environment.audioSystem.nativeNodeManager.createOutputNode({ | |
node: "Convolver", | |
normalize: true | |
}); | |
flock.synth({ | |
synthDef: { | |
ugen: "flock.ugen.filter.moog", |
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.sin", | |
freq: { | |
id: "freq", | |
ugen: "flock.ugen.midiFreq", | |
source: 60 | |
} | |
} | |
}); |
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 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, |
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: { | |
id: "sum", | |
ugen: "flock.ugen.sum", | |
sources: [ | |
{ | |
ugen: "flock.ugen.lfSaw", | |
freq: 440, | |
mul: { | |
id: "amp", |
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 | |
}, |
NewerOlder