diff --git a/src/API.ts b/src/API.ts index 0ef3558..d6810df 100644 --- a/src/API.ts +++ b/src/API.ts @@ -42,13 +42,23 @@ Array.prototype.in = function (this: T[], value: T): boolean { return this.includes(value); }; -// Loading the Strudel sampler -Promise.all([ - initAudioOnFirstClick(), - samples("github:tidalcycles/Dirt-Samples/master"), - samples("github:Bubobubobubobubo/Topos-Samples/main"), - registerSynthSounds(), -]); + +async function loadSamples() { + const ds = "https://raw.githubusercontent.com/felixroos/dough-samples/main/"; + return Promise.all([ + initAudioOnFirstClick(), + samples("github:Bubobubobubobubo/Topos-Samples/main"), + samples(`${ds}/tidal-drum-machines.json`), + samples(`${ds}/piano.json`), + samples(`${ds}/Dirt-Samples.json`), + samples(`${ds}/EmuSP12.json`), + samples(`${ds}/vcsl.json`), + registerSynthSounds(), + ]); +} + +loadSamples() + export class UserAPI { /** diff --git a/src/Evaluator.ts b/src/Evaluator.ts index 9fff596..9e7a87c 100644 --- a/src/Evaluator.ts +++ b/src/Evaluator.ts @@ -45,9 +45,7 @@ export const tryEvaluate = async ( if (cache.has(candidateCode)) { // If the code is already in cache, use it cache.get(candidateCode)!.call(application.api); - console.log('Using cached code') } else { - console.log('Evaluating code') const wrappedCode = `let i = ${code.evaluations};` + candidateCode; // Otherwise, evaluate the code and if valid, add it to the cache const isCodeValid = await Promise.race([