{"id":41180564,"url":"https://github.com/mmontag/chip-player-js","last_synced_at":"2026-01-22T20:05:12.623Z","repository":{"id":38412464,"uuid":"144789556","full_name":"mmontag/chip-player-js","owner":"mmontag","description":"Web-based music player for a variety of video game and chiptune music formats.","archived":false,"fork":false,"pushed_at":"2025-12-23T07:15:36.000Z","size":671861,"stargazers_count":418,"open_issues_count":46,"forks_count":26,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-24T09:51:08.014Z","etag":null,"topics":["chiptunes","midi","music-player","retro","video-games"],"latest_commit_sha":null,"homepage":"https://chiptune.app","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmontag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-08-15T01:22:22.000Z","updated_at":"2025-12-23T07:05:20.000Z","dependencies_parsed_at":"2025-09-21T08:34:26.511Z","dependency_job_id":null,"html_url":"https://github.com/mmontag/chip-player-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mmontag/chip-player-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmontag%2Fchip-player-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmontag%2Fchip-player-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmontag%2Fchip-player-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmontag%2Fchip-player-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmontag","download_url":"https://codeload.github.com/mmontag/chip-player-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmontag%2Fchip-player-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chiptunes","midi","music-player","retro","video-games"],"created_at":"2026-01-22T20:05:12.529Z","updated_at":"2026-01-22T20:05:12.607Z","avatar_url":"https://github.com/mmontag.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chip Player JS\n\n![Screen Shot 2019-11-19 at 1 21 04 PM](https://user-images.githubusercontent.com/946117/69187458-80955600-0acf-11ea-9a1f-e090032dcb00.png)\n\nPlay online: [Chip Player JS](https://mmontag.github.io/chip-player-js). Feature requests? [Create an issue](https://github.com/mmontag/chip-player-js/issues/new).\n\n### Features\n\n- Support popular game console formats and tracker formats (not exhaustive)\n- Advanced sound control (channel volume, panning, etc.) like [NotSoFatso](https://disch.zophar.net/notsofatso.php)'s stereo and bandlimiting controls\n- Built-in online music library like [Chipmachine](http://sasq64.github.io/chipmachine/)\n- Simple music management (at least the ability to save favorites) like Winamp/Spotify\n- High-quality MIDI playback with JS wavetable synthesis\n    * Bonus: user-selectable soundbanks\n- Track sequencer with player controls and shuffle mode\n- Media key support in Chrome\n- High performance\n   - Time-to-audio under 500 ms (i.e. https://mmontag.github.io/chip-player-js/?play=ModArchives/aryx.s3m)\n   - Instant search results\n   - CPU usage under 25% in most circumstances\n\n## Development Notes\n\n### Architecture\n\nThis project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\n\nThe player engines come from C/C++ libraries such as [game-music-emu](https://bitbucket.org/mpyne/game-music-emu/wiki/Home) and [libxmp](https://github.com/cmatsuoka/libxmp), compiled to JS with [Emscripten](https://kripken.github.io/emscripten-site). Where possible, these projects are incorporated using `git subtree`.\n\nThe C/C++ code is compiled by [scripts/build-chip-core.js](scripts/build-chip-core.js). This file also defines the list of exports that will be available to the JavaScript program. Components that go into this build are as follows:\n\n* Manually selected cpp sources from game-music-emu.\n* For libraries with their own build system like LibXMP and Fluidlite (detailed [below](#Building)):\n    * Build a static library with Emscripten (i.e. using emconfigure, emmake)\n    * Link the static library in build-chip-core.js\n* **tinyplayer.c**: a super light MIDI file reader/player\n* **showcqtbar.c**: a modified [FFMPEG plugin](https://github.com/mfcc64/html5-showcqtbar) providing lovely [constant Q](https://en.wikipedia.org/wiki/Constant-Q_transform#Comparison_with_the_Fourier_transform) spectrum analysis for the visualizer.\n\nThe music catalog is created by [scripts/build-catalog.js](scripts/build-catalog.js). **This script looks for a ./catalog folder to build a music index.** This location is untracked, so put a symlink here that points to your local music archive. TODO: Document the corresponding public location (`CATALOG_PREFIX`).\n\n### Local Development Setup\n\nPrerequisites: npm, cmake, emsdk.\n\n* Clone the repository. \n* Run `npm install`.\n\nIn building the subprojects, we ultimately invoke `emmake make` instead of `make` to yield an object file that Emscripten can link to in the final build.\n\n* Install the [Emscripten SDK (emsdk)](https://github.com/emscripten-core/emsdk).\n* The build script in [package.json](package.json) looks for the emsdk in `~/src/emsdk`. Modify this line to match your emsdk install location if necessary:\n\n  ```\"build-chip-core\": \"source ~/src/emsdk/emsdk_env.sh; node scripts/build-chip-core.js\",```\n  \n#### Tight coupling to Github Pages\n\nThe project is currently set up to deploy to Github Pages. The `deploy` and `deploy-lite` NPM scripts invoke the gh-pages NPM module. \n\nIf you wish to deploy to your own Github Pages account, change the `\"homepage\"` field in package.json.\n\n#### User Accounts and Saved Favorites Functionality\n\nUser account management is provided through Firebase Cloud Firestore. You must obtain your own [Google Firebase](https://console.firebase.google.com/) credentials and update [src/config/firebaseConfig.js](src/config/firebaseConfig.js) with these credentials. This file is not tracked. Without these credentials, Login/Favorites functionality won't work.\n\n#### External project: libxmp-lite\n\nOur goal is to produce **../libxmp/build/libxmp-lite.a** (assumes you have cloned **libxmp** side-by-side with chip-player-js).\n\nA **libxmp** subtree was previously included in this repository, but this is deprecated.\n\n```sh\ngit clone git@github.com:libxmp/libxmp.git\ncd libxmp/\nsource ~/src/emsdk/emsdk_env.sh  # load the emscripten environment variables\nmkdir build                      # create a build folder for Cmake output\ncd build\nemcmake cmake -DBUILD_LITE -DBUILD_STATIC ..  # or use ccmake (see note below)\nemmake make\n```\n\nOptionally, use **ccmake** instead to configure the build.  See screenshot below for recommended build options. We want `BUILD_LITE` and `BUILD_STATIC`.\n\n```\nccmake -DCMAKE_TOOLCHAIN_FILE=\"$(dirname $(which emcc))/cmake/Modules/Platform/Emscripten.cmake\" ..\n```\n\n![image](https://github.com/user-attachments/assets/1ca9de9c-8123-4619-a691-aff289eb6066)\n\n\n#### External project: fluidlite\n\nOur goal is to produce **../fluidlite/build/libfluidlite.a** (**build-chip-core.js** assumes you have cloned FluidLite side-by-side with chip-player-js). A **fluidlite** subtree was previously included in this repository, but this is deprecated and can be ignored.\n\nBuild fluidlite (uses Cmake):\n\n```sh\ngit clone git@github.com:divideconcept/FluidLite.git\ncd FluidLite/                    # navigate to fluidlite root\nsource ~/src/emsdk/emsdk_env.sh  # load the emscripten environment variables\nmkdir build                      # create a build folder for Cmake output\ncd build                         \nemcmake cmake ..                 # Cmake will generate a Makefile\n                                 # Note: SF3 support is now disabled by default\n                                 # Problems here? Try deleting CMake cache files\nemmake make fluidlite-static\n```\n\n#### Subproject: psflib and lazyusf2\n\nOur goal is to produce **psflib/libpsflib.a** and **lazyusf2/liblazyusf.a**. These use a special Emscripten.Makefile (loosely based on [Jeurgen Wothke's webn64 .bat script](https://github.com/wothke/webn64/blob/master/emscripten/makeEmscripten.bat)).\n\nBuild psflib:\n\n```sh\ncd chip-player-js/psflib/\nsource ~/src/emsdk/emsdk_env.sh  # load the emscripten environment variables\nemmake make -f Emscripten.Makefile libpsflib.a\n```\n\nBuild liblazyusf:\n\n```sh\ncd ../lazyusf2/\nemmake make -f Emscripten.Makefile liblazyusf.a\n```\n\n#### Subproject: libvgm\n\nOur goal is to produce **libvgm/build/bin/libvgm-emu.a**, **libvgm/build/bin/libvgm-player.a**, and **libvgm/build/bin/libvgm-util.a**.\n\n```sh\ncd chip-player-js/libvgm/\nsource ~/src/emsdk/emsdk_env.sh  # load the emscripten environment variables\nmkdir build                      # create a build folder for Cmake output\ncd build\nemcmake cmake ..\nemmake make\n```\n\nTo reconfigure the build-enabled sound chips with CMake UI, run `emcmake ccmake ..` from the build folder. Make desired changes to build flags, then `c` to configure and `g` to generate new Makefile. Then run `emmake make`. Optionally, commit the same changes back to CMakeLists.txt in libvgm parent folder. \n\n#### External project: game-music-emu\n\nOur goal is to produce **../game-music-emu/build/libgme.a** (assumes you have cloned **game-music-emu** side-by-side with chip-player-js).\n\nA **game-music-emu** subtree was previously included in this repository, but this is deprecated.\n\n```sh\ngit clone git@github.com:mmontag/game-music-emu.git\ncd game-music-emu/\nsource ~/src/emsdk/emsdk_env.sh  # load the emscripten environment variables\nmkdir build                      # create a build folder for Cmake output\ncd build\nemcmake cmake ..\nemmake make\n```\n\nOptionally, use **ccmake** instead to configure the build.  See screenshot below for recommended build options. We do not want VGM support as this is handled by libvgm.\n\n```\nccmake -DCMAKE_TOOLCHAIN_FILE=\"$(dirname $(which emcc))/cmake/Modules/Platform/Emscripten.cmake\" ..\n```\n\n![game-music-emu cmake example](https://github.com/user-attachments/assets/1899b5e6-5620-4cf2-b253-672b39212124)\n\n#### WebAssembly build\n\nOnce these are in place we can build the parent project.\nOur goal is to produce **public/chip-core.wasm**.\n\n```sh\ncd chip-player-js/\nnpm run build-chip-core\n```\n\nThis will use object files created in the previous steps and link them into chip-core.wasm.\nIf you change some C/C++ component of the subprojects, you'll need to redo this process.\nOnce we have chip-core.wasm, we can proceed to develop JavaScript interactively on localhost:\n\n```sh\nnpm start\n```\n\nBuild the entire project:\n\n```sh\nnpm build\n```\n\nOr deploy to Github Pages:\n\n```sh\nnpm deploy\n```\n\nDeploy to Github Pages without rebuilding chip-core.wasm: \n\n```sh\nnpm deploy-lite\n```\n\n## Related Projects\n\n#### Chipmachine (Native)\nhttp://sasq64.github.io/chipmachine/\n\nChipmachine is a multiplatform player supporting an enormous number of formats. Downloads music from an impressive variety of [external sources](https://github.com/sasq64/chipmachine/blob/master/lua/db.lua).\nMost of these come from HTTP sources without CORS headers, not feasible for direct playback. \n\n#### Muki (JS)\nhttp://muki.io\n\nMuki, by [Tomás Pollak](https://github.com/tomas), is a polished JS player pulling together [Timidity (MIDI)](http://timidity.sourceforge.net/), [Munt (MT-32)](https://github.com/munt/munt), [libopenmpt](https://lib.openmpt.org/libopenmpt/) (instead of libxmp), game-music-emu, Wildmidi, Adplug, [Adlmidi (OPL3)](https://bisqwit.iki.fi/source/adlmidi.html), mdxmini, and [sc68](http://sc68.atari.org/apidoc/index.html). The music is a collection of PC game music.\n\n#### Chiptune Blaster (JS)\nhttps://github.com/wothke?tab=repositories\n\nJeurgen Wothke's collection of chipmusic projects ported to the web with Emscripten. He's beaten me to it, but with a rudimentary player and no built-in music collection. http://www.wothke.ch/blaster\n\n#### SaltyGME (JS)\nhttp://gamemusic.multimedia.cx/about\n\nSaltyGME is a GME-based web player targeting Google Chrome NaCl. (Deprecated)\n\n#### Cirrus Retro (JS)\nhttps://github.com/multimediamike/cirrusretro-players\n\nCirrusretro is an updated version of SaltyGME compiled with Emscripten. Self-hosted file archive.\n\n#### Audio Overload (Native)\nhttps://www.bannister.org/software/ao.htm\n\nAudio Overload is a multiplatform player supporting 33 formats.\n\n#### JSGME (JS)\nhttp://onakasuita.org/jsgme/\n\nOne of the first examples of GME compiled with Emscripten. Music collection is a self-hosted mirror of Famicompo entries.\n\n#### MoseAmp (Native + JS)\nhttps://github.com/osmose/moseamp\n\nMoseAmp is a multiplatform player built with Electron. Some nice game console icons: https://www.deviantart.com/jaffacakelover/art/Pixel-Gaming-Machine-Icons-413704203\n\n## Resources\n\n### MIDI Stuff\n\nThe best modern option for playing MIDI is probably using a well-designed GM SoundFont bank with a good SoundFont 2.01 implementation like FluidSynth.\n\n- SF2 Overview: https://schristiancollins.wordpress.com/2016/03/02/using-soundfonts-in-2016/\n- Timidity compiled by Emscripten: https://bitmidi.com/\n    * https://github.com/feross/timidity/commit/d1790eef24ff3b4067c536e45aa88c0863ad9676\n    * Uses the 32 MB [\"Old FreePats sound set\"](http://freepats.zenvoid.org/SoundSets/general-midi.html)\n- MIDI file library: https://github.com/craigsapp/midifile\n- FluidSynth Lite, supports SF3: https://github.com/divideconcept/FluidLite\n- Compress SF2 to SF3: https://github.com/cognitone/sf2convert\n\n### SoundFont Credits\n\n#### GM SoundFonts\n\n- GeneralUser SF2 sound bank: http://schristiancollins.com/generaluser.php\n- Many excellent piano SoundFonts: https://sites.google.com/site/soundfonts4u\n- The Ultimate Megadrive SoundFont: https://musical-artifacts.com/artifacts/24\n- NTONYX SoundFont: http://ntonyx.com/sf_f.htm\n- SoundFonts at MuseScore: https://musescore.org/en/handbook/soundfonts-and-sfz-files#list\n- SoundFonts at Woolyss: https://woolyss.com/chipmusic-soundfonts.php\n- Weeds GM3: Rich \"Weeds\" Nagel, 2010 http://bhservices.us/weeds/Temp/\n\n#### Novelty SoundFonts\n\n- PC Beep: Rich \"Weeds\" Nagel, 1998\n\n### Music Archive Sources\n\n- MIDI\n  - Lakh MIDI Dataset: [Colin Raffel's thesis work](https://colinraffel.com/projects/lmd/) on MIDI alignment. About 20,000 cleaned popular music MIDI files.\n      * Colin Raffel. \"Learning-Based Methods for Comparing Sequences, with Applications to Audio-to-MIDI Alignment and Matching\". PhD Thesis, 2016.\n  - Sound Canvas MIDI Collection: https://archive.org/details/sound_canvas_midi_collection\n  - Piano E-Competition MIDI: http://www.piano-e-competition.com/midiinstructions.asp\n- Video Games\n  - VGM Rips: https://vgmrips.net • [VGMRips full download packs](https://vgmrips.net/forum/viewtopic.php?f=1\u0026t=496\u0026start=45\u0026sid=4ff047600e6a72a701d09381b8a01964)\n  - VGMusic.com: https://www.vgmusic.com • [VGMusic.com 2018 Archive](https://archive.org/details/31581VideogameMusicMIDIFileswReplayGain8mbgmsfx.sf2)\n  - Zophar's Domain: https://www.zophar.net/music\n  - Mirsoft World of Game MIDs/MODs: http://mirsoft.info • [Mirsoft July 2021 Torrent](magnet:?xt=urn:btih:c3354503aa06d46c2c77193afb4ff6bc40c0e368\u0026dn=mirsoftJuly2021snapshot\u0026tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce)\n- The Mod Archive: https://modarchive.org\n- OPL Archive: http://opl.wafflenet.com\n- Modland: https://modland.com/pub/modules\n- Famicompo NSF Competition: https://mini.famicompo.com/compo/top.html • [Famicompo NSFE Archive](https://www.dropbox.com/s/8snytwvzqcnjn54/Famicompo%20NSFE.rar?dl=1)\n\n### Miscellaneous\n\n[ISO 226 Equal loudness curves](https://github.com/IoSR-Surrey/MatlabToolbox/blob/master/%2Biosr/%2Bauditory/iso226.m)\n\n## License\n\nA word about licensing: chip-player-js represents the hard work of many individuals because it is built upon several open-source projects. Each of these projects carries their own license restrictions, and chip-player-js as a whole must adhere to the most restrictive licenses among these. Therefore, chip-player-js is *generally* licensed under [GPLv3](LICENSE). \n\nHowever, each subdirectory in this project *may* contain additional, more specific license info that pertains to files contained therein. For example, the code under [src/](src) is written by me and is more permissively [MIT licensed](src/LICENSE).\n\nThis project is supported by:\n\n\u003ca href=\"https://m.do.co/c/fb2d6eb51d7b\"\u003e\n\u003cimg src=\"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg\" width=\"170px\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmontag%2Fchip-player-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmontag%2Fchip-player-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmontag%2Fchip-player-js/lists"}