How to use the midi.js.loadPlugin function in midi

To help you get started, we’ve selected a few midi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github djyde / Pciano / src / index.ts View on Github external
import * as MIDI from 'midi.js'
import './style.css'
import * as Vue from 'vue'
import { onsuccess } from './keyBinding'

MIDI.loadPlugin({
  instrument: 'acoustic_grand_piano',
  soundfontUrl: 'static/soundfont/',
  onsuccess
})
github guildai / guildai / guild / view / src / components / guild-midi-viewer.vue View on Github external
initPlayer() {
      const this_ = this;
      MIDI.loadPlugin({
        soundfontUrl: '/assets/soundfont/',
        onsuccess() {
          this_.player = MIDI.Player;
          this_.initPlayerSrc();
        }
      });
    },