• Affect Things along with Music?
    18 replies, posted
I think I already know this is not currently possible... What I'm asking is, whether or not there are DLLs or modules, or anything that would allow me to use music to cause mischief, kind of like in Saints Row IV with the Dubstep gun... [video=youtube;SZaE7QkME38]http://www.youtube.com/watch?v=SZaE7QkME38[/video] For instance, lets say I wanted to make the player's FOV move with the music... deep pitch for a wide FOV, and a high pitch for a skinny FOV. Deep pitch for a stretched FOV like 110, and a High pitch would cause a zoom FOV like 20. I sincerely doubt this is possible... I'm sure there would be a way to do it, but that would likely be in the C++ Hard Code... maybe with DLL file additions? Idk... I would really love this ability, but I don't see it happening... worth a shot to ask, though. [editline]14th September 2013[/editline] Of course, I could have whatever makes the music just have a rhythmic code, and play the beat itself instead of a full song... it might sound different on lag, but at least it would be synchronized. [editline]14th September 2013[/editline] Another example would be Audio Surf...
GM_BASS is what you are looking for. AudioSurf is different story, it precomputes tracks, Beat Hazard is however a live expirience. And I actually think Saints Row IV have the beat "hardcoded".
[QUOTE=Robotboy655;42192552]GM_BASS is what you are looking for. AudioSurf is different story, it precomputes tracks, Beat Hazard is however a live expirience. And I actually think Saints Row IV have the beat "hardcoded".[/QUOTE] Uh, so you're saying... basically the same thing I believe, saints row IV's gun just plays it with a sort of, as I called it, "Rhythmic Code" in that the code tells it when to play the beats... since I've never seen it get out of synch, even when I'm cheating and holding the trigger for sooo long... [editline]14th September 2013[/editline] Thanks, where would I find GM_BASS though? (The newest, most advanced and updated one?) [editline]14th September 2013[/editline] I need a good song for it :v: Well, and to know how to access the right variable with Lua.
GM_BASS is built into gmod now using the sound.PlayURL function. [url]http://wiki.garrysmod.com/page/sound/PlayURL[/url]
[QUOTE=Gfoose;42192732]GM_BASS is built into gmod now using the sound.PlayURL function. [url]http://wiki.garrysmod.com/page/sound/PlayURL[/url][/QUOTE] The built in one doesn't allow what OP wants, only gm_bass does atm.
[QUOTE=Robotboy655;42192803]The built in one doesn't allow what OP wants, only gm_bass does atm.[/QUOTE] Oh OK my bad. I don't understand why we don't have full functions of the bass module. But yeah...
[QUOTE=Gfoose;42192889]Oh OK my bad. I don't understand why we don't have full functions of the bass module. But yeah...[/QUOTE] Because Garry is working on Rust and the initial bind of Bass.dll functions were a test if it is going to work at all.
Alright, well... I'm just wondering, what variable is the one I would use to do such an effect? That is, I saw a youtube video where they rigged a barrel on a hydraulic to move as the music played; what variable would I want for that? channel:getsample() channel:getfrequency() BASS.Version BASS.ModuleVersion channel:gettype() channel:getvolume() I mean, if it's not one of those, then what variable am I looking for? I want one that just goes crazy for bass, so to speak... [editline]14th September 2013[/editline] This is the one I found: [URL]http://facepunch.com/showthread.php?t=1159184[/URL] [editline]14th September 2013[/editline] Yeah, the gamemode I would want this for is planned to go on for as long as I keep creating ideas... it's formed in a way where with one simple traumatic event, or even just going to sleep, I could change every rule of the game... creating anything in my mind, from RPG, RPGFPS, Platformer, you name it... The hardest part I can think of would be forcing the new rules, and mixing them all in properly with the gamemode... but the goal will be messing with the player's mind, tripping them out; the end is already theorized, but... that end kindof just lead into another story...
You want to use channel:fft256() or similar functions for this. ( fft512(), etc ) See the documentation.
[QUOTE=Robotboy655;42199034]You want to use channel:fft256() or similar functions for this. ( fft512(), etc ) See the documentation.[/QUOTE] I read about that, it sends in 128, 256, 512, 1024, 2048, 4096, or 8192 Values (always 1/2 of the number used) which section would I be looking for to find bass? Like the first 1/4, 1/8 of the values, second, third, etc..?
As a debug, draw x amount of verical bars on screen, one for each value in fft table, and see what each one does.
[sp]Okay, what the heck?! I keep getting an error reporting the game "failed to load cl_player" because it thinks it doesn't exist... but it does! no other errors are reported except all of the failed to load sandbox crap... for obvious reasons, this isn't sandbox... Couldn't include file 'cl_player.lua' (File not found) (@gamemodes/illumination/gamemode/cl_init.lua (line 2)) ERROR: Trying to derive entity base_wire_entity from non existant entity base_gmodentity! ERROR: Trying to derive entity base_wire_entity from non existant entity base_gmodentity![/sp] Well... I guess I can go without that... for now...
Is this file AddCSLuaFile'd? Is is empty or not?
[QUOTE=Robotboy655;42222729]Is this file AddCSLuaFile'd? Is is empty or not?[/QUOTE] the gamemode uses the default base. I don't have that file in its folders, but it should be in the base gamemode. [editline]17th September 2013[/editline] every other client file works perfectly btw
You are clearly trying to include the file from your gamemode cl_init.lua line 2, not base.
<snip> I really haven't thought of the exact way I would use this music thing yet... but it will have to be clientside, and so it can't interfere in a way that would make it harder to play... [editline]17th September 2013[/editline] What file should I do this in, though? Likely not in "cl_player.lua"... I really need to figure out HOW I'll use it first... it will likely be a separate file entirely Also, I'm not sure what song I should use... most of what I own is, well... FFDP, All That Remains, Avenged Sevenfold, Disturbed, Device, Bullet 4 Valentine, Godsmack, Korn, Rage Against the Machine, and Shinedown... [B]APPEND[/B] When I get the gamemode to a point where all of the basic functions are complete I'll likely make a thread specifically for the gamemode.
I made a small test addon using the gm bass edit module thingy a while ago. It basically draws 3d rectangles starting on a certain coord as a band visualizer. You can take a look at it here: [url]https://www.dropbox.com/sh/aax3nkl863mkhqz/8KeFyvbhWQ/gParty[/url] Just look up the console commands in the code to use it. (You need to put your own music in the addons sound/music folder to get it to play.
[QUOTE=LennyPenny;42243223]I made a small test addon using the gm bass edit module thingy a while ago. It basically draws 3d rectangles starting on a certain coord as a band visualizer. You can take a look at it here: [URL]https://www.dropbox.com/sh/aax3nkl863mkhqz/8KeFyvbhWQ/gParty[/URL] Just look up the console commands in the code to use it. (You need to put your own music in the addons sound/music folder to get it to play.[/QUOTE] Well... I think I may just use it mostly for reference. Where do I get the module that you used, and how do I install it without my antivirus going crazy?
[QUOTE=WalkingZombie;42284556]Well... I think I may just use it mostly for reference. Where do I get the module that you used, and how do I install it without my antivirus going crazy?[/QUOTE] [url]http://facepunch.com/showthread.php?t=1159184[/url] Tell your anti virus that these dlls are harmless. If you can't say that to your anti virus, uninstall it, it will hinder you when developing anything. I just went over the code again, it's a mess, sorry. The stuff from line 23 and on should be what you are searching for. In the for loop notice that I only drew the first 100 segments because I just wanted to see the lower frequencies. The commented out part below that should make some spheres dancing to the music with some lights.
Sorry, you need to Log In to post a reply to this thread.