diff --git a/packages/webaudio/webaudio.mjs b/packages/webaudio/webaudio.mjs index 9fecbb31..dff958e4 100644 --- a/packages/webaudio/webaudio.mjs +++ b/packages/webaudio/webaudio.mjs @@ -115,7 +115,11 @@ const getSampleBufferSource = async (s, n, note, speed) => { } const bank = samples?.[s]; if (!bank) { - throw new Error(`sample not found: "${s}", try one of ${Object.keys(samples).join(', ')}`); + throw new Error( + `sample not found: "${s}", try one of ${Object.keys(samples) + .map((s) => `"${s}"`) + .join(', ')}.`, + ); } if (typeof bank !== 'object') { throw new Error('wrong format for sample bank:', s);