1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*!
 *
 * welcome to wavepot
 * ------------------
 *
 * this is a live editor. you create a function named `dsp`
 * that accepts the parameter `t`, the coefficient of time,
 * which you use to generate a single sample (range -1..1)
 *
 * below is the smallest example possible, a simple sine wave
 * generator. check out more complex demos on the right ---->
 *
 * have fun!
 *
 */
function dsp(t) {
  return 0.1 * Math.sin(2 * Math.PI * t * 440);
}
X