Files
sunny9898/task8/wk9/wk9_example_6/wk9_example_6.pde
louiscklaw 5637fbf94f update,
2025-02-01 02:07:58 +08:00

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;
}