From 04d26d852926e7d484bf5dc112eeb2f9122bbbd0 Mon Sep 17 00:00:00 2001
From: Mikayla Dobson <93477693+innocuous-symmetry@users.noreply.github.com>
Date: Tue, 10 May 2022 11:47:45 -0500
Subject: [PATCH] defined a function which identifies dissonance in a vector
---
app.ts | 25 -------------------------
index.html | 1 +
src/audioUtils.ts | 5 +++--
src/inputHandling.ts | 3 ++-
src/styleUtils.ts | 2 +-
src/toneGeneration.ts | 16 +++-------------
6 files changed, 10 insertions(+), 42 deletions(-)
diff --git a/app.ts b/app.ts
index 7e2856f..c8b0f95 100644
--- a/app.ts
+++ b/app.ts
@@ -25,31 +25,6 @@ export const soundChord = (pitches: string[]) => {
bass.triggerAttackRelease(b, "8n");
}
-// initial test: generate a single, random chord
-export const fullRandomChord = () => {
- let pitches: string[] = [];
- for (let voice of pitchsets) {
- // finds a random index, excluding any which may already exist in the array
- let index: number;
-
- do {
- index = Math.floor(Math.random() * 100) % voice.length;
- } while (pitches.includes(voice[index]));
-
- pitches.push(voice[index]);
- console.log(voice[index]);
- }
-
- for (let i = 0; i < pitches.length; i++) {
- if (pitches[i] === pitches[i+1]) {
- console.log("CAUGHT");
- }
- }
-
- soundChord(pitches);
- extractPitchset(pitches);
-}
-
// set up transport
const transportStart = document.getElementById('transport-start');
diff --git a/index.html b/index.html
index c99b8c0..89ac1e5 100644
--- a/index.html
+++ b/index.html
@@ -123,5 +123,6 @@
+