-
Notifications
You must be signed in to change notification settings - Fork 1
/
myStuffI.js
38 lines (29 loc) · 980 Bytes
/
myStuffI.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("myStuffI");
var enviro8 = flock.init();
// Expose any public functions or constructors as properties on your namesapce.
myStuffI.play = function () {
var synth = flock.synth({
synthDef: {
ugen: "flock.ugen.playBuffer", // example of a .wav file input
buffer:{
id:"I",
url:"sounds/I.wav",
}/*
} /*
ugen: "flock.ugen.sinOsc",
freq: 440,
duration: 1.0*/
}
});
enviro8.play();
};
myStuffI.end = function () {
enviro8.stop();
}
}());