Suggestion: BASS OpenMPT and LibXMP add-ons.

Started by SlackerNReckless, 4 Mar '25 - 16:05

SlackerNReckless

Hi!  :)

Well, OpenMPT supports more module formats than standard BASS and their library is easily found here: https://lib.openmpt.org/libopenmpt/

Or XMP (Extended Module Player) https://xmp.sourceforge.net/

Just a suggestion for the developers build two nice BASS add-ons like BASSZXTUNE for example that supports a lot of chiptune/module formats.

Even XMplay has add-ons for OpenMPT and LibXMP.

Okay, See ya!  ;)

QuentinC

Hello,

I have myself aready made an OpenMPT plugin for BASS, as part of my own audio player project
http://github.com/qtnc/sample
You can check it out under src/bassopenmpt/. I have also written a few other plugins for reading other chiptunes or mods formats you might also be interested in.

Although OpenMPT supports more formats than BASS, it's maybe still interesting to try BASS_Music_Load first, as BASS has more effects and options for formats it supports. It is also reputed to be nearer from what modules originally sounded at the time. So my plugin first tries BASS_Music_Load first before trying to open with OpenMPT.

It might be interesting to also make a plugin for libxmp, but first I would like to know which formats this library supports, in order to know if it can be worth it, or if it brings nothing because everything is already covered. I haven't found the list of supported formats by looking quickly at the website. Do you have any information ?

SlackerNReckless

#2
Man... Thanks for replying me.

I'll look your code and maybe I will create a bassopenmpt.dll but I will remove the BASS_MusicLoad as I want it to be totally OpenMPT.

Actually I developed a player using OpenMPT library and BASS, using BASS_StreamCreate and BASS_StreamPutData functions and I developed another one using LibXMP library.

You know, feeding the data using the functions: openmpt_module_read_interleaved_stereo (https://lib.openmpt.org/doc/group__libopenmpt__c.html#gac8331183f8a0a453f0fbdc4791fd79cb)

and xmp_play_buffer (https://xmp.sourceforge.net/libxmp.html#int-xmp-play-buffer-xmp-context-c-void-buffer-int-size-int-loop)

They are fine.

But I expect someday the UN4SEEN developers develop two BASS add-ons, called bassopenmpt and basslibxmp like the UN4Seen developers did with XMplay with OpenMPT and LibXMP add-ons

And I expect they release Delphi/Pascal headers along with the library. Yeah... I know C/C++ but I'm not an actual C/C++ programmer. I'm primarily a Delphi/Pascal and even Lazarus/Freepascal programmer. Of course I know how to translate C/C++ to Pascal code or otherwise I wouldn't developed the players above as it was needed to translate some C/C++ heaaders (*.h files).

Okay! See ya! ;-)

SlackerNReckless

Quote from: QuentinC on  5 Mar '25 - 06:08It might be interesting to also make a plugin for libxmp, but first I would like to know which formats this library supports, in order to know if it can be worth it, or if it brings nothing because everything is already covered. I haven't found the list of supported formats by looking quickly at the website. Do you have any information ?

I  forgot to reply you. It's found in file docs/formats.txt in the file libxmp-4.6.2.tar.gz found here: https://sourceforge.net/projects/xmp/files/libxmp/4.6.2/ :)

SlackerNReckless

Hey, Mr. QuentinC.

I went to your GitHub, I download the code there and I even downloaded the "6player" too. Nice player you developed. ;D

Can you build a 32-bit DLL of 'bassopenmpt' featuring only OpenMPT and not loading BASS_MusicLoad for me?

With the functions BASS_OpenMPT_StreamCreateFile, BASS_OpenMPT_StreamCreateURL and BASS_OpenMPT_StreamCreateFileUser I found there not loading any BASS_MusicLoad function. A pure BASS OpenMPT add-on only loading OpenMPT functions.

And I think you could the same with LibXMP developing a 32-bit DLL too. Go to XMP website, they have their API documented there. https://xmp.sourceforge.net/libxmp.html.

I don't want 64-bit DLL's as I think even BASS, the standard bass.dll doesn't support them. Don't forget to release their source, if possible MingW32 with some nice Makefiles or 'configure' scripts. But any free C/C++ compiler is cool too.

And after you build these BASS add-ons, please send me a private message warning me about them. Of course, when you have time, in your time. Thanks! ;)

QuentinC

Hello,

QuoteI went to your GitHub, I download the code there and I even downloaded the "6player" too. Nice player you developed. ;D

Thank you  very much!

QuoteCan you build a 32-bit DLL of 'bassopenmpt' featuring only OpenMPT and not loading BASS_MusicLoad for me?

Usually, community forums like this one are there to help eachother doing their work, but not to do work at their place. So I can help you doing it, but certainly not do it entirely at your place.

If you want to use OpenMPT only and don't want to try BASS module support first, in fact it's very simple. You just have to turn the setting to FALSE, recompile, and voilĂ :
static BOOL tryMusicFirst = TRUE;
Maybe for a future version I could make a config option, so you could enable and disable it as desired at run time by calling BASS_SetConfig.


QuoteI don't want 64-bit DLL's as I think even BASS, the standard bass.dll doesn't support them.

YEs, BASS does support 64 bits.
It's maybe a little unclear, but when you click to download the Windows/Win32 version, you can find both 32 and 64 bits DLL and link libraries in the archives.

Nowadays, 32 bits only Windows are getting rare. AS far as I know, all Windows 10 or 11 are always 64 bits. So unless you have a particular reason, it shouldn't be no longer necessary to build 32 bits Windows versions.
At present I'm not sure that the latest BASS version is still working on Windows 7 or earlier, anyway...

QuoteAnd I think you could the same with LibXMP

I could, yes, it seems quite straightforward, but looking at the list of supported formats, I don't have the impression that there's anything not yet covered by BASS itself or other plugins I already have (OpenMPT among others).

However, I may be wrong. There are a lot of tiny variations with old music and module formats, so you can easily miss something. If you find a file supported by libxmp but unsupported by BASS, OpenMPT or another addon, tell me and post that file somewhere.
I'm  always happy to extend support to new formats, but it's quite useless to support a new lib if it doesn't cover anything new.

QuoteDon't forget to release their source, if possible MingW32 with some nice Makefiles or 'configure' scripts. But any free C/C++ compiler is cool too.

I'm indeed using MinGW-W64, which is the successor of MinGW32.
However, the OpenMPT addon is only a single .c file, so you don't really need a makefile, and even less any complicated configuration stuff.
Although I'm using MinGW-W64, I'm a Windows guy, not a Linux guy. I don't understand most of the crazyness they have with all their configure scripts.

IF you want, you can extract the relevant part of the makefile of my player project:

BASS_OPENMPT_SRCS=$(wildcard src/bassopenmpt/*.c)

bassopenmpt.dll: $(BASS_OPENMPT_SRCS)
$(GCC) -w -s -O3 $^ -shared -o $@ -Wl,--add-stdcall-alias -L. -lbass -lopenmpt

Don't hesitate to ask if you have another question.

SlackerNReckless

Quote from: QuentinC on  9 Mar '25 - 09:54Thank you  very much!

You're welcome!  ;)

Quote from: QuentinC on  9 Mar '25 - 09:54If you want to use OpenMPT only and don't want to try BASS module support first, in fact it's very simple. You just have to turn the setting to FALSE, recompile, and voilĂ :
static BOOL tryMusicFirst = TRUE;
Maybe for a future version I could make a config option, so you could enable and disable it as desired at run time by calling BASS_SetConfig.

Yeah... I noticed this setting but actually I changed the file. I totally removed the BASS_MusicLoad section and even this variable. It was simple and easy. I know C/C++, I just don't program in C/C++ like I said. I'm primarily a Pascal programmer.
 
Quote from: QuentinC on  9 Mar '25 - 09:54YEs, BASS does support 64 bits.
It's maybe a little unclear, but when you click to download the Windows/Win32 version, you can find both 32 and 64 bits DLL and link libraries in the archives.

Nowadays, 32 bits only Windows are getting rare. AS far as I know, all Windows 10 or 11 are always 64 bits. So unless you have a particular reason, it shouldn't be no longer necessary to build 32 bits Windows versions.
At present I'm not sure that the latest BASS version is still working on Windows 7 or earlier, anyway...

Ok, it's because I still run older software and older versions of Windows. And as far I know BASS runs even on Windows 98, but it needs the last DirectX version 9.0c dated of Jun/2010.

Quote from: QuentinC on  9 Mar '25 - 09:54I could, yes, it seems quite straightforward, but looking at the list of supported formats, I don't have the impression that there's anything not yet covered by BASS itself or other plugins I already have (OpenMPT among others).

However, I may be wrong. There are a lot of tiny variations with old music and module formats, so you can easily miss something. If you find a file supported by libxmp but unsupported by BASS, OpenMPT or another addon, tell me and post that file somewhere.
I'm  always happy to extend support to new formats, but it's quite useless to support a new lib if it doesn't cover anything new.

Well, there are differences. The song sounds differently in OpenMPT and LibXMP. Some effects are supported, some not. This, of course depends of the library and mainly the module. I prefer BASS but sometimes I like the way the module sounds different using another player (actually library). If you ask me, I prefer OpenMPT sometimes.

Quote from: QuentinC on  9 Mar '25 - 09:54I'm indeed using MinGW-W64, which is the successor of MinGW32.
However, the OpenMPT addon is only a single .c file, so you don't really need a makefile, and even less any complicated configuration stuff.
Although I'm using MinGW-W64, I'm a Windows guy, not a Linux guy. I don't understand most of the crazyness they have with all their configure scripts.

lol  :P Yeah... I'm more a Windows guy but my second operating system is Slackware Linux. I'm a slacker! Hence my nick Slacker N' Reckless!  ;D

Well, I got this file, I created a nice Makefile and I compiled it successfully on MingW32. :-)

Quote from: QuentinC on  9 Mar '25 - 09:54IF you want, you can extract the relevant part of the makefile of my player project:

BASS_OPENMPT_SRCS=$(wildcard src/bassopenmpt/*.c)

bassopenmpt.dll: $(BASS_OPENMPT_SRCS)
$(GCC) -w -s -O3 $^ -shared -o $@ -Wl,--add-stdcall-alias -L. -lbass -lopenmpt

Thanks, I didn't notice this.

Quote from: QuentinC on  9 Mar '25 - 09:54Don't hesitate to ask if you have another question.

Well, I don't have another question, but I created the bass_hvl add-on too, using the code I found in your github. Thanks for it too!  :)

Well, I have some AHX/HVL files. There are the WinAHX and Hively Tracker programs that can play these files. XMPlay can play them with xmp-ahx add-on, ZXTUNE (a chiptune/module player), the BASS ZXTUNE add-on. And actually I had developed another player using BASS ZXTUNE.

By the way, I noticed your 6player uses libarchive to handle archive formats. My player uses the 7z.dll. 7-zip handles more archive formats than libarchive. Just a suggestion for you.

Thanks man. You were very helpful! See ya!  ;)