{"id":27068282,"url":"https://github.com/a740g/qb64-mod-player","last_synced_at":"2026-01-18T00:23:50.802Z","repository":{"id":39865228,"uuid":"488172930","full_name":"a740g/QB64-MOD-Player","owner":"a740g","description":"A MOD player \u0026 library for QB64-PE","archived":false,"fork":false,"pushed_at":"2025-03-25T11:02:42.000Z","size":263832,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T12:22:12.154Z","etag":null,"topics":["basic","basic-programming","fasttracker","module-music","music","music-library","music-player","protracker","qb64","qb64-pe","qbasic","qbasic-code","qbasic64","quickbasic","quickbasic64","retro","tracker-music"],"latest_commit_sha":null,"homepage":"https://qb64phoenix.com/forum/showthread.php?tid=1045","language":"QuickBASIC","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a740g.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2022-05-03T10:58:37.000Z","updated_at":"2025-03-25T11:02:47.000Z","dependencies_parsed_at":"2023-10-16T02:49:46.155Z","dependency_job_id":"de761e5f-381f-43b2-9daa-78fab02e4348","html_url":"https://github.com/a740g/QB64-MOD-Player","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a740g%2FQB64-MOD-Player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a740g%2FQB64-MOD-Player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a740g%2FQB64-MOD-Player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a740g%2FQB64-MOD-Player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a740g","download_url":"https://codeload.github.com/a740g/QB64-MOD-Player/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399895,"owners_count":20932876,"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":["basic","basic-programming","fasttracker","module-music","music","music-library","music-player","protracker","qb64","qb64-pe","qbasic","qbasic-code","qbasic64","quickbasic","quickbasic64","retro","tracker-music"],"created_at":"2025-04-05T20:36:57.627Z","updated_at":"2026-01-18T00:23:50.762Z","avatar_url":"https://github.com/a740g.png","language":"QuickBASIC","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QB64 MOD PLAYER\n\nThis is a [MOD](https://en.wikipedia.org/wiki/MOD_(file_format)) player and library written in [QB64-PE](https://www.qb64phoenix.com/).\n\nIt currently supports the following formats:\n\n- [ProTracker](https://en.wikipedia.org/wiki/ProTracker) (and compatible)\n- [MultiTracker](https://en.wikipedia.org/wiki/Module_file#Popular_formats)\n- [Scream Tracker](https://en.wikipedia.org/wiki/Scream_Tracker)\n\n---\n\n![Screenshot 1](screenshots/screenshot1.png)\n![Screenshot 2](screenshots/screenshot2.png)\n\n## FEATURES\n\n- No dependency on third party libraries\n- Everything is statically linked (no shared library dependency)\n- Easy plug-\u0026-play API optimized for demos \u0026 games\n- Cross-platform (works on Windows, Linux \u0026 macOS)\n- Support all MOD types (1 - 99 channels, 31 samples etc.)\n- Support all MOD effects\n- Demo player that shows how to use the library\n\n## USAGE\n\n- Clone the repository to a directory of your choice\n- Open Terminal and change to the directory using an appropriate OS command\n- Run `git submodule update --init --recursive` to initialize, fetch and checkout git submodules\n- Open *QB64MODPlayer.bas* in the QB64-PE IDE and press `F5` to compile and run\n- To use the library in your project add the [Toolbox64](https://github.com/a740g/Toolbox64) repository as a [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)\n\n## API\n\n```VB\n' Main Player API\nFUNCTION MODPlayer_GetName$\nFUNCTION MODPlayer_GetOrders~%\nFUNCTION MODPlayer_GetPosition\u0026\nFUNCTION MODPlayer_GetType$\nSUB MODPlayer_GoToNextPosition\nSUB MODPlayer_GoToPreviousPosition\nFUNCTION MODPlayer_IsLooping%%\nFUNCTION MODPlayer_IsPaused%%\nFUNCTION MODPlayer_IsPlaying%%\nFUNCTION MODPlayer_LoadFromDisk%% (fileName AS STRING)\nFUNCTION MODPlayer_LoadFromMemory%% (buffer AS STRING)\nSUB MODPlayer_Loop (state AS _BYTE)\nSUB MODPlayer_Pause (state AS _BYTE)\nSUB MODPlayer_Play\nSUB MODPlayer_SetPosition (position AS _UNSIGNED INTEGER)\nSUB MODPlayer_Stop\nSUB MODPlayer_Update (bufferTimeSecs AS SINGLE)\n' Sample Mixer API\nFUNCTION SoftSynth_BytesToFrames~\u0026 (bytes AS _UNSIGNED LONG, bytesPerSample AS _UNSIGNED _BYTE, channels AS _UNSIGNED _BYTE)\nSUB SoftSynth_Finalize\nFUNCTION SoftSynth_GetActiveVoices~\u0026\nFUNCTION SoftSynth_GetBufferedSoundTime#\nFUNCTION SoftSynth_GetGlobalVolume!\nFUNCTION SoftSynth_GetMasterVolume!\nFUNCTION SoftSynth_GetSampleRate~\u0026\nFUNCTION SoftSynth_GetTotalSounds~\u0026\nFUNCTION SoftSynth_GetTotalVoices~\u0026\nFUNCTION SoftSynth_GetVoiceBalance! (voice AS _UNSIGNED LONG)\nFUNCTION SoftSynth_GetVoiceFrequency~\u0026 (voice AS _UNSIGNED LONG)\nFUNCTION SoftSynth_GetVoiceVolume! (voice AS _UNSIGNED LONG)\nFUNCTION SoftSynth_Initialize%%\nFUNCTION SoftSynth_IsInitialized%%\nSUB SoftSynth_LoadSound (snd AS LONG, buffer AS STRING, bytesPerSample AS _UNSIGNED _BYTE, channels AS _UNSIGNED _BYTE)\nFUNCTION SoftSynth_PeekSoundFrameByte%% (snd AS LONG, position AS _UNSIGNED LONG)\nFUNCTION SoftSynth_PeekSoundFrameInteger% (snd AS LONG, position AS _UNSIGNED LONG)\nFUNCTION SoftSynth_PeekSoundFrameSingle! (snd AS LONG, position AS _UNSIGNED LONG)\nSUB SoftSynth_PlayVoice (voice AS _UNSIGNED LONG, snd AS LONG, position AS _UNSIGNED LONG, mode AS LONG, startFrame AS _UNSIGNED LONG, endFrame AS _UNSIGNED LONG)\nSUB SoftSynth_PokeSoundFrameByte (snd AS LONG, position AS _UNSIGNED LONG, frame AS _BYTE)\nSUB SoftSynth_PokeSoundFrameInteger (snd AS LONG, position AS _UNSIGNED LONG, frame AS INTEGER)\nSUB SoftSynth_PokeSoundFrameSingle (snd AS LONG, position AS _UNSIGNED LONG, frame AS SINGLE)\nSUB SoftSynth_SetGlobalVolume (volume AS SINGLE)\nSUB SoftSynth_SetMasterVolume (volume AS SINGLE)\nSUB SoftSynth_SetTotalVoices (voices AS _UNSIGNED LONG)\nSUB SoftSynth_SetVoiceBalance (voice AS _UNSIGNED LONG, balance AS SINGLE)\nSUB SoftSynth_SetVoiceFrequency (voice AS _UNSIGNED LONG, frequency AS _UNSIGNED LONG)\nSUB SoftSynth_SetVoiceVolume (voice AS _UNSIGNED LONG, volume AS SINGLE)\nSUB SoftSynth_StopVoice (voice AS _UNSIGNED LONG)\nSUB SoftSynth_Update (frames AS _UNSIGNED LONG)\n```\n\n## FAQ\n\nWhy a MOD player in QB64?\n\n- Just for learning and fun! Long answer: I have seen plenty of MOD players code and libraries in C \u0026 C++ but very little in other languages. I know about some JavaScript, Java and C# ones. But, I am not a fan of those languages. I learnt to code on DOS using QuickBASIC and then graduated to C \u0026 C++. So, QuickBASIC always had a special place in my heart. Then, I found QB64 on the internet and the rest is history. As far as I know this is the first of it's kind. Let me know if there are any other MOD players written in pure QB64.\n\nCan you implement feature x / y?\n\n- With the limited time I have between my day job, home and family, there is only so much I can do. I do maintain a list of TODO (see below). However, those do not have any set deadlines. If you need something implemented, submit a GitHub issue about it or do it yourself and submit a PR.\n\nI found a bug. How can I help?\n\n- Let me know using GitHub issues or fix it yourself and submit a PR!\n\nCan this be used in a game / demo?\n\n- Absolutely. The player UI code included in a great example.\n\nYou keep saying QB64-PE with miniaudio backend. Where is it?\n\n- Glad you asked! IT, XM, S3M \u0026 MOD support is built into [QB64-PE v3.1.0+](https://github.com/QB64-Phoenix-Edition/QB64pe/releases/).\n\nI see that the miniaudio backend version of QB64-PE already has MOD, S3M, XM, IT, RADv2 \u0026 MIDI support. Why should I care about this?\n\n- Honestly, you should not! The MOD re-player in QB64-PE with miniaudio backend uses [Libxmp-lite](https://github.com/libxmp/libxmp/tree/master/lite) and as such is good enough for most use cases. This is just something that I made just to see what can be done using just QB64-PE. If you want to see what MOD files are made of and what makes them tick, then by all means, have at it. There are some interesting things in the code for people who care about this kind of stuff. Also, my MOD re-player is more accurate than the one in Libxmp-lite... I hope. 😉\n\n## NOTES\n\n- This requires the latest version of [QB64-PE](https://github.com/QB64-Phoenix-Edition/QB64pe/releases)\n- When you clone a repository that contains submodules, the submodules are not automatically cloned by default\n- You will need to use the `git submodule update --init --recursive` to initialize, fetch and checkout git submodules\n\n## BIBLIOGRAPHY\n\n- [MOD Player Tutorial](docs/FMODDOC.TXT) by *FireLight*\n- [S3M Player Tutorial](docs/FS3MDOC.TXT) by *FireLight*\n- [Noisetracker/Soundtracker/Protracker Module Format](docs/MOD-FORM.TXT) by *Andrew Scott*\n- [MODFIL10.TXT](docs/MODFIL10.TXT) by *Thunder*\n- [Protracker Module](https://wiki.multimedia.cx/index.php/Protracker_Module) from *MultimediaWiki*\n- [Scream Tracker 3 Module](https://wiki.multimedia.cx/index.php/Scream_Tracker_3_Module) from *MultimediaWiki*\n- [S3M Format](https://moddingwiki.shikadi.net/wiki/S3M_Format) by *ModdingWiki*\n- [Scream Tracker 3 module](http://fileformats.archiveteam.org/wiki/Scream_Tracker_3_module) from *Solve the File Format Problem*\n- [MultiTracker Module (MTM) Format](docs/MultiTracker%20(.mtm).txt) by *Renaissance*\n- [Manual: Effect Reference](https://wiki.openmpt.org/Manual:_Effect_Reference) from *OpenMPT Wiki*\n- [Weasel audio library](https://weaselaudiolib.sourceforge.net/) by Warren Willmey\n- [Digital Audio Mixing Techniques](docs/FSBDOC.TXT) by *jedi / oxygen*\n- [Writing Mixing Routines](docs/MIXING10.TXT) by *BYTERAVER/TNT*\n- [Audio Mixer Tutorial](docs/mixer_tutorial) by *benhenshaw*\n\n## ASSETS\n\n- [Icon](https://iconarchive.com/artist/tsukasa-tux.html) by *Tsukasa-Tux (Azrael Jackie Lockheart)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa740g%2Fqb64-mod-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa740g%2Fqb64-mod-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa740g%2Fqb64-mod-player/lists"}