Skip to content

a740g/Libxmp-64

Repository files navigation

LIBXMP-64

This is a QB64-PE compatible minimalistic & simplified library based on Libxmp. Libxmp is a library that renders module files to PCM data. It supports over 90 mainstream and obscure module formats including Protracker (MOD), Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT).

This is also loosely based on a similar library by RhoSigma.

Screenshot Screenshot Screenshot

FEATURES

  • Easy plug-&-play API optimized for demos & games
  • Works with the 64-bit QB64-PE complier (unlike RhoSigma's library that is 32-bit only)
  • Works on Windows, Linux & macOS
  • Demo player that shows how to use the library

API

FUNCTION XMP_LoadTuneFromFile%% (fileName AS STRING)
FUNCTION XMP_LoadTuneFromMemory%% (buffer AS STRING)
FUNCTION XMP_GetTuneName$
FUNCTION XMP_GetTuneType$
SUB XMP_Play
SUB XMP_Stop
SUB XMP_Replay
FUNCTION XMP_IsPlaying%%
SUB XMP_Pause (state AS _BYTE)
FUNCTION XMP_IsPaused%%
SUB XMP_Loop (state AS _BYTE)
FUNCTION XMP_IsLooping%%
SUB XMP_GoToNextPosition
SUB XMP_GoToPreviousPosition
SUB XMP_SetPosition (position AS LONG)
SUB XMP_SeekToTime (timeMs AS LONG)
SUB XMP_SetVolume (volume AS LONG)
FUNCTION XMP_GetVolume&
SUB XMP_Update

NOTES

  • This requires the latest version of QB64-PE
  • IT, XM, S3M & MOD support is built into QB64-PE. The miniaudio backend in OB64-PE uses Libxmp-lite. So, this is not technically not required
  • However, Libxmp-lite in QB64-PE does not support any other format other than IT, XM, S3M & MOD. Use this if you need to play those rare and obscure module formats