{"id":20840261,"url":"https://github.com/artefact2/libxm","last_synced_at":"2025-05-08T21:44:40.124Z","repository":{"id":8610657,"uuid":"10250877","full_name":"Artefact2/libxm","owner":"Artefact2","description":"A small XM (FastTracker II Extended Module) player library.","archived":false,"fork":false,"pushed_at":"2025-05-08T19:15:54.000Z","size":1443,"stargazers_count":151,"open_issues_count":7,"forks_count":16,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-08T20:26:45.737Z","etag":null,"topics":["demoscene","fasttracker","mod","module","tracker","xm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Artefact2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2013-05-23T18:47:33.000Z","updated_at":"2025-05-08T19:15:58.000Z","dependencies_parsed_at":"2025-05-08T20:33:38.910Z","dependency_job_id":null,"html_url":"https://github.com/Artefact2/libxm","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artefact2%2Flibxm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artefact2%2Flibxm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artefact2%2Flibxm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artefact2%2Flibxm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Artefact2","download_url":"https://codeload.github.com/Artefact2/libxm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154195,"owners_count":21862475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["demoscene","fasttracker","mod","module","tracker","xm"],"created_at":"2024-11-18T01:15:48.214Z","updated_at":"2025-05-08T21:44:40.112Z","avatar_url":"https://github.com/Artefact2.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"libxm\n=====\n\nA small XM (FastTracker II Extended Module) player library. Main\nfeatures:\n\n* Small size in mind; many features can be disabled at compile-time,\n  or are optimized out by the compiler if not used.\n\n* Timing functions for synchronising against specific instruments,\n  samples or channels.\n\n* Samples can be loaded and altered at run-time, making it possible to\n  use libxm with softsynths or other real-time signal processors.\n\n* Should be fairly portable (only dependency is `libm`). Big-endian compatible\n  (tested on s390x). The example programs mostly target Linux.\n\nWritten in C23 and released under the WTFPL license, version 2.\n\nBuilding\n========\n\n* Build the library:\n\n  ~~~\n  cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -Bbuild -Ssrc\n  make -C build\n  ~~~\n\n* Build a specific example:\n\n  ~~~\n  cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -Bbuild -Sexamples/FOO\n  make -C build-FOO\n  ~~~\n\n* To build a shared library and link dynamically, use\n  `cmake -DBUILD_SHARED_LIBS=ON`.\n\n* To see a list of build options, use `cmake -L` or `cmake-gui`.\n\n* To use libxm in your program, put these lines in the `CMakeLists.txt` of your  project, then `#include \u003cxm.h\u003e`:\n\n  ~~~\n  add_subdirectory(/path/to/libxm/src libxm_build)\n  target_link_libraries(my_stuff PRIVATE xm)\n  ~~~\n\n\nSize\n====\n\n`libxmtoau` can be compiled (with all playback features enabled) and\n[crushed](https://gitlab.com/artefact2/xzcrush) to about **4741 bytes** (Linux\nx86_64).\n\n~~~\ncmake -DCMAKE_BUILD_TYPE=MinSizeRel -DXM_DEFENSIVE=OFF -DXM_LIBXM_DELTA_SAMPLES=OFF -DXM_LINEAR_INTERPOLATION=OFF -DXM_RAMPING=OFF -DXM_STRINGS=OFF -DXM_SAMPLE_TYPE=float -Bbuild-libxmize -Sexamples/libxmize\nmake -C build-libxmize libxmtoau\nstrip -R .eh_frame_hdr -R .eh_frame build-libxmize/libxmtoau\nxzcrush build-libxmize/libxmtoau\n~~~\n\nIf you are using libxm to play a single module (like in a demo/intro), disable\nfeatures as suggested by `libxmize` to save a few more bytes.\n\nExamples\n========\n\n* [libxm.js](https://artefact2.github.io/libxm.js/) is a very simple\n  XM player/visualiser that runs in a browser (emscripten port).\n\n* `xmgl` is a simple music visualiser that uses OpenGL, GLFW and JACK for very\n  precise audio synchronisation. See a demo here:\n  \u003chttps://www.youtube.com/watch?v=SR-fSa7J698\u003e\n\n* `xmprocdemo`: a simple non-interactive demo that plays back a single module\n  with procedurally generated samples. Somewhat optimized for size. ([Dream\n  Candy](https://modarchive.org/module.php?178565) by Drozerix, public domain.\n  Thank you Drozerix for the great music!)\n\n* `libxmize` converts a `.xm` module to the libxm format. It is highly\n  non-portable and is meant for static linking and sizecoding (loading code is\n  much shorter and libxm format compresses better).\n\n* `libxmtoau` reads standard input (a file generated by `libxmize`) and\n  writes a .AU file to standard output. Somewhat optimized for size, see [size\n  section](#Size) above. You can test it with, for example,\n  `libxmize file.xm | libxmtoau | mpv -`.\n\nHere are some interesting modules, most showcase unusual or advanced\ntracking techniques (and thus are a good indicator of a player's\naccuracy):\n\n* [Cerror - Expatarimental](http://modarchive.org/module.php?136603)\n* [Lamb - Among the stars](http://modarchive.org/module.php?165819)\n* [Raina - Cyberculosis](http://modarchive.org/module.php?165308)\n* [Raina - Slumberjack](http://modarchive.org/module.php?148721)\n* [Strobe - One for all](http://modarchive.org/module.php?161246)\n* [Strobe - Paralysicical death](http://modarchive.org/module.php?65817)\n\nKnown issues\n------------\n\nSee [GitHub issues](https://github.com/Artefact2/libxm/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug).\n\nTests\n=====\n\nSome test XM files are in the `tests` directory. Their goal is to test\na certain feature against regressions. A summary of tests (and what\nthey are supposed to test) is in the table below.\n\n~~~\n     Test                      |     Status     |     Tested against     | Extras\n-------------------------------+----------------+------------------------+------------------------------------------------\namiga.xm                       | FAIL           | MilkyTracker, xmp      | Should sound identical.\narp-slow.xm                    | FAIL           | MilkyTracker, OpenMPT  | Should sound identical.\nautovibrato-turnoff.xm         | PASS           | MilkyTracker           | Same pitches should be heard twice in a row.\nfadeout-speed.xm               | PASS           | MilkyTracker           | Should sound identical.\nfinetune.xm                    | PASS           | MilkyTracker           | Left and right channels should sound identical.\nghosts.xm                      | FAIL           | MilkyTracker           | Left and right channels should sound identical.\nmultiretrig-volume.xm          | PASS           | FT2, OpenMPT           | Should sound identical.\nnote-delay-ghost.xm            | PASS           | MilkyTracker, FT2      | Should sound identical.\nnote-delay-retrig.xm           | PASS           | MilkyTracker           | Should sound identical.\npanning-law.xm                 | PASS           | MilkyTracker, FT2clone | Should sound identical.\npattern-loop-quirk.xm          | PASS           | MilkyTracker           | Should play the same notes at the same time.\npos_jump.xm                    | PASS           | Milkytracker, OpenMPT  | Only one beep should be heard.\nramping.xm                     | PASS           | MilkyTracker           | If XM_RAMPING is ON, no loud clicks should be heard.\nramping2.xm                    | PASS           | MilkyTracker           | If XM_RAMPING is ON, no loud clicks should be heard.\nretrig-vol-fade.xm             | PASS           | MT, FT2clone, OpenMPT  | Should sound identical.\ntone-portamento.xm             | PASS           | MilkyTracker           | Should sound identical.\ntremolo.xm                     | PASS           | MilkyTracker           | Should sound identical.\ntremor.xm                      | PASS           | MilkyTracker           | Should sound identical.\nvibrato.xm                     | PASS           | MilkyTracker           | Should sound identical.\nvibrato-slow.xm                | PASS           | OpenMPT                | Should sound identical.\nvibrato-octave.xm              | PASS           | FT2clone, OpenMPT      | Should sound identical.\n~~~\n\nThanks\n======\n\nThanks to:\n\n* Thunder \u003ckurttt@sfu.ca\u003e, for writing the `modfil10.txt` file;\n\n* Matti \"ccr\" Hamalainen \u003cccr@tnsp.org\u003e, for writing the `xm-form.txt`\n  file;\n\n* Mr.H of Triton and Guru and Alfred of Sahara Surfers, for writing\n  the specification of XM 1.04 files;\n\n* All the MilkyTracker contributors, for the [thorough\n  documentation](http://www.milkytracker.org/docs/manual/MilkyTracker.html#effects)\n  of effects;\n\n* Vladimir Kameñar, for writing `The Unofficial XM File Format Specification`;\n\n* All the people that helped on `#milkytracker` IRC;\n\n* All the\n  [libxm](https://github.com/Artefact2/libxm/graphs/contributors)\n  contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartefact2%2Flibxm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartefact2%2Flibxm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartefact2%2Flibxm/lists"}