Jump to content


Photo

Blackplay - 100% Free Module Dll


  • Please log in to reply
46 replies to this topic

#1 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 May 2005 - 03:12 PM

Blackplay
------------------------------------------------------------------
by tsg1zzn
trondsg[at]gmail.com
tsg1zzn[at]start.no
http://home.no.net/tsg1zzn/tsg1zzn/
http://home.no.net/tsg1zzn/termac/
2005
------------------------------------------------------------------
Simple module player for MOD, S3M and XM modules. See the scripts for detailed information about their usage. Basic usage is covered by the example. Comes with a GM 5.0 example and documentation.

This DLL is free for personal and commercial use.

Have fun with this DLL!

New! Version 1.1 has encryption features to prevent stealing of your music. The encrytion can be used on any files, completely separate from the module player.

New! In version 1.2 the encryption dll is a little bit smaller and much faster!

New! In version 1.3 the encryption dll is 17 times faster than in version 1.2. There are two new demo songs written by me.

Download link: http://home.no.net/t...lay_1.3_dll.zip (54kb)

Edited by tsg1zzn, 19 August 2005 - 08:09 PM.

  • 0

#2 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7522 posts
  • Version:GM:Studio

Posted 12 May 2005 - 03:45 PM

Well done! I've tried connecting GM to this module several years ago, but at the time the sound system of GM seemed to lock out the sound. :) It's also extremely under-documented.

But there are some more functions in the DLL itself, such as for setting and getting the volume and position. You planning to include those?

Smarty
  • 0

#3 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 May 2005 - 04:07 PM

Well done! I've tried connecting GM to this module several years ago, but at the time the sound system of GM seemed to lock out the sound.  :)  It's also extremely under-documented.

<{POST_SNAPBACK}>

Thanks! I didn't have any problems with locking out the sound. ;) Under-documented is a mild word. I couldn't find any documentation at all. (Except for a 9 lines readme file and a 4 lines long file_id.diz)

But there are some more functions in the DLL itself, such as for setting and getting the volume and position. You planning to include those?

<{POST_SNAPBACK}>

Speaking of documentation.... Did you read the game info in the example? :) :D
  • 0

#4 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 12 May 2005 - 04:47 PM

Well done man !!

Is a very cool dll :)
  • 0

#5 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7522 posts
  • Version:GM:Studio

Posted 12 May 2005 - 07:41 PM

[Thanks! I didn't have any problems with locking out the sound.

I may have been mistaken with another MOD DLL. Back when GM was at version 4 I tried several, but not all of them allowed MOD playback to mix with GMs sound system. Some also needed a thread to update the sound, or didn't play all formats.

Under-documented is a mild word. I couldn't find any documentation at all. (Except for a 9 lines readme file and a 4 lines long file_id.diz)

I found a Pascal / Delphi example that linked all the exports and did an example.

Speaking of documentation.... Did you read the game info in the example? :ph34r:  :lol:

<{POST_SNAPBACK}>

Got it. I missed the last part about non-scripted exports, I just looked at the initial list. Sorry. :P

There is a callback routine in there which seems interesting. Did you find out what it does?

Smarty
  • 0

#6 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 May 2005 - 07:46 PM

I found a Pascal / Delphi example that linked all the exports and did an example.

<{POST_SNAPBACK}>

Exactly.

Got it. I missed the last part about non-scripted exports, I just looked at the initial list. Sorry.  :lol:

<{POST_SNAPBACK}>

Hehe, I guess I wouldn't have read it all myself...

There is a callback routine in there which seems interesting. Did you find out what it does?

<{POST_SNAPBACK}>

No idea. :ph34r:

EDIT: To Richard: I just checked the link...

Edited by tsg1zzn, 12 May 2005 - 07:47 PM.

  • 0

#7 arcooke

arcooke

    GMC Member

  • New Member
  • 1055 posts

Posted 13 May 2005 - 06:35 PM

Excellent DLL tsg!

This was immediately one of my favorites. I love the filtering options. Great job. :ph34r:
  • 0

#8 Deadheat

Deadheat

    Retro Maniac

  • New Member
  • 659 posts

Posted 18 May 2005 - 02:47 PM

very cool man, exactly what i need yay
do you reckon it would ever be possible to make it in an encrypted file so other people can't use the mods??
like in smarties example?

Edited by Deadheat, 18 May 2005 - 02:53 PM.

  • 0

#9 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 18 May 2005 - 06:39 PM

Of course it would be possible to use an external set of encryption scripts to decrypt the files before sending them to the dll, but then the files would need to be decrypted into a temp directory where everyone can find it. If you want to, I'll try to make a simple encryption system, but it won't be 110% secure to hackers. But sufficient for your needs I think.
  • 0

#10 Deadheat

Deadheat

    Retro Maniac

  • New Member
  • 659 posts

Posted 24 May 2005 - 05:04 PM

cool sounds like just the thing
is it possible to run the dll from a working directory aswell??
how would i go so about it??
i tried most things but it wouldnt seem to work...
i just want to run the dll from inside a folder which comes with the game, along with the mods
any ideas??
  • 0

#11 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 24 May 2005 - 05:38 PM

cool sounds like just the thing
is it possible to run the dll from a working directory aswell??
how would i go so about it??
i tried most things but it wouldnt seem to work...
i just want to run the dll from inside a folder which comes with the game, along with the mods
any ideas??

<{POST_SNAPBACK}>

What do you mean? Like the game executable is in a folder, and in a subfolder the dll and mods are? If so, just pass "subfolder/blackplay.dll" in the init script and "subfolder/module.mod" to the play script.

I'll be working on the encryption system.
  • 0

#12 Bowex

Bowex

    Digital-X

  • New Member
  • 462 posts

Posted 24 May 2005 - 05:57 PM

1 word: AWESOME !
  • 0

#13 Carnivac

Carnivac

    The Hunter

  • GMC Member
  • 3300 posts
  • Version:GM:Studio

Posted 24 May 2005 - 06:07 PM

Great work and anything that promotes the use of tracker modules gets the thumbs up from me.
  • 0

#14 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 24 May 2005 - 06:09 PM

1 word: AWESOME !

<{POST_SNAPBACK}>

Thanks! I'm working on the encryption system. Currently the encryption works perfectly, so it's mostly a formality (I hope) to get it to encrypt and decrypt the modules. Release of Blackplay with encryption is scheduled for this weekend.

For anyone interrested I am using an XOR encryption algorithm, but not a standard to say the least! Even if you know the password and know that it is based on XOR most people which aren't assembly experts will have a really though time finding out how it works. So it's not impossible to crack, but it WILL stop your music from getting spread all over the net without your knowledge. (Or should I say permission)

EDIT:

Great work and anything that promotes the use of tracker modules gets the thumbs up from me.

Posted ImagePosted Image

Edited by tsg1zzn, 24 May 2005 - 06:11 PM.

  • 0

#15 Deadheat

Deadheat

    Retro Maniac

  • New Member
  • 659 posts

Posted 24 May 2005 - 06:13 PM

i tried that before
awesome isn;t giving this dll the respect it deserves, its very awesome=)

i tried that before didnt seem to work, ill try again
hope to see the encryption soon=D

edit:ok wierd i got it working
im guessing there is no way to load the audio32.dll from another folder tho??
not that it matters, just a point of interest??

Edited by Deadheat, 24 May 2005 - 06:24 PM.

  • 0

#16 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 24 May 2005 - 06:46 PM

audiow32.dll should be in the same folder as blackplay.dll I think. Putting it in a third folder isn't supported. (Unless you put it in the system or system32 directory)

There is a little problem with the encryption system. SEAL only has a command to load a module from a file. So the encrypted module has to be decrypted to a file before loading. It won't be possible to catch it in between decrypting, loading and deleting though, because the process is so fast and you cannot open the files while they are in use anyway. It would be way easier to find out the password and encryption method.

The decryption functions will actually be in a separate dll which can be used separately from the rest of Blackplay. So if you don't need the module playback or the encryption system, you can leave out the respective dll. Or you can actually leave out both if you ain't using them, what a gr8 feature!!!!
  • 0

#17 Deadheat

Deadheat

    Retro Maniac

  • New Member
  • 659 posts

Posted 24 May 2005 - 07:09 PM

sounds awesome
when can we expect to see this little beauty of yours??
anytime soon, not that im in a hurry=P
  • 0

#18 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 24 May 2005 - 07:40 PM

Release of Blackplay with encryption is scheduled for this weekend.
<{POST_SNAPBACK}>


Release is now scheduled for tomorrow 1400 GMT.
  • 0

#19 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 25 May 2005 - 01:54 PM

Important update: Encryption finished and released.
  • 0

#20 arcooke

arcooke

    GMC Member

  • New Member
  • 1055 posts

Posted 18 June 2005 - 09:31 PM

The volume function is kinda screwed up :\

The range is 0-64, but you can't go past 64, 64 is the default/unset volume -- which is extremely quiet.

So .. there's no way to make the music any louder than the default, which really sucks. This DLL plays modules so quietly. (which isn't your fault.. it's that damn seal library)

Edited by adamsucks, 19 June 2005 - 12:36 AM.

  • 0

#21 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 19 June 2005 - 01:16 PM

As the volume isn't low on my computer (actually, it's louder than other programs) I think it's your computer which sucks. Sorry. Try adjusting the volume control. Even though GM plays sounds high, SEAL could play them low, as the programs might not use the same devices (like, many have separate volumes for Wave and DirectSound.)

If adjusting the volume control does not help, I will try to do something about it. But first check that ALL sliders are on MAX in your volume control.

Volume control: Start -> Run -> sndrec32 -> [enter]

In the properties window in the volume control, check ALL devices.
  • 0

#22 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 19 August 2005 - 08:10 PM

Update: Encryption is 17 times faster and the encryption dll is even smaller.
  • 0

#23 darthlupi

darthlupi

    GMC Member

  • GMC Member
  • 414 posts

Posted 10 January 2006 - 10:00 PM

This is awesome!

I'm going to attempt to write a script for the bloody thing to change the volume, but my intelligence is enough to inform me of my stupidy.

Wish me luck, and thank you.
  • 0

#24 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 11 January 2006 - 02:52 PM

Define get volume:[code=auto:0]global.bp_ext_getvol = external_define(
'blackplay.dll',
'SetModuleVolume',
dll_cdecl,
ty_real,
0
);[/quote]
  • 0

#25 darthlupi

darthlupi

    GMC Member

  • GMC Member
  • 414 posts

Posted 12 January 2006 - 03:34 PM

Got it working! Apparently volume is from 0 to 100. Thankfully it can be set while the song is in progress without a restarting the tune. Thanks again!

global.bp_ext_setvol = external_define(
'blackplay.dll',
'SetModuleVolume',
dll_cdecl,
ty_real,
1,
ty_real
);

and then call like so

return external_call(global.bp_ext_setvol,argument0);


Thanks again buddy!
  • 0

#26 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2750 posts
  • Version:GM:Studio

Posted 09 January 2007 - 12:32 PM

wierd, this dll doesnt work for me, when I try to run the gmd everything works fine, but when I replace the xm file with my own xm file (with the same name) it isnt played ....
  • 0

iBNKRoX.png


#27 9_6

9_6

    Guest

  • GMC Member
  • 3627 posts

Posted 10 January 2007 - 04:58 PM

I've got it to work.
This dll does funny things to .s3m files.
It plays several channels on the left box only and the rest on the right one just like .mods.
That's why there should be a way to set the sepperation of those.
Only having full mono or stereo just isn't enough, sometimes you want half mono, half stereo. (e.g. .mod files should be played with 0.35 sepperation)
I also see that it doesn't support the .it format.
Isn't there any way to get this to play it?

This surely is an option for indie gamedevs who don't want to spend 100 bucks to register bass/ fmod but lacks functionality.
I'll stick with bass right now but if I ever want to sell a game using mod files I know where to get the player :)

Edited by 9_6, 14 January 2007 - 05:34 PM.

  • 0

#28 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2750 posts
  • Version:GM:Studio

Posted 11 January 2007 - 01:34 PM

Ok, works now, the problem was the mod files...BUT, whenever I close somethin that uses BLACKPLAY (even the blackplay example itself) and press CTL-ALT-DEL its still listed there and I have to close it manually...WHY? btw, I use GM7 beta 2
  • 0

iBNKRoX.png


#29 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 January 2007 - 01:02 PM

Ok, works now, the problem was the mod files...BUT, whenever I close somethin that uses BLACKPLAY (even the blackplay example itself) and press CTL-ALT-DEL its still listed there and I have to close it manually...WHY? btw, I use GM7 beta 2

<{POST_SNAPBACK}>

Since I don't have this problem with GM 5.0 I can only assume it's a bug or changed behavior in GM 7. But you can try to run external_free('blackplay.dll') when the game ends.
  • 0

#30 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7522 posts
  • Version:GM:Studio

Posted 12 January 2007 - 01:20 PM

Since GM7 you can specify Initialisation and Finalization procedures. These DLL procedures are called when GM first starts and when GM exits respectively.

My guess is that GM7, unlike GM5 and GM6, does no proper finalization unless you explicitely tell what function to call. This would be a function that stops module playback and closes the sound system.
  • 0

#31 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2750 posts
  • Version:GM:Studio

Posted 12 January 2007 - 04:36 PM

okay, nice to know...but...what can I do?
use

external_free('blackplay.dll')

at the end?
  • 0

iBNKRoX.png


#32 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 January 2007 - 05:59 PM

My guess is that GM7, unlike GM5 and GM6, does no proper finalization unless you explicitely tell what function to call. This would be a function that stops module playback and closes the sound system.

<{POST_SNAPBACK}>

But there's no function in the dll that needs to be called. But CloseLibrary() from the windows api with the handle to the dll. :D


okay, nice to know...but...what can I do?
use

external_free('blackplay.dll')

at the end?

Try it.
  • 0

#33 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7522 posts
  • Version:GM:Studio

Posted 12 January 2007 - 06:16 PM

But there's no function in the dll that needs to be called. But CloseLibrary() from the windows api with the handle to the dll. :D

Your DLL has a CloseAudioSystem call. I've always wondered what happens when GM is ended without calling any function in the attached DLL to close it down.

As a GM7 extension, you want to specify CloseAudioSystem as the finalization procedure. Perhaps Blaxun never called this function. I've noticed with other DLLs that closing the DLL was, in the past, no problem.
  • 0

#34 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 January 2007 - 06:34 PM

This is a bit weird. I will see what I can do. Will someone check if it works to call CloseAudioSystem() in the finalization?
  • 0

#35 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7522 posts
  • Version:GM:Studio

Posted 12 January 2007 - 06:36 PM

No, maybe it's just enough to call that function before ending GM. But most of the GM users are jus a bit sloppy in their programming. As GM so far never complained about it, it's hard to care.
  • 0

#36 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 January 2007 - 06:40 PM

It seems like the problem is not that GM 7 doesn't free the dll, it's the other way around. It seems like it worked in GM 5 because GM 5 didn't call FreeLibrary(). It shouldn't have anything to do with the audio system. The dll needs to be fixed.
  • 0

#37 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2750 posts
  • Version:GM:Studio

Posted 12 January 2007 - 06:40 PM

The only way to close the game is by pressing the ESC button on the title screen, in the ESC key event of an object I have this code:

BP_StopModule()
BP_CloseAudioSystem()
game_end()


everything should be ended n closed this way...but as it seems...the dlls sstill wants to work
  • 0

iBNKRoX.png


#38 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 12 January 2007 - 06:47 PM

Yes, it seems that for some reason it's impossible to unload audiow32.dll with conventional methods.
  • 0

#39 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2750 posts
  • Version:GM:Studio

Posted 13 January 2007 - 01:14 PM

Damn, so..who could kill that bug?....?
  • 0

iBNKRoX.png


#40 Mediocre

Mediocre

    GMC Member

  • New Member
  • 97 posts

Posted 20 April 2007 - 10:00 AM

I'm using this Dll (with GM 6.1) and it's working great! However, how would you go about checking if a sound is playing with this? This is the first time I've used a Dll so I'm not too sure how it works, but I'm guessing you can't just use sound_isplaying(sound)?
  • 0

#41 tsg1zzn

tsg1zzn

    GMC Member

  • New Member
  • 1163 posts
  • Version:Unknown

Posted 20 April 2007 - 01:57 PM

I'm using this Dll (with GM 6.1) and it's working great! However, how would you go about checking if a sound is playing with this? This is the first time I've used a Dll so I'm not too sure how it works, but I'm guessing you can't just use sound_isplaying(sound)?

<{POST_SNAPBACK}>

You can't.
  • 0

#42 Mediocre

Mediocre

    GMC Member

  • New Member
  • 97 posts

Posted 20 April 2007 - 10:06 PM

Ok thanks. I figured a way around it.
  • 0

#43 jobro

jobro

    GMC Member

  • GMC Member
  • 1300 posts
  • Version:GM:Studio

Posted 31 May 2007 - 11:32 PM

This would definitly be a good GEX for GM7, but I'm totally useless when it comes to creating such things. At least for now. I could have a go at it if I knew all the functions + their external names.
  • 0

Marketplace.png


#44 Serprex

Serprex

    GMC Member

  • New Member
  • 48 posts

Posted 20 October 2007 - 06:52 AM

This is nice because it is small,and being a minimilist,that is one of the most important factors.I was at first half wanting volume functions,and alas it just so happens those can be added
  • 0

#45 MapleGuru

MapleGuru

    GMC Member

  • New Member
  • 271 posts

Posted 14 January 2008 - 01:07 AM

So, does it work in GM7
  • 0

#46 royboyjoytoy2

royboyjoytoy2

    GMC Member

  • New Member
  • 308 posts

Posted 22 May 2008 - 01:54 AM

Finally, a free module dll. This was defiantly needed. The encryption looks like it could be quite useful.
  • 0
"The world will soon see the most successful game ever."

#47 el.zwierzakko

el.zwierzakko

    GMC Member

  • New Member
  • 19 posts

Posted 02 January 2010 - 09:25 PM

Sorry to bump the topic. But can anyone upload the dll again? The link is dead.
  • 0