QB64 Phoenix Edition
External Module Player (libxmp) support - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Expanding Horizons (Libraries) (https://staging.qb64phoenix.com/forumdisplay.php?fid=21)
+---- Forum: RhoSigma (https://staging.qb64phoenix.com/forumdisplay.php?fid=23)
+---- Thread: External Module Player (libxmp) support (/showthread.php?tid=29)



External Module Player (libxmp) support - RhoSigma - 04-18-2022

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)

After almost 5 years, libxmp got lots of fixes plus a couple new features and finally version 4.5.0 was released. This was a good occasion for me to complete my wrapper library for it and to improve my demo player to showcase some of the libxmp functions and give a hint how to correctly use the wrapper library.

When porting the informations over into libxmp.bi/.bm and testing it, I found several badly described things and tried to correct/improve those with my own findings from examining the libxmp sources.

The XmpPlayer.bas file will espacially show the use of the various wrapper or helper functions in libxmp.bm, which are used to retrieve informations from the internal libxmp structures.

The player itself is almost self explanatory at runtime and programmed as an endless loop, so simply hit the X button of the player window to quit it at any time. It is able to show various informations about the current module and also features a wave oscillator and frequency spectrum (FFT) display, the latter thanks to Vince's Fast Fourier algorithms.

.7z   xmpDemo.7z (Size: 2.53 MB / Downloads: 45) --- (Dec/22)(Libxmp wrapper library & demo player)

Note that this program requires the 32-bit version of QB64, as libxmp is currently available as 32-bit version only, this will hopefully change in the future. So here it is, just move the extracted xmpDemo folder with its entire contents into your QB64 installation folder, then open the QB64 IDE, untick the Save EXE in source folder option (if active (in Run Menu)), load XmpPlayer.bas from the xmpDemo folder, hit F5 and enjoy the music.