当我运行或构建时,我得到了这个错误:"ReferenceError: AudioBuffer is not defined“ 我已经将tone.js代码隔离在codesandbox中,它工作得很好。file=/src/App.js 但不在next.js应用程序中 ReferenceError: AudioBuffer is not defined
at ki (/node_modules/
到目前为止,我知道AudioBuffer是浏览器的一个特性,但是如何在Node.js中使用这段代码呢?/play a middle 'C' for the duration of an 8th note
Tone.triggerAttackRelease("C4", "8n"); 这是我得到的错误: ReferenceError: AudioBuffer is not defined 然后它会链接到node_modules文件夹中的Tone.js文件。
我正在用类型记录和创建一个应用程序,我正在使用来测试它。import * as Tone from 'tone';
instrument: Tone.Synth;
this.instrument = new Tone.Synth().toDestination();}import { Musician } from '../src/musician';
test("Mu