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.
sf2-loader
uses LAME and FluidSynth.
npm i -D sf2-loader
module.exports = {
// ...
module: {
rules: [
{
test: /\.sf2$/,
use: [
{
loader: 'sf2-loader',
options: {
bitrate: 64,
},
},
],
},
],
},
// ...
}
sf2-loader
options is for node-lame
. You can specify bitrate
(REQUIRED) and resample
.
About deteail, see here.