diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..3e391de Binary files /dev/null and b/.DS_Store differ diff --git a/app.ts b/app.ts index 6bfcda9..4cd4655 100644 --- a/app.ts +++ b/app.ts @@ -1,9 +1,11 @@ -import * as Tone from 'tone'; - // initialize four synth voices +// @ts-expect-error: namespace, Tone, for all of the following "expect-error calls" const soprano = new Tone.Synth().toDestination(); +// @ts-expect-error const alto = new Tone.Synth().toDestination(); +// @ts-expect-error const tenor = new Tone.Synth().toDestination(); +// @ts-expect-error const bass = new Tone.Synth().toDestination(); // test function for audio is armed @@ -26,6 +28,7 @@ export const soundChord = (pitches: string[]) => { // set up transport const transportStart = document.getElementById('transport-start'); +// @ts-expect-error const loop = new Tone.Loop((time) => { audioTest(); }, "8n").start(0); @@ -33,5 +36,6 @@ const loop = new Tone.Loop((time) => { loop.probability = 0.8; transportStart.onclick = () => { + // @ts-expect-error Tone.Transport.start(); } diff --git a/index.html b/index.html index bdfb6df..7388fb8 100644 --- a/index.html +++ b/index.html @@ -119,5 +119,12 @@ + + + + + + + \ No newline at end of file diff --git a/src/styleUtils.ts b/src/styleUtils.ts index 8231e4c..7f47476 100644 --- a/src/styleUtils.ts +++ b/src/styleUtils.ts @@ -1,5 +1,3 @@ -import * as Tone from 'tone'; - export const startButton = document.getElementById("start-tone"); export const synthButton = document.getElementById("synth-button"); @@ -26,6 +24,7 @@ showMore.onclick = () => { } startButton.onclick = async () => { + // @ts-expect-error - namespace again, failed import from Tone await Tone.start() .then(() => { appReady = true; diff --git a/src/vector_logic/extractPitchset.ts b/src/vector_logic/extractPitchset.ts index 946a7e9..4c63b80 100644 --- a/src/vector_logic/extractPitchset.ts +++ b/src/vector_logic/extractPitchset.ts @@ -1,4 +1,4 @@ -import { musicalPitches } from "../harmonyUtil"; +import { musicalPitches } from "../harmonyUtil.js"; export const extractPitchset = (pitches: string[]) => { // 1) determine pitch set from given array of pitches diff --git a/tsconfig.json b/tsconfig.json index 494906a..0de2996 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,14 @@ "compilerOptions": { "outDir": "./built", "allowJs": true, - "target": "es2017", - "module": "CommonJS", + "target": "es2018", + "module": "ESNext", "moduleResolution": "node", }, - "include": ["./src/**/*", "./app"] + "include": [ + "./src/**/*", "./app" + ], + "exclude": [ + "/_tone" + ] } \ No newline at end of file