diff --git a/p5-experiments/radigue001.html b/p5-experiments/radigue001.html
index 30e8397..3b8cf13 100644
--- a/p5-experiments/radigue001.html
+++ b/p5-experiments/radigue001.html
@@ -44,14 +44,14 @@
for (let j = 0; j < 3; j++) {
for (let k = 0; k < 3; k++) {
kickDrum = new Tone.MembraneSynth({
- volume: 6
- }).toDestination();
+ volume: 6
+ }).toDestination();
let p = {
cx: offx + 2 * j * offx,
cy: offy + 2 * k * offy,
diam: 7,
pulse: 84 + k * 7,
- beat : kickDrum
+ beat: kickDrum
}
hits.push(p)
}
@@ -92,7 +92,7 @@
let rx = random() * w * 0.33
let ry = random() * h * 0.33
rect(p.cx - rx / 2, p.cy - ry / 2, rx, ry)
- let freq = 220+random()*220
+ let freq = 220 + random() * 220
p.beat.triggerAttackRelease(freq, '8n');
}
}
diff --git a/programming-keynote/proze2art001.js b/programming-keynote/proze2art001.js
index bec1462..a735f20 100644
--- a/programming-keynote/proze2art001.js
+++ b/programming-keynote/proze2art001.js
@@ -4,7 +4,7 @@ var testresults = [];
var index, indexlo, indexhi;
var table;
var testw, testh, nbrows;
-var synth
+var osc;
const now = Tone.now();
function setup() {
w = windowWidth
@@ -18,7 +18,7 @@ function setup() {
nbrows = 100;
testw = w * 0.5
testh = h / nbrows
- synth = new Tone.Synth().toDestination();
+ osc = new Tone.Oscillator().toDestination();
//frameRate(10)
}
@@ -66,9 +66,9 @@ function ikeda(index) {
noStroke()
if (t.verdict == 1) {
fill(0, 0, 100)
- synth.triggerAttack("C4", now);
- // wait one second before triggering the release
- synth.triggerRelease(now + 1); }
+ let freq = 220 + random() * 220
+ osc = new Tone.Oscillator().toDestination();
+ }
else { fill(0, 0, 0) }
rect(-testw, -testh, testw, testh * 2)
if (index > 0) {