sf2-loader
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

sf2-loader

sf2-loader is a webpack loader to parse sf2 soundfont file. It is based on https://github.com/colinbdclark/sf2-parser. The output file is formatted for use with https://github.com/danigb/sample-player.

Installation

Requirement

sf2-loader uses LAME and FluidSynth.

  • To install LAME, see here
  • To install FluidSynth, see here

install from npm

npm i -D sf2-loader

webpack config file

module.exports = {
  // ...
 
  module: {
    rules: [
      {
        test: /\.sf2$/,
        use: [
          {
            loader: 'sf2-loader',
            options: {
              bitrate: 64,
            },
          },
        ],
      },
    ],
  },
 
  // ...
}

Options

sf2-loader options is for node-lame. You can specify bitrate(REQUIRED) and resample. About deteail, see here.

LICENSE

Package Sidebar

Install

npm i sf2-loader

Weekly Downloads

13

Version

1.0.8

License

MIT

Unpacked Size

74.2 kB

Total Files

33

Last publish

Collaborators

  • whatasoda