From b56c57a5348872c26ce27747ec318ca596f59e2a Mon Sep 17 00:00:00 2001 From: hannahilea Date: Thu, 9 May 2024 12:27:42 -0400 Subject: [PATCH 1/7] initial commit empty --- projects/flock-chorus/index.html | 43 ++++++++++++++++++++++++++++++++ projects/flock-chorus/sketch.js | 33 ++++++++++++++++++++++++ projects/index.html | 5 ++++ 3 files changed, 81 insertions(+) create mode 100644 projects/flock-chorus/index.html create mode 100644 projects/flock-chorus/sketch.js diff --git a/projects/flock-chorus/index.html b/projects/flock-chorus/index.html new file mode 100644 index 0000000..a1c2c25 --- /dev/null +++ b/projects/flock-chorus/index.html @@ -0,0 +1,43 @@ + + + + + Sketch: Flock chorus + + + + + + + + + + +
+

@hannahilea > projects > Sketch: Flock chorus +

+
+ +
+ Details +

A creative coding excercise (prompt: TODO), co-created with TODO + while at the Recurse Center

+

Usage: When prompted, grant microphone access, then TODO.

+
+ + + + + + diff --git a/projects/flock-chorus/sketch.js b/projects/flock-chorus/sketch.js new file mode 100644 index 0000000..4a1fa66 --- /dev/null +++ b/projects/flock-chorus/sketch.js @@ -0,0 +1,33 @@ +// TODO: edit this blurb! +// Original p5 sketch {{ co-created with FOO+link}} +// as a creative coding project while at the +// Recurse Center (www.recurse.com/) + +let mic; + +const params = { + micSensitivity: 4.0, +}; + +const gui = new GUI(); +gui.add(params, 'micSensitivity', 0.01, 30, 2); + +function setup() { + createCanvas(windowWidth, windowHeight) + + // Create an Audio input + mic = new p5.AudioIn(); + + // start the Audio Input. + // By default, it does not .connect() (to the computer speakers) + mic.start(); +} + +function windowResized() { + resizeCanvas(windowWidth, windowHeight); +} + +function draw() { + // https://stackoverflow.com/questions/55026293/google-chrome-javascript-issue-in-getting-user-audio-the-audiocontext-was-not + getAudioContext().resume(); +} diff --git a/projects/index.html b/projects/index.html index b933f3e..2b7470d 100644 --- a/projects/index.html +++ b/projects/index.html @@ -58,6 +58,11 @@ One-off creative coding projects, often small and interactive.