cleanup, project/directory management

This commit is contained in:
Mikayla Dobson
2022-05-15 13:45:35 -05:00
parent c787161394
commit 869541d88e
12 changed files with 14 additions and 35 deletions

1
.gitignore vendored
View File

@@ -1,2 +1 @@
/node_modules
/built

View File

@@ -12,12 +12,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"tone": "^14.7.77",
"typescript": "^4.6.4"
},
"devDependencies": {
"@types/node": "^17.0.32",
"tone": "^14.7.77",
"typescript": "^4.6.4"
"tone": "^14.7.77"
}
}

View File

@@ -1,7 +1,7 @@
import { soundChord } from "../app.js";
import { extractPitchset } from "./dataConversions.js";
import { getRandomPitches } from "./pitch_generation/getRandomPitches.js";
import { getProceduralPitches } from "./pitch_generation/getProceduralPitches.js";
import { extractPitchset } from "./data_conversions/extractPitchset.js";
// initial test: generate a single, random chord
export const fullRandomChord = () => {

View File

@@ -1,5 +1,9 @@
import { musicalPitches } from '../harmonyUtil.js';
import { extractPitchName } from './extractPitchName.js';
import { musicalPitches } from './harmonyUtil.js';
// inline functions for converting between data types
export const extractPitchName = (tonePitchName) => tonePitchName.match(/[A-Gb#]/g).join('');
export const extractOctave = (pitchName) => pitchName.match(/[0-9]/g).join('');
export const getRandomIndex = (voice) => Math.floor(Math.random() * 100) % voice.length;
// converts pitches in Tone.js string format to base-12 number pitchsets
export const extractPitchset = (pitches) => {

View File

@@ -1 +0,0 @@
export const extractOctave = (pitchName) => pitchName.match(/[0-9]/g).join('');

View File

@@ -1 +0,0 @@
export const extractPitchName = (tonePitchName) => tonePitchName.match(/[A-Gb#]/g).join('');

View File

@@ -1,6 +1,5 @@
import { pitchsets, musicalPitches } from "../harmonyUtil.js";
import { extractPitchName } from "../data_conversions/extractPitchName.js";
import { getRandomIndex } from "./getRandomPitches.js";
import { extractPitchName, getRandomIndex } from "../dataConversions.js";
import { melodicGeneration } from './melodicGeneration.js';
import { sonorityList } from "./sonorityList.js";

View File

@@ -1,8 +1,5 @@
import { pitchsets } from "../harmonyUtil.js";
import { extractPitchName } from "../data_conversions/extractPitchName.js";
// helper function for assigning a random index for a given voice's pitchset
export const getRandomIndex = (voice) => Math.floor(Math.random() * 100) % voice.length;
import { extractPitchName, getRandomIndex } from "../dataConversions.js";
export const getRandomPitches = () => {
// pitches stored in Tone.js string format

View File

@@ -1,11 +0,0 @@
import { melodicGeneration } from "./melodicGeneration.js";
// let result = melodicGeneration(['C3', 'G3', 'A3', 'G5']);
// console.log(result);
let myArray = [[1,2], [3,4], [5,6]];
let shifted = myArray.shift();
console.log(shifted);
console.log(myArray);

View File

@@ -1,6 +1,5 @@
import { getRandomPitches } from './getRandomPitches.js';
import { extractPitchName } from '../data_conversions/extractPitchName.js';
import { extractOctave } from '../data_conversions/extractOctave.js';
import { extractOctave, extractPitchName } from '../dataConversions.js';
import { musicalPitches, pitchsets } from '../harmonyUtil.js';
// reads the pitch of the previous sonority and determines appropriate melodic movement for the soprano

View File

@@ -1,5 +1,5 @@
import { getRandomPitches } from '../pitch_generation/getRandomPitches.js';
import { extractPitchset } from "../data_conversions/extractPitchset.js";
import { extractPitchset } from "../dataConversions.js";
import { findVector } from "./findVector.js";
export const evaluateVector = (vector) => {