19 lines
259 B
Plaintext
19 lines
259 B
Plaintext
import processing.sound.*;
|
|
|
|
SinOsc sine;
|
|
int index = 0;
|
|
float t = 0;
|
|
|
|
void setup() {
|
|
size(640, 360);
|
|
background(255);
|
|
sine = new SinOsc(this);
|
|
sine.play();
|
|
}
|
|
|
|
void draw() {
|
|
float n = noise(t);
|
|
sine.freq(map(n, 0, 1, 100, 1000));
|
|
t += 0.005;
|
|
}
|