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

midiconstants-csv

v0.0.1

Published

An unofficial MIDI SDK.

Downloads

4

Readme

midiconstants-csv

An unofficial MIDI SDK that aims to provide data tables about (General) MIDI in several formats:

  • CSV: semicolon delimited text files.
  • C++ header files via Python: see the section below.
  • Node.js package: Should work out of the box by reading the CSV files synchronously(!!) at require() time. If you want to use asynchronous module systems, use the JSON version.
  • JSON: You can use the Node.js version to generate a plain JSON file and an AMD-wrapped version in the dist/nonfree/ folder: run nodejs csv2pojo.js --dist-json

 

Batteries not included :-(

This free software edition is a reboot of Torbjörn Rathsman's original midiconstants project and does not include the actual CSV data due to license issues.

Until we can find another source for these, you'll have to download them yourself. One easy way to do so is to run:

$ ./build/download-data-files.sh

 

Data files

The data/ directory has:

  • status_codes.csv: All MIDI status codes.
  • control_codes.csv: All control codes for MIDI status 0xB0.
  • gm_programs.csv: The names of all General MIDI programs ("instruments", "patches").
  • gm_drumkit.csv: The names of all General MIDI percussion sounds.

Control codes

Control codes less than 32 have a corresponding Least Significant Byte control code obtained by adding 32 to the Most Significant Byte control code. Therefore, these are not listed in control_codes.csv.

 

C++ header files

(tl;dr: for PY in *_*.py; do python3 $PY; done; ls dist/nonfree/*.hpp)

To translate any of the CSV tables into a C++ header file, run its corresponding .py, e.g.: python3 -- gm_drumkit.py [dest_dir [src_dir]]

Both options dest_dir (where to put the header files) and src_dir (where to find the CSV) are optional. If missing, dest_dir defaults to dist/nonfree/ inside the repo and src_dir defaults to guessing, which should result in data/.

Support for the Maike build system

Project using Maike should be able to auto-detect the paths for this project and work out-of-the-box. Thus, all include files can be generated by running Maike from the top directory of the repo, and all include files will end up in the __targets directory.

 

License

Copyright (c) 2017 Torbjörn Rathsman. All rights reserved. Released under the BSD-2-Clause license.

A machine-readable list of contributors is kept in the contributors field of package.json.