npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

midijssf-from-sf2-pmb

v0.1.6

Published

Utilities for converting .sf2 wavetables to MIDI.js sound font format.

Downloads

11

Readme

midijssf-from-sf2-pmb

Utilities for converting .sf2 wavetables to MIDI.js sound font format.

The space and lowercase "f" in "sound font(s)" is my attempt to help you discern them from the brand name.

Usage

See the midijssf-timgm6mb-pmb package for how to use this one.

Some hints:

  • Beware that mono music usually won't survive the naive karaoke approach (sox: oops effect). If you try to save bytes this way, really compare the cost for each selected output format. Occasionally I have been surprised by how small a difference it made.

How it works

  • For each selected instrument (including percussion) and each MIDI note:
    • Make a MIDI file playing that note on that instrument.
      • If things work out, this is done only once when the package is installed, by running the input-files.gen-all.js script.
    • Let fluidsynth convert the MIDI to FLAC audio, using the configured .sf2 wavetable.
      • WAV or AU seemed more efficient but caused problems with the plumbing.
    • Let sox convert the FLAC to WAV, and optionally trim trailing silence in the process.
    • Encode the samples to selected output formats (e.g. Vorbis, MP3) and compile them into bundles (MIDI.js sound font and/or Compact JSON WaveTable).

Template variables

Some options support variable. Their notation is \v (U+000B line tabulation) followed by a single letter:

  • d: config.destDir
  • B: config.sf2basename
  • b: config.sf2basename.toLowerCase()
  • F: current output audio format ID
    • f: same but in lowercase
  • i: current instrument ID (001128, or -10 for percussion)
  • I: current instrument name (or config.chn10Name for percussion)
    • s: same but in snake_case

Known issues

  • needs more/better tests and docs

 

License

ISC