feross / feross/timidity

Error with official example

未关闭
#27 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Shell
星标
403
派生
44
PR 合并指标
30 天内没有已合并 PR

描述

When I try `const Timidity = require('timidity')` from the readme, I get `Uncaught ReferenceError: require is not defined`.

Then I `browserify` the example from the readme. But then it can't find `libtimidity.wasm`.

Then I replace
```
const player = new Timidity()
player.load('/my-file.mid')
```
by
```
baseUrl = 'https://bitmidi.com/timidity/'
const player = new Timidity(baseUrl)
player.load('https://bitmidi.com/uploads/16752.mid')
```
Then I get the warning "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.".

I click on the webpage (which works after applying `browserify` to `bg-sound`). But there's still no sound.

So how exactly can I use `timidity`?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。