-
Notifications
You must be signed in to change notification settings - Fork 1
/
myStuffS.js
38 lines (29 loc) · 983 Bytes
/
myStuffS.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Wrap everything in a function to keep your stuff private.
(function () {
// JavaScript strict mode is a good thing.
"use strict";
// Define a unique global namespace for your stuff.
// You should change this to a namespace that is appropriate for your project.
fluid.registerNamespace("myStuffS");
var enviro13 = flock.init();
// Expose any public functions or constructors as properties on your namesapce.
myStuffS.play = function () {
var synth = flock.synth({
synthDef: {
ugen: "flock.ugen.playBuffer", // example of a .wav file input
buffer:{
id:"S",
url:"sounds/S.wav",
}/*
} /*
ugen: "flock.ugen.sinOsc",
freq: 440,
duration: 1.0*/
}
});
enviro13.play();
};
myStuffS.end = function () {
enviro13.stop();
}
}());