PDA

View Full Version : S3M or MOD Pascal/Delphi player library with source code (no DLL/SO!)?



paul_nicholls
08-01-2012, 11:19 PM
Hi all,
I was wondering if anyone here knows of any source code that can play MOD/S3M audio tracker files using Pascal/Delphi code, preferably with no external DLL/SO dependencies?

I have found this project:
http://sourceforge.net/projects/openmodpas/

But it is barely begun and doesn't do much of anything yet...

I want to add in the loading and playing of MOD in to my game to reduce the file size and give me more song options :)

Maybe I could make up something myself, but I was hoping to not re-invent the wheel :D

cheers,
Paul

WILL
08-01-2012, 11:46 PM
That sourceforge project looks familiar. :)

I had started that little project some time ago. I believe I had some trouble with decoding IT samples and the other developer helping lost interest which brought it to a grinding halt. I don't believe a project that is source only exists, not for Pascal. But you could start one if you were so inclined. I could dig up some of my old sources for the player I started. It was able to load older S3M and MOD files and play back the samples from a list. It's an old Delphi project, but I'd have to find it.

paul_nicholls
09-01-2012, 12:13 AM
That sourceforge project looks familiar. :)

I had started that little project some time ago. I believe I had some trouble with decoding IT samples and the other developer helping lost interest which brought it to a grinding halt. I don't believe a project that is source only exists, not for Pascal. But you could start one if you were so inclined. I could dig up some of my old sources for the player I started. It was able to load older S3M and MOD files and play back the samples from a list. It's an old Delphi project, but I'd have to find it.

:D if you could find the sources, that would be a great starting point...maybe I can get something going! :)

cheers,
Paul

Andru
09-01-2012, 11:46 AM
The only one powerful library which I know is modplug (http://modplug-xmms.sourceforge.net/), but it's written in C. It supports huge list of track-formats, and because of this size is a bit big(~300Kb on each platform, but every format is in separte module, so it will be easy to remove no needed formats). I'm planing to use it statically with FreePascal code and already built static libraries for GNU/Linux i386/x86_64 and Windows i386/x86_64(with dll's) :)

code_glitch
09-01-2012, 04:05 PM
Now those are some nice finds guys - those mod files can deliver some great size:quality ratios compared to midis and other formats... If anyone is thinking about starting a community project based on that source I'd be more than happy to help out any way I can :)

paul_nicholls
09-01-2012, 07:33 PM
modplug, eh? Sounds good...thanks for that Andru :)

On the other hand, in my searching last night I found this topic on stackoverflow:
http://stackoverflow.com/questions/7262979/are-there-any-tracked-music-libraries-for-delphi

Which mentions our very own BeRo (Benjamin Rosseaux)! He has a bunch of downloads which includes source code for a MOD player and XM player! (MiniMod, and BeRoXM):
http://bero.0ok.de/downloads/

He also as a very small player that seems to be able to play MOD/S3M/IT/XM and some others...

I have sent him a PM about be being able to use some of this source code in my game :)

cheers,
Paul

WILL
09-01-2012, 09:36 PM
You could try SoundLib3 which is completely written in Object Pascal. Not sure if it requires a dynamic library though. http://www.crossfire-designs.de/index.php?lang=en&what=sourcecode&name=sl3.htm

ModPlug had been made open source some time ago. Though written in C, it did help me work on my OpenMod library a bit...

...still looking Paul. :)

paul_nicholls
09-01-2012, 09:51 PM
You could try SoundLib3 which is completely written in Object Pascal. Not sure if it requires a dynamic library though. http://www.crossfire-designs.de/index.php?lang=en&what=sourcecode&name=sl3.htm

ModPlug had been made open source some time ago. Though written in C, it did help me work on my OpenMod library a bit...

...still looking Paul. :)

:D thanks Jason :)

EDIT: SoundLIb3 does use DLLs BTW...

paul_nicholls
10-01-2012, 11:40 PM
Has anyone here 'heard' from BeRo (Benjamin Rosseaux) lately? I PMed him a couple of days ago but haven't gotten an answer yet about his module playing code...

cheers,
Paul

BeRo
12-01-2012, 01:33 AM
@Paul: I have read your mails, but I was busy (and I am still it) in the moment, so that I wrote the answer mail first some minutes ago. So check your mails :)

paul_nicholls
12-01-2012, 01:50 AM
@Paul: I have read your mails, but I was busy (and I am still it) in the moment, so that I wrote the answer mail first some minutes ago. So check your mails :)

No worries Benjamin, I have read the email, and thanks so much!! You rock! :D

cheers,
Paul

pitfiend
29-02-2012, 04:04 PM
FMOD has a minifmod player in sourcecode and free. The source code builds a dll, but I think it can be ported to create a component.

paul_nicholls
29-02-2012, 07:53 PM
FMOD has a minifmod player in sourcecode and free. The source code builds a dll, but I think it can be ported to create a component.

Thanks pitfiend, but I want to avoid using FMOD (and BASS for that matter) because if your program/game is not free, then you have to pay too much money for a license :(

pitfiend
01-03-2012, 02:41 PM
thats the beauty of this minifmod, it's c/c++ source code, not dll. look here http://www.fmod.org/index.php/download#FMODMini

Andru
01-03-2012, 04:03 PM
look here http://www.fmod.org/index.php/download#FMODMini
Useless, because it's Windows only.

pitfiend
01-03-2012, 06:02 PM
Useless, because it's Windows only.

Man, it's source code. You can port it to your sinclair 48 if you want...

Andru
01-03-2012, 08:51 PM
Man, it's source code.
Man, did you see that source code before telling me this? It uses windows.h and WinMM for sound output. Removing these units and adopting to something like OpenAL/etc. will take a lot of effort. So my opinion - it's absolutely useless, because of one more reason - paul_nicholls asked about simple solution for Pascal, not C/C++. I would understand if it had been just compilable, but rewriting a bunch of code in C/C++ - sorry, I(and everybody else, I think :)) better find something really cross-platform, even if it written not in Pascal, but can be compiled and used :)

pitfiend
01-03-2012, 09:22 PM
Man, did you see that source code before telling me this? It uses windows.h and WinMM for sound output. Removing these units and adopting to something like OpenAL/etc. will take a lot of effort. So my opinion - it's absolutely useless, because of one more reason - paul_nicholls asked about simple solution for Pascal, not C/C++. I would understand if it had been just compilable, but rewriting a bunch of code in C/C++ - sorry, I(and everybody else, I think :)) better find something really cross-platform, even if it written not in Pascal, but can be compiled and used :)

mmm... sure it's a lot of work porting some code from c/c++, but in that source code you can found the basic to play xm files. a better solution can be found? yes, use the lib by BeRo. I only suggest another one. it didn't like you, sorry, I try my best to help with solutions.

Carver413
01-03-2012, 11:12 PM
mmm... sure it's a lot of work porting some code from c/c++, but in that source code you can found the basic to play xm files. a better solution can be found? yes, use the lib by BeRo. I only suggest another one. it didn't like you, sorry, I try my best to help with solutions.

well I suppose if you ported for us, that would be easy. and while your at it would mind porting this as well
http://mary.dfki.de/
I would really like to have this for my rpg engine if I ever get it done.

Andru
02-03-2012, 05:22 AM
I only suggest another one.
And I only wrote my opinion about that source code. But your "Man, it's source code" made me to expand my answer, because I thought you don't understand how bad is situation with that source code for porting... Sorry if it was a bit harsh :)


to play xm files
And the topic is "S3M or MOD"... :)

pitfiend
02-03-2012, 03:28 PM
well I suppose if you ported for us, that would be easy. and while your at it would mind porting this as well
http://mary.dfki.de/
I would really like to have this for my rpg engine if I ever get it done.
Sorry, I don't know Java, but I'm sure there was a text-to-speech component some where and it use the microsoft engine.


And I only wrote my opinion about that source code. But your "Man, it's source code" made me to expand my answer, because I thought you don't understand how bad is situation with that source code for porting... Sorry if it was a bit harsh :)
No problem. I think it is not that bad. Will try to port it when I have some free time.


And the topic is "S3M or MOD"... :)
Well, I remember when I used to play on Amiga, there only were mod files, then some clever people made some improvements to that format to include at first more channels, then better samples and finally more effects. Actually, the more complete format today is XM. The popular ones that survived until today are MOD, S3M, IT and XM. Basicly all of them are the same kind, tracked songs, each format has a few special features, but all of them has in common samples and track data. It has sense when you write a player to be able to play at least that 4 ones.

One thing I miss is a good tracker on Windows (yes, I use that to develop).

code_glitch
02-03-2012, 04:47 PM
To be fair - it would be a godsend to find/make a library that plays those formats with nothing more than the FCL supplied with FPC - Pseudo 100% portability!

paul_nicholls
02-03-2012, 10:01 PM
To be fair - it would be a godsend to find/make a library that plays those formats with nothing more than the FCL supplied with FPC - Pseudo 100% portability!

Well the pascal library that ReBo (Benjamin) wrote which plays S3M, MOD (and I think XM) formats for starters is written using purer Pascal, and runs under Win32, Android, and I think Linux 32/64 bit :)

cheers,
Paul