Jump to content
Sign in to follow this  
trancexx

XM Player

Recommended Posts

trancexx

It's what the title says, module file player. To be more specific those with .xm extension (Fast Tracker).

You don't need any external file for the player, it's capable of doing everything on its own. Special technique of dll subrogation is used to load embedded dll. Go thru code to see what I mean if you are inerested. It's kinda advanced. Very similar to "running dll from memory". It's also experimental so there could be bugs.

I included some xm files in the archive. I find one of those the best XM ever written. I won't tell which though.

XM Player.zip

Btw, available functions for embedded dll are:

  • LoadFromFile
  • LoadFromResource (this one is cool)
  • Play
  • Stop
  • GetTime
  • GetOrder
  • GetRow
  • Free

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Melba23

trancexx,

That is an amazing script. I am constantly astounded at what "serious" coders can do with AutoIt. I can follow what you are doing just well enough to realise how clever it is. :D

A question, if I may? Is there a restriction on the DLL you can embed? I ask because I have been playing about over the past few days here working out how to read menus added to external applications with the _GUICtrlMenu UDF. As you can see, it requires the use of an external DLL to link the messages from the external app into the AutoIt script. I played about with the "embedded" part of your script using a binary image of the Hook DLL referred to in that topic, but I got Error 3 - it seems I am not "magic" like you or Mark Zbikowski! Could you offer any pointers as to where I might be going wrong - in language I might begin to understand, please! It would be much neater to be able to read these external menus without recall to a separate DLL.

Thanks in advance for any hints.

M23

P.S. Speaking of "hidden" initials, another example is the original PKArc and PKZip compression software - named after its creator, the late Phil Katz. Although most here are probably too yooung to remember it!


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
UEZ

Impressive code demonstration again (applause)!

I tried similar idea but failed Posted Image

UEZ

PS: nice tunes in the archive!


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
trancexx

trancexx,

That is an amazing script. I am constantly astounded at what "serious" coders can do with AutoIt. I can follow what you are doing just well enough to realise how clever it is. :D

A question, if I may? Is there a restriction on the DLL you can embed? I ask because I have been playing about over the past few days here working out how to read menus added to external applications with the _GUICtrlMenu UDF. As you can see, it requires the use of an external DLL to link the messages from the external app into the AutoIt script. I played about with the "embedded" part of your script using a binary image of the Hook DLL referred to in that topic, but I got Error 3 - it seems I am not "magic" like you or Mark Zbikowski! Could you offer any pointers as to where I might be going wrong - in language I might begin to understand, please! It would be much neater to be able to read these external menus without recall to a separate DLL.

Thanks in advance for any hints.

M23

P.S. Speaking of "hidden" initials, another example is the original PKArc and PKZip compression software - named after its creator, the late Phil Katz. Although most here are probably too yooung to remember it!

There could be problems with compressed dlls (I didn't test but UEZ obviously did).

I guess I could write the function to be more wide, universal maybe, so it could be tested properly. I see no bigger problems for that.

@UEZ, thanks. I guessed you would like the script since includes at least three things you... generally like.

The problem with that dll is compressor used on it.

Anyways, nice that you liked the choice of music too.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
UEZ

...

Anyways, nice that you liked the choice of music too.

My 1st computer was a C64 and I loved it with all the chip tunes...

UEZ

PS: 5*+1

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
monoceres

Aaah, goona keep that code around. Never know when you want to load dll like that.

A bit dissapointed that I didn't found another xm in the resource section though :D

Also,

213 KB with so much music is pretty amazing.

I even found it nice to listen to. Something I rarely do with this kind of stuff.

Do I really need to say 5 stars?


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
UEZ

Here a full memory read example (dll and chip tune completely read from the memory)

Download: click me (source code + compiled exe) or source code only (not running as x64 only x32!)

Sorry, source code is too long to post and my attachment buffer is nearly full!

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
trancexx

Here a full memory read example (dll and chip tune completely read from the memory)

Download: click me

Sorry, source code is too long to post and my attachment buffer is nearly full!

UEZ

So, you finally found suitable dll for MemoryDll. Cool!

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
UEZ

There could be problems with compressed dlls (I didn't test but UEZ obviously did).

I guess I could write the function to be more wide, universal maybe, so it could be tested properly. I see no bigger problems for that.

@UEZ, thanks. I guessed you would like the script since includes at least three things you... generally like.

The problem with that dll is compressor used on it.

Anyways, nice that you liked the choice of music too.

Yes you're right! It is compressed with PEtite and I didn't found a way to unpack it. All unpackers can be found in the underground :huggles:. I tested some but it is not working :. Maybe someone knows a way...

So, you finally found suitable dll for MemoryDll. Cool!

Yes, with FMOD.Dll it is possible to play chip sound from memory. After reading the help file I added the LoadSongEx() function which can play sound from memory using a modified FMOD.au3 (incl. MemoryDll.au3)!

Maybe I can use Subrogation to load from memory :D

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
trancexx

Maybe I can use Subrogation to load from memory :D

UEZ

Wait till I fix it. There are at least two mistakes I've made with the code. :huggles:

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
this-is-me

trancexx, I realize this is a very old topic, but do you think you could update or make a new version of this using the much smaller ufmod dll?
http://sourceforge.net/projects/ufmod/

I am sorry, to ask, since if I could convert it, I would. However, I lack the skills to understand how to do this.

EDIT: To be more complete with what I am asking, I am trying to play an XM from memory. I believe ufmod can do this. Here's the XM file I want to play from memory:

Wave_-_1999.7z

Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites
wakillon

Take a look to this >UEZ post where he talk to use bassmod.dll for play xm file from memory.

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
this-is-me

Thanks, wakillon. Unfortunately, I just realized that there is no support for 64-bit code in ufmod, which is what I wanted to use. I am making a 64-bit app to interact with 64-bit explorer dialogs. Unfortunately, that means that even UEZ's nicely formatted code won't work for me. I would have to load the 64-bit bass dll, which is much larger, at 219kb. Oh well, back to the drawing board. Thanks again.


Who else would I be?

Share this post


Link to post
Share on other sites
wakillon

May be i'm wrong but BassMod.dll do not exist in x64 version.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
this-is-me

Which is why I specified the Bass dll, not BassMod.


Who else would I be?

Share this post


Link to post
Share on other sites
UEZ

@this-is-me: try this: Play XM Song from memory using Bass_x64.DLL.zip (song length ~ 7 minutes). 
 
Br,
UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
this-is-me

Thanks, UEZ. That works great.


Who else would I be?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.