0.0.6 • Published 3 years ago

sf2-player v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

sf2synth.js

sf2synth.js is WebMidiLink based SoundFont Synthesizer.

Install

npm install sf2-player

or

<script src="https://cdn.jsdelivr.net/gh/logue/sf2synth.js@develop/bin/sf2.synth.min.js"></script>

Usage

<div id="placeholder"></div>
// Url to SoundFont file.
const soundfont = 'Yamaha XG Sound Set.sf2';
// Option
const option = {
  // attach dom id
  placeholder : 'placeholder',
  // If you not nessesaly to draw keyboad, set false.
  drawSynth : true,
  // Cache Soundfont
  cache : true
};

const wml = new SoundFont.WebMidiLink(option);
wml.setLoadCallback(() => {
    // Finishd to
});
wml.setup(url);

Sample

https://logue.github.io/smfplayer.js/wml.html

Compatibility

equires a browser that supports the Web Audio API.

  • Google Chrome 25+
  • Google Chrome for Android 28+
  • FireFox 25+
  • Edge

MIDI Compatibility

  • sf2synth.js is compliant with WebMidiLink Level 1.
  • Supported MIDI standards are GM Level 2 and YAMAHA XG Lite (equivalent to YAMAHA MU50).
  • MIDI files created in the Roland GS standard may not play properly.
  • Portamento and chorus effect is not supported.
  • A specification called progress has been added as an instruction that is not compliant with WebMidiLink.

License

Licensed under the MIT License.

  • 2013 by imaya / GREE Inc.
  • 2013-2019 by Logue.np