From f491d0c0c429e3a2cfe822452bd2e9c450643b4f Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 2 Dec 2022 12:22:32 +0100 Subject: [PATCH] fix loadOrc in tests --- repl/src/runtime.mjs | 1 + .../test/__snapshots__/tunes.test.mjs.snap | 99 ++++++------------- 2 files changed, 31 insertions(+), 69 deletions(-) diff --git a/repl/src/runtime.mjs b/repl/src/runtime.mjs index d0c96c45..ada99cba 100644 --- a/repl/src/runtime.mjs +++ b/repl/src/runtime.mjs @@ -174,6 +174,7 @@ evalScope( // gist, // euclid, csound: id, + loadOrc: id, mini, getDrawContext, getAudioContext, diff --git a/repl/src/test/__snapshots__/tunes.test.mjs.snap b/repl/src/test/__snapshots__/tunes.test.mjs.snap index d4d3ef3b..1de13d99 100644 --- a/repl/src/test/__snapshots__/tunes.test.mjs.snap +++ b/repl/src/test/__snapshots__/tunes.test.mjs.snap @@ -1393,75 +1393,6 @@ exports[`renders tunes > tune: csoundDemo 1`] = ` ] `; -exports[`renders tunes > tune: csoundMixed 1`] = ` -[ - "2/3 -> 3/4: {\\"note\\":58.95209612324834,\\"gain\\":1}", - "2/3 -> 3/4: {\\"note\\":61.95209612324834,\\"gain\\":1}", - "2/3 -> 3/4: {\\"note\\":63.95209612324834,\\"gain\\":1}", - "2/3 -> 3/4: {\\"note\\":66.95209612324834,\\"gain\\":1}", - "0/1 -> 1/6: {\\"note\\":\\"c2\\",\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "0/1 -> 1/6: {\\"note\\":35.95209612324834,\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "1/3 -> 1/2: {\\"note\\":\\"c2\\",\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "1/3 -> 1/2: {\\"note\\":35.95209612324834,\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "1/2 -> 2/3: {\\"note\\":\\"c2\\",\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "1/2 -> 2/3: {\\"note\\":35.95209612324834,\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "5/6 -> 1/1: {\\"note\\":\\"c2\\",\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "5/6 -> 1/1: {\\"note\\":35.95209612324834,\\"s\\":\\"sawtooth\\",\\"cutoff\\":277.9313247650862,\\"resonance\\":10,\\"decay\\":0.1,\\"sustain\\":0}", - "0/1 -> 1/1: {\\"s\\":\\"bd\\",\\"room\\":0.5,\\"speed\\":0.900230494513707}", - "1/3 -> 2/3: {\\"s\\":\\"hh:1\\",\\"room\\":0.5,\\"speed\\":0.900230494513707}", - "2/3 -> 1/1: {\\"s\\":\\"hh:1\\",\\"room\\":0.5,\\"speed\\":0.9009985942422922}", -] -`; - -exports[`renders tunes > tune: csoundTest 1`] = ` -[ - "0/1 -> 2/1: {\\"note\\":\\"B3\\",\\"s\\":\\"sawtooth\\"}", - "0/1 -> 2/1: {\\"note\\":\\"D4\\",\\"s\\":\\"sawtooth\\"}", - "0/1 -> 2/1: {\\"note\\":\\"E4\\",\\"s\\":\\"sawtooth\\"}", - "0/1 -> 2/1: {\\"note\\":\\"G4\\",\\"s\\":\\"sawtooth\\"}", - "0/1 -> 2/1: {\\"note\\":\\"c2\\",\\"s\\":\\"sawtooth\\"}", -] -`; - -exports[`renders tunes > tune: csoundTest2 1`] = ` -[ - "0/1 -> 511525/2531369: {\\"note\\":\\"D3\\"}", - "-1/4 -> -1508319/10125476: {\\"note\\":\\"Bb3\\"}", - "1/4 -> 4577469/10125476: {\\"note\\":\\"F3\\"}", - "0/1 -> 511525/5062738: {\\"note\\":\\"F4\\"}", - "1/2 -> 3554419/5062738: {\\"note\\":\\"C4\\"}", - "-1/4 -> -1508319/10125476: {\\"note\\":\\"A4\\"}", - "1/4 -> 3554419/10125476: {\\"note\\":\\"A4\\"}", - "1/4 -> 3554419/10125476: {\\"note\\":\\"A4\\"}", - "3/4 -> 9640207/10125476: {\\"note\\":\\"E4\\"}", -] -`; - -exports[`renders tunes > tune: csoundTest3 1`] = ` -[ - "0/1 -> 1/1: {\\"note\\":\\"D3\\"}", - "-1/4 -> 1/4: {\\"note\\":\\"Bb3\\"}", - "1/4 -> 5/4: {\\"note\\":\\"F3\\"}", - "0/1 -> 1/2: {\\"note\\":\\"F4\\"}", - "1/2 -> 3/2: {\\"note\\":\\"C4\\"}", - "-1/4 -> 1/4: {\\"note\\":\\"A4\\"}", - "1/4 -> 3/4: {\\"note\\":\\"A4\\"}", - "1/4 -> 3/4: {\\"note\\":\\"A4\\"}", - "3/4 -> 7/4: {\\"note\\":\\"E4\\"}", -] -`; - -exports[`renders tunes > tune: csoundTest4 1`] = ` -[ - "0/1 -> 2/1: {\\"note\\":\\"B3\\",\\"gain\\":0.5}", - "0/1 -> 2/1: {\\"note\\":\\"D4\\",\\"gain\\":0.5}", - "0/1 -> 2/1: {\\"note\\":\\"E4\\",\\"gain\\":0.5}", - "0/1 -> 2/1: {\\"note\\":\\"G4\\",\\"gain\\":0.5}", - "0/1 -> 2/1: {\\"note\\":\\"c2\\",\\"s\\":\\"sawtooth\\",\\"cutoff\\":800,\\"resonance\\":10,\\"shape\\":0.3}", - "0/1 -> 2/1: {\\"note\\":36.1,\\"s\\":\\"sawtooth\\",\\"cutoff\\":800,\\"resonance\\":10,\\"shape\\":0.3}", -] -`; - exports[`renders tunes > tune: delay 1`] = ` [ "0/1 -> 1/2: {\\"s\\":\\"bd\\",\\"delay\\":0,\\"delaytime\\":0.16,\\"delayfeedback\\":0.8,\\"speed\\":-1}", @@ -8137,6 +8068,36 @@ exports[`renders tunes > tune: juxUndTollerei 1`] = ` ] `; +exports[`renders tunes > tune: loungeSponge 1`] = ` +[ + "0/1 -> 3/8: {\\"note\\":\\"B3\\",\\"cutoff\\":1396}", + "0/1 -> 3/8: {\\"note\\":\\"D4\\",\\"cutoff\\":1396}", + "0/1 -> 3/8: {\\"note\\":\\"E4\\",\\"cutoff\\":1396}", + "0/1 -> 3/8: {\\"note\\":\\"G4\\",\\"cutoff\\":1396}", + "3/8 -> 3/4: {\\"note\\":\\"B3\\",\\"cutoff\\":1396}", + "3/8 -> 3/4: {\\"note\\":\\"D4\\",\\"cutoff\\":1396}", + "3/8 -> 3/4: {\\"note\\":\\"E4\\",\\"cutoff\\":1396}", + "3/8 -> 3/4: {\\"note\\":\\"G4\\",\\"cutoff\\":1396}", + "3/4 -> 1/1: {\\"note\\":\\"B3\\",\\"cutoff\\":1396}", + "3/4 -> 1/1: {\\"note\\":\\"D4\\",\\"cutoff\\":1396}", + "3/4 -> 1/1: {\\"note\\":\\"E4\\",\\"cutoff\\":1396}", + "3/4 -> 1/1: {\\"note\\":\\"G4\\",\\"cutoff\\":1396}", + "0/1 -> 1/4: {\\"note\\":\\"C2\\",\\"gain\\":1}", + "1/4 -> 1/2: {\\"note\\":\\"C2\\",\\"gain\\":4}", + "1/2 -> 3/4: {\\"note\\":\\"C2\\",\\"gain\\":1}", + "3/4 -> 1/1: {\\"note\\":\\"C2\\",\\"gain\\":4}", + "0/1 -> 3/16: {\\"note\\":\\"A4\\"}", + "3/4 -> 15/16: {\\"note\\":\\"A5\\"}", + "-1/4 -> -1/16: {\\"note\\":\\"E5\\"}", + "1/2 -> 11/16: {\\"note\\":\\"C5\\"}", + "0/1 -> 1/2: {\\"s\\":\\"bd\\",\\"bank\\":\\"RolandTR909\\"}", + "1/2 -> 1/1: {\\"s\\":\\"bd\\",\\"bank\\":\\"RolandTR909\\"}", + "1/4 -> 1/2: {\\"s\\":\\"hh\\",\\"bank\\":\\"RolandTR909\\"}", + "3/4 -> 1/1: {\\"s\\":\\"hh\\",\\"bank\\":\\"RolandTR909\\"}", + "1/2 -> 1/1: {\\"s\\":\\"cp\\",\\"bank\\":\\"RolandTR909\\"}", +] +`; + exports[`renders tunes > tune: meltingsubmarine 1`] = ` [ "0/1 -> 3/2: {\\"s\\":\\"bd\\",\\"speed\\":0.7519542165100574}",