Author Topic: Extended Module Player Library (libXMP) plugin for XMPlay  (Read 16987 times)

bauxite69

  • Posts: 44
Hi everyone !


First try, first plugin  ;D

I've decided to create a native plugin for XMPlay (the best module player in the world  8)).
This plugin supports the Extended Module Player Library (libXMP) from http://xmp.sourceforge.net written by Claudio Matsuoka, Hipolito Carraro Jr and Mirko Buffoni.

Link to latest version of xmp-libXMP.dll, libxmp.dll, in_xmp.dll and xmp.exe

Changelog : See xmp-libxmp.txt

« Last Edit: 1 Jul '15 - 20:59 by bauxite69 »

Ian @ un4seen

  • Administrator
  • Posts: 20210
Moar plugins! :)

@Ian: How can i tell to XMPlay to restart a song or set position ? I tried with XMPFUNC_MISC->DDE but with no luck.  Maybe i used the wrong syntax. ? 

Do you mean when looping? If so, you signify the end by delivering less data than requested in your Process function, and then XMPlay will call your SetPosition function to go back to the start. If you include XMPIN_FLAG_LOOP in the plugin's flags, then the XMPIN_POS_LOOP or XMPIN_POS_AUTOLOOP value will be used in the SetPosition function to request looping or auto-looping. In the auto-looping case, the function should only loop when a loop has been detected, and otherwise return -1. If the time of the loop start position is known, that should be returned, otherwise -2 can be returned to let the time run on.

saga

  • Posts: 2152
Yay for more plugins indeed. :) Maybe you should call it xmp-xmp! ;D

manx

  • Posts: 17

Seeing the looping API being discussed here: xmp-openmpt appears to have requirements that the current xmplay plugin API can not support.
I'm not sure if this also applies to libxmp as well, so I decided to not hijeck this thread and use the xmp-openmpt thread instead. See
http://www.un4seen.com/forum/?topic=15448.msg112431#msg112431.

bauxite69

  • Posts: 44
Moar plugins! :)

Do you mean when looping? If so, you signify the end by delivering less data than requested in your Process function, and then XMPlay will call your SetPosition function to go back to the start. If you include XMPIN_FLAG_LOOP in the plugin's flags, then the XMPIN_POS_LOOP or XMPIN_POS_AUTOLOOP value will be used in the SetPosition function to request looping or auto-looping. In the auto-looping case, the function should only loop when a loop has been detected, and otherwise return -1. If the time of the loop start position is known, that should be returned, otherwise -2 can be returned to let the time run on.

yep was for looping

Thanks !


But how can i use DDE ? For example : 297 MOD - Interpolation

Ian @ un4seen

  • Administrator
  • Posts: 20210
Are you trying to query XMPlay's MOD interpolation setting? If so, I'm afraid that isn't possible via DDE. If your plugin has interpolation settings, it could provide its own config options for that (via its Config function), which it can store in its own XMPLAY.INI section (via the XMPFUNC_REGISTRY functions). A little demonstration of implementing config options can be found in the FLANGE example included in the plugin SDK.

bauxite69

  • Posts: 44
Are you trying to query XMPlay's MOD interpolation setting? If so, I'm afraid that isn't possible via DDE. If your plugin has interpolation settings, it could provide its own config options for that (via its Config function), which it can store in its own XMPLAY.INI section (via the XMPFUNC_REGISTRY functions). A little demonstration of implementing config options can be found in the FLANGE example included in the plugin SDK.

Everything works fine with the plugin, interpolation and the setting in XMPLAY.INI.

I'm just curious how i can send DDE command through the plugin ?

Ian @ un4seen

  • Administrator
  • Posts: 20210
OK. You need to prefix the command number with "key" when passing it to the DDE function. For example...

Code: [Select]
xmpfmisc->DDE("key297"); // "MOD - Interpolation" command

Note the command numbers are shortcut IDs, so plugin shortcuts/commands can also be accessed this way.

bauxite69

  • Posts: 44
OK. You need to prefix the command number with "key" when passing it to the DDE function. For example...

Code: [Select]
xmpfmisc->DDE("key297"); // "MOD - Interpolation" command

Note the command numbers are shortcut IDs, so plugin shortcuts/commands can also be accessed this way.

Thank you

saga

  • Posts: 2152
Meh... if possible, you should disable support for Adlib formats. xmp's Adlib format support seems to be pretty bad, judging on a few HSC tunes it decided to play. There are already better plugins to handle Adlib formats such as in_adplug.

bauxite69

  • Posts: 44
Meh... if possible, you should disable support for Adlib formats. xmp's Adlib format support seems to be pretty bad, judging on a few HSC tunes it decided to play. There are already better plugins to handle Adlib formats such as in_adplug.

Done.

xmp-libxmp v0.3 changes :

Adlib Formats AMD, HSC and RAD disabled.

Update to LIBXMP 4.3.1

saga

  • Posts: 2152
Thanks a lot!
Are you going to release the source of your plugin sometime?

deus-ex

  • Posts: 235
Hi bauxite69,

nice one, congratulations on your first plugin.  :)

Are you going to add an dialog allowing to en-/disable each of the supported formats separately? Because Xmp-LibXMP is in competition with the plugin Xmp-OpenMPT by saga as both plugins cover a quite similar set of module formats. Currently your plugin grabs every format it supports for playback, disregarding any other installed input plugin.

Btw, I added a little documentation to the distribution of your plugin. I hope it finds your approval: Xmp-LibXMP (eXtended Module Player) v0.3


@Ian:
I think this plugin is a worthy candidate to be added to the XMPlay plugins section.

bauxite69

  • Posts: 44
Hi bauxite69,

nice one, congratulations on your first plugin.  :)

Are you going to add an dialog allowing to en-/disable each of the supported formats separately? Because Xmp-LibXMP is in competition with the plugin Xmp-OpenMPT by saga as both plugins cover a quite similar set of module formats. Currently your plugin grabs every format it supports for playback, disregarding any other installed input plugin.

Btw, I added a little documentation to the distribution of your plugin. I hope it finds your approval: Xmp-LibXMP (eXtended Module Player) v0.3


No problem with the documention, go ahead !

I'll add the updated documentation to the next release.

I'll try to add a dialog to en-/disable each of the supported formats...

Do you need in_xmp.dll and libxmp.dll updated to LIBXMP 4.3.1 (now run on Windows XP) ?


deus-ex

  • Posts: 235
I'll try to add a dialog to en-/disable each of the supported formats...

That's nice to hear. In case you run in any obstacles I'm sure you have at least two very competent programmers following this thread who are surely willing to lend a helping hand (or a snippet of source code example).  :)


Do you need in_xmp.dll and libxmp.dll updated to LIBXMP 4.3.1 (now run on Windows XP) ?

I wasn't going to bother you about this after you released a native XMPlay plugin version. Then again there are sure a lot of Winamp die-hards out there, so if it's not to much to ask for I'd be more than happy to upload an update of the Winamp edition of your plugin.

EDIT: grammar
« Last Edit: 17 Nov '14 - 16:27 by deus-ex »

bauxite69

  • Posts: 44

I wasn't going to bother about this you after you released a native XMPlay plugin version. Then again there are sure a lot of Winamp die-hards out there, so if it's not to much to ask for I'd be more than happy to upload an update of the Winamp edition of your plugin.

in_xmp and libxmp 4.3.1


deus-ex

  • Posts: 235
Thanks, the updated plugin is online now.

Say, you wouldn't happen to have an update of xmp.exe as well? You used to provide it together with the Winamp plugin, and I used to make it available as an alternative download. Latest version online is v4.0.8. ::)

bauxite69

  • Posts: 44
Thanks, the updated plugin is online now.

Say, you wouldn't happen to have an update of xmp.exe as well? You used to provide it together with the Winamp plugin, and I used to make it available as an alternative download. Latest version online is v4.0.8. ::)

xmp.exe 4.0.9

deus-ex

  • Posts: 235
Terrific! Thank you. :)

bauxite69

  • Posts: 44
I'll try to add a dialog to en-/disable each of the supported formats...

That's nice to hear. In case you run in any obstacles I'm sure you have at least two very competent programmers following this thread who are surely willing to lend a helping hand (or a snippet of source code example).  :)


I managed to add a dialog and now you can en-/disable each of the supported formats.

v0.4, 2014-11-17
  Re-enabled Adlib formats .AMD, .HSC and .RAD
  Added dialog in plugin configuration to en-/disable each of the supported formats


bauxite69

  • Posts: 44

v0.7, 2014-11-24
  Added support for subsongs


@Ian: xmp-libxmp works fine with subsongs so far, but i need your help. I can't figure out how to build subsongs tags. Do i need to create a new array ? I've tried a few ideas, but this leads to a crash. Meanwhile, GetFileInfo will receive XMPIN_INFO_NOSUBTAGS.


 

Ian @ un4seen

  • Administrator
  • Posts: 20210
The tags should be delivered as a series of null-terminated strings containing tag names and values, ending with a double-null. The GetTags function should only give the tags of the current subsong. GetFileInfo gives the tags for all subsongs, and when when not using the XMPIN_INFO_NOSUBTAGS option, each subsong's tag block should follow the other. For example, the tags for 2 subsongs could look like this: "FileType\0type\0Title\0title1\0\0FileType\0type\0Title\0title2\0\0" (where "\0" = null). The memory for the tag block should be allocated with the XMPFUNC_MISC Alloc/ReAlloc functions.

bauxite69

  • Posts: 44
The tags should be delivered as a series of null-terminated strings containing tag names and values, ending with a double-null. The GetTags function should only give the tags of the current subsong. GetFileInfo gives the tags for all subsongs, and when when not using the XMPIN_INFO_NOSUBTAGS option, each subsong's tag block should follow the other. For example, the tags for 2 subsongs could look like this: "FileType\0type\0Title\0title1\0\0FileType\0type\0Title\0title2\0\0" (where "\0" = null). The memory for the tag block should be allocated with the XMPFUNC_MISC Alloc/ReAlloc functions.

Thanks !

Now we have xmp-libxmp fully supporting subsongs. :)

bauxite69

  • Posts: 44
Thanks a lot!
Are you going to release the source of your plugin sometime?

In the next release, i'll include the sources.

bauxite69

  • Posts: 44
Thanks, the updated plugin is online now.

Say, you wouldn't happen to have an update of xmp.exe as well? You used to provide it together with the Winamp plugin, and I used to make it available as an alternative download. Latest version online is v4.0.8. ::)

in.xmp.dll 4.0.0
libxmp.dll 4.3.2
xmp.exe 4.0.10

From now on, in_xmp.dll will display the version of libxmp.dll loaded.


deus-ex

  • Posts: 235
Hi bauxite69,

thanks for providing the updated binaries.

bauxite69

  • Posts: 44

v0.8.13, 2015-03-24
  updated to LibXMP v4.3.6


deus-ex

  • Posts: 235
Hi bauxite69,

binaries please, or it didn't happen. ;D

Dhry

  • Posts: 64
See first post in this thread for the permanent link to a folder containing the binaries.

deus-ex

  • Posts: 235
Ah, right. Thanks for the hint, dhry.

guest

  • Guest
X-Tracker (DMF) modules aren't played.

saga

  • Posts: 2152
That's no surprise, given that the incomplete DMF loader was removed well over a year ago. You can try xmp-openmpt though, which has pretty good DMF support.

bauxite69

  • Posts: 44

v0.8.14, 2015-03-31
  updated to LibXMP v4.3.7


deus-ex

  • Posts: 235
Rock 'n roll, baby! ;D

bauxite69

  • Posts: 44

v0.8.15, 2015-04-04
  updated to LibXMP v4.3.8




Stefan1200

  • Posts: 5
Thank you very much for keep updating this library, everything is working fine. :)

bauxite69

  • Posts: 44

v0.8.16, 2015-06-26
  updated to LibXMP v4.3.9



bauxite69

  • Posts: 44

v0.9.17, 2015-09-12
  fixed: xmp-libXMP did not open/play files from archive


bauxite69

  • Posts: 44
v0.9.18, 2016-01-01
  updated to LibXMP v4.3.10



deus-ex

  • Posts: 235
Hi bauxite69,

just in time, thank you.
Happy New Year everyone.

saga

  • Posts: 2152
Having this new version present in the list of XMPlay plugins seems to freeze XMPlay whenever I want to play a mod file, even if XMPlay would handle it by itself. Interestingly, it does not happen when I explicitely tell XMPlay to use this plugin for its internally supported file types. Weird...?

Edit: Deleted plugin, reinstalled it, works properly again. Might have been a Double Commander issue when extracting the files...
« Last Edit: 4 Jan '16 - 19:59 by saga »

bauxite69

  • Posts: 44

v0.9.19, 2016-02-14
  updated to LibXMP v4.3.11

bauxite69

  • Posts: 44

v0.9.20, 2016-03-06
  updated to LibXMP v4.3.12


deus-ex

  • Posts: 235
Thank you for the continuous flow of updated XMP binaries. Can you also provide an update of XMP.exe (v4.0.11), please?

Just to make sure: The Winamp plugin file in_XMP.dll doesn't require any update? It is suffice to replace LibXMP.dll with the most recent version, right?
« Last Edit: 7 Mar '16 - 08:38 by deus-ex »

bauxite69

  • Posts: 44
Thank you for the continuous flow of updated XMP binaries. Can you also provide an update of XMP.exe (v4.0.11), please?

I completely missed the new xmp version !!! :o
Now you can find the new updated version (4.0.11)


Just to make sure: The Winamp plugin file in_XMP.dll doesn't require any update? It is suffice to replace LibXMP.dll with the most recent version, right?

You're right, in_xmp.dll doesn't need any update, only replace libxmp.dll with the most recent version.

bauxite69

  • Posts: 44

v0.9.21, 2016-04-23
  updated to LibXMP v4.3.13



bauxite69

  • Posts: 44
v1.0.22, 2016-07-19
  updated to libXMP v4.4.0
  added player mode/mixer info to XMPlay's general info screen
  new configuration & about dialog


deus-ex

  • Posts: 235
Thank you. :)

bauxite69

  • Posts: 44

v1.0.23, 2016-10-20
  updated to LibXMP v4.4.1

Stefan1200

  • Posts: 5
Thanks for updating this plugin. :)