The module gm_bass was [B]originally made by AzuiSleet[/B] and got major [B]edited by me[/B] with his permission.
Gm_bass2 hooks into a third party sound engine called [URL="http://www.un4seen.com/"]BASS by the un4seen organization[/URL] and its plug-ins.
Using this module will make you able to stream various formats of sound and play them as 3d world sound.
This is outdated. You should use [URL="http://facepunch.com/showthread.php?t=1472253"]gm_bass3[/URL] instead.
[B]Why did you edit it and what did you change?[/B]
[U][B]My changes are:[/B][/U]
[B]- You can use gm_bass2 shared now! (This means it can also be used to get stream informations serverside while it is also used clientside.)
- Added AAC, FLAC, MOD support.
- Added support for the filesystem of GMod.
- Made use of GMod's BASS.
- Improved the GMod Window check, so you can also use it on a dedicated server.
- Warning: It's not compatible with the old gm_bass any more! Read the SVN Change logs or this thread for more infos.
- Renamed almost all functions, please read the documentation below.
[/B]
- Made BASS always silent serverside.
- Updated the bass and plug-in libraries.
- Changed error outputs on loading errors.
- Changed sound fading.
[I][B]Added:[/B][/I]
- channel:IsValid(), channel:IsPaused() and channel:channel:IsStalled().
- string = BASS.DecodeErrorCode(number), gives out the description of an error code.
- table = BASS.Plugins, it's a table of the loaded plugins. The key is the name and the value is the version.
- two optional boolean arguments to BASS.StreamFile(), the 1st one is for 3d playing (false/nil = on) and the 2nd is for loop playing (true = on).
- a optional boolean argument to BASS.StreamFileURL(), it is for 3d playing (false/nil = on).
- a optional bool argument to channel:Play(), true makes the channel restart.
- all fft* function BASS supports
- Changed how are the channel:fft*() functions are working, it takes a table that gets changed now, instead of creating a new one each time.
- number = BASS.Version, that's number of the BASS version.
- number = BASS.ModuleVersion, that's number of the BASS version.
- number = channel:getfrequency(), that returns the sample rate in Hz.
- number = channel:getsample(), that returns the sample size in Bit.
- string = channel:gettype(), that returns the format as a string.
- number = channel:getvolume(), that returns the volume. (clientside)
- Added nil = channel:set3dfadedistance(number distance), sets the distance the sound begins to fade. (clientside)
- Added nil = channel:set3dcone(number innerangle, number outerangle, number outvolume)
- Sets the cone of the sound, in the inner angle the sound is played at max volume, out of the outerangle the sound is played at the given (outvolume) volume. (clientside)
[I][B]Removed:[/B][/I]
- BASS.SetPosition(), not needed anymore.
- channel:setvolume() serverside.
- channel:channel_set3dposition() serverside.
- the 2nd argument of BASS.StreamFile(), it was a number that set the time offset. It never worked and could cause crashes.
[B]Documentation:[/B]
[URL="https://dl.dropbox.com/u/16654098/gmod/Bass/gm_bass_documentation.html"]gm_bass_documentation.html[/URL]
[B]Downloads:[/B]
[URL="https://dl.dropboxusercontent.com/u/16654098/gmod/Bass/gm_bass2.zip"]Windows Binaries (Source included)[/URL]
What do you mean with
"- You can use gm_bass_edit shared now!"
People dont need to download bass.dll, to use it on specific servers?
Hell.. thats what we need
I think it means it can be used on both client and server, so it is still needed on the client.
[QUOTE=gamerpaddy;34430707]What do you mean with
"- You can use gm_bass_edit shared now!"
People dont need to download bass.dll, to use it on specific servers?
Hell.. thats what we need[/QUOTE]
No, it just can be used on servers too. It's needed to get stream informations such like tages, sound level or spectrum. Streams are muted serverside so servers will not start to play music, if you open a stream with it. :v:
Good thing this got updated I was planning on creating a plugin for exclserver for streaming music.
Can't garry just please spend 1000 euros out of his millions get this damn bass license and ship this with GMod.
Do any of you know, if you are able to put these third party dlls (bass.dll and tags.dll) into the gmod module?
Can you rephrase that question.
He wants to put the additional required DLLs into the module itself.
[QUOTE=Grocel;34665312]Do any of you know, if you are able to put these third party dlls (bass.dll and tags.dll) into the gmod module?[/QUOTE]
Yes you probably could compile bass.dll and tags.dll as a static library so they're included into the module itself.
Are *.lib files static libraries?
Also I don't have the source code of bass.dll and tags.dll, because they are closed source.
Do I need the source code to compile it as a static library?
[QUOTE=Grocel;34667793]Are *.lib files static libraries?
Also I don't have the source code of bass.dll and tags.dll, because they are closed source.
Do I need the source code to compile it as a static library?[/QUOTE]
Yes. You'd need to recompile them so yes you'd need the source code.
Would there be anyone willing to help me compile a Linux Shared Object/Binary of gm_bass?
[QUOTE=Tessius;34994908]Would there be anyone willing to help me compile a Linux Shared Object/Binary of gm_bass?[/QUOTE]
Unfortunately I don't know how to compile for Linux/Mac, since I don't know/own/want Linux/Mac. It would be truly nice if someone could compile a Linux/Mac build for us.
Which language did you compile the dll in?
[QUOTE=Tessius;34998007]Which language did you compile the dll in?[/QUOTE]
c++, obviously.
[QUOTE=Tessius;34998007]Which language did you compile the dll in?[/QUOTE]
Lua
:suicide:
I just updated the module, here are the changes:
- Updated the bass and plugin libraries.
- Added AAC, FLAC and MIDI plugins.
- Added 2 optional boolean arguments to BASS.StreamFile(), the first one is for 3d playing (false/nil = on) and the second is for loop playing (true = on).
- Added a optional boolean argument to BASS.StreamFileURL(), it is for 3d playing (false/nil = on).
- Added a optional bool argument to channel:play(), true makes the channel restart.
- Added table = channel:fft256(), it does the same as channel:fft2048(), but the table has 128 indexes.
- Added table = channel:fft512(), it does the same as channel:fft2048(), but the table has 256 indexes.
- Added table = channel:fft1024(), it does the same as channel:fft2048(), but the table has 512 indexes.
- Also some code cleanup.
I also have a question to you:
Today, I have seen that the developers of GMod Tower [URL="http://www.gmtower.org/forums/index.php?topic=242"]somehow managed[/URL] to load the gm_bass modules (bass.dll, tags.dll, bassmidi.dll, etc.) right from the addon's lua/includes/module folder just a few weeks ago.
So I would like to know how they done this, because it would be also useful for me. Can someone explain this to me?
Yeah, in that post it makes it seem like that the binary modules load from the addon folder but I thought you couldn't do that..
If there is a way to do that it would be less confusing for people installing addons with binary modules in them, but then again its a way to trick people into installing malicious files by hiding it in an addon :P
[QUOTE=Scooby;35986623]Yeah, in that post it makes it seem like that the binary modules load from the addon folder but I thought you couldn't do that..
If there is a way to do that it would be less confusing for people installing addons with binary modules in them, but then again its a way to trick people into installing malicious files by hiding it in an addon :P[/QUOTE]
You can load GMod binary modules (gm_bass.dll) from the addons folder for a while. What I want to know is: How do I load the third party modules (bass.dll, tags.dll) which aren't GMod modules from elsewhere than the exe's folder.
we should make a Addon like Wiremod or a new PHX model pack, that every player need
with (gm_)bass.dll inside (or installer for all that stuff..)
[QUOTE=Grocel;35990893]You can load GMod binary modules (gm_bass.dll) from the addons folder for a while. What I want to know is: How do I load the third party modules (bass.dll, tags.dll) which aren't GMod modules from elsewhere than the exe's folder.[/QUOTE]
[url]http://msdn.microsoft.com/en-us/library/windows/desktop/ms686203%28v=vs.85%29.aspx[/url] maybe.
[QUOTE=gamerpaddy;35991485]we should make a Addon like Wiremod or a new PHX model pack, that every player need
with (gm_)bass.dll inside (or installer for all that stuff..)[/QUOTE]
Can be abused to easily.
[QUOTE=Chrisaster;35992215][url]http://msdn.microsoft.com/en-us/library/windows/desktop/ms686203%28v=vs.85%29.aspx[/url] maybe.[/QUOTE]
It seems to work for exes only. It seemed to have no effect when I used it in the GMod module. But maybe this will takes me bit closer later.
We need a BASS module that gives you access to all the BASS functions in a table, not these wrappers which limit the functionality. :saddowns:
[QUOTE=Map in a box;36007885]We need a BASS module that gives you access to all the BASS functions in a table, not these wrappers which limit the functionality. :saddowns:[/QUOTE]
You can only use a wrapper method.
[editline]18th May 2012[/editline]
[QUOTE=Wizard of Ass;36008433]You can only use a wrapper method.[/QUOTE]
Except you can make an automated script that creates all needed object classes in lua, creates all the functions with fail-safe protections and so on.
Well you know what I mean, wrappers as in creating the sound for you and everything. I was thinking more of the lines of autogenerating a module file for compiling using the BASS headers.
Have fun doing that.
-snip, outdated-
[QUOTE=Grocel;36021022]Fixed crash on load in GMod 13.
[URL="http://svn.xp-dev.com/svn/2d3d_Browser/lua/includes/modules/gm_bass_edit.dll"]Windows Binary (for GMod 13)[/URL]
If you want to use this module in GMod 12 then have this version:
[URL="http://svn.xp-dev.com/svn/2d3d_Browser/lua/includes/modules/gm_bass_edit2.dll"]Windows Binary (for GMod 12)[/URL]
Thanks to AzuiSleet:[/QUOTE]
I wish we could make players download this module and use it with gmod, if it was to popup a menu saying "Would you like to download gmcl_bass.dll" with Yes/No buttons. That would be insanely fucking awesome! But good job.
Sorry, you need to Log In to post a reply to this thread.