Skip to content

Error with official example #27

Description

@page200

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions