gif1 gif2 gif3 gif4
let mic; function setup() { createCanvas(windowWidth, windowHeight); textFont('Arial'); textSize(1500); fill('green'); mic = new p5.AudioIn(); mic.start(); } function draw() { background(255); fill('green'); textAlign(LEFT, BOTTOM); textSize(1500); text('w', -200, height - 10); textSize(300); textAlign(CENTER, CENTER); text('6', width / 2, height / 2); let volume = mic.getLevel(); let amplified = constrain(volume * 5, 0, 1); let circleSize = map(amplified, 0, 1, 50, height); fill('green'); noStroke(); circle(width - 700, height - 425, circleSize); print("volume", volume);
let mic; function setup() { createCanvas(windowWidth, windowHeight); textFont('Arial'); noStroke(); mic = new p5.AudioIn(); mic.start(); } function draw() { background(255); let vol = mic.getLevel(); let amplifiedVol = vol * 4; let threshold = 0.05; if (amplifiedVol < threshold) { amplifiedVol = 0; } else { amplifiedVol = constrain(map(amplifiedVol, threshold, 1, 0, 1), 0, 1); } let darkMintGreen = color('#3EB489'); let white = color(255); let pColor = lerpColor(darkMintGreen, white, amplifiedVol); fill(pColor); let xPos = map(amplifiedVol, 0, 1, 0, width - 200); textSize(305); textAlign(LEFT, TOP); text('P', xPos, 0); fill('#3EB489'); textSize(50); text('process', 20, 250); textSize(12); text('Please say ahhh and make some \nnoise to see the end result...', 20, 310);
let mic; function setup() { createCanvas(windowWidth, windowHeight); textFont('Arial'); noStroke(); mic = new p5.AudioIn(); mic.start(); } function draw() { background(255); let vol = mic.getLevel(); let amplifiedVol = constrain(vol * 10, 0, 2); let threshold = 0.5; let r = map(amplifiedVol, 0, 1, 255, 0); let g = map(amplifiedVol, 0, 1, 165, 255); fill(r, g, 0); if (amplifiedVol > threshold) { textSize(30); for (let i = 0; i < 50; i++) { let x = random(width); let y = random(height); text('R', x, y); } } else { let rSize = map(amplifiedVol, 0, 1, 300, 220); textSize(rSize); textAlign(LEFT, TOP); text('R', 0, 0); } fill(255, 165, 0); textSize(50); text('research', 20, 250); textSize(12); text('Please click or clap or make some \nnoise...', 20, 310);
let mic; let angleOffsets = []; function setup() { createCanvas(windowWidth, windowHeight); textFont('Arial'); noStroke(); mic = new p5.AudioIn(); mic.start(); for (let i = 0; i < 10; i++) { angleOffsets.push(random(TWO_PI)); } } function draw() { background(255); let vol = mic.getLevel(); let amplifiedVol = constrain(vol * 10, 0, 2); let threshold = 0.2; fill(0, 255, 0); if (amplifiedVol > threshold) { push(); translate(130, 130); rotate(frameCount * 0.05); textSize(265); textAlign(CENTER, CENTER); text('W', 0, 0); pop(); textSize(30); for (let i = 0; i < 10; i++) { let x = 100; let y = 300 + i * 40; push(); translate(x, y); rotate(frameCount * 0.05 + angleOffsets[i]); textAlign(CENTER, CENTER); text('W', 0, 0); pop(); } } else { textSize(265); textAlign(LEFT, TOP); text('W', 0, 0); } fill(0, 255, 0); textSize(50); text('workshop', 20, 230); textSize(12); text('Please say ahhh and make some noise...', 20, 290);
For each title letter of my week 6 workbook I experimented with sound, using the original code from the sound circle we had learnt in the workshop and adding different effects.