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