Ashley Posted November 18, 2010 Share Posted November 18, 2010 Hi;I fooled around a little creating all sorts of stereo systems, jukeboxes, turn tables, mixer panels and even full stages in Garry's Mod Sandbox for manipulating mp3 files; but I still haven't managed to create a contraption able to manipulate the Volume control of Sound Emitters to properly create fade effectshttp://www.xfire.com/video/3b0769/Yesterday I created this very simple system using a slider button controlled by GPS & Inclusive/Equal gates; I figured out the Volume range is "0" at 0.009999 and "1" at 0.01; so I just can't figure out the correct values to use to wire a Sound Emitters "Volume" output so it correctly fades from loud to offAny help would be appreciatedAshley Quote Link to comment
Clavus Posted November 18, 2010 Share Posted November 18, 2010 That's pretty damn nice. I don't know much about wire, at all. But I do a lot about GLua programming. As far as I know GMod and Source can't manipulate mp3 file playback directly (only start / stop), so I figure that for the speeding up / slowing down you showed there's already some sort of module being used.But that's just the technical talk, I really don't know how to do volume control in that sort of system or if it's possible at all : Quote Link to comment
Deluvas Posted November 18, 2010 Share Posted November 18, 2010 (edited) It's possible : http://wiki.garrysmod.com/?title=Csoundpatch ... One could take a look at wiremod's code @ sound section maybe...EDIT: I'll take a look.. Edited November 18, 2010 by Deluvas Quote Link to comment
Clavus Posted November 18, 2010 Share Posted November 18, 2010 It's possible : http://wiki.garrysmod.com/?title=Csoundpatch ... One could take a look at wiremod's code @ sound section maybe...I thought those only accept .wav files. Quote Link to comment
Deluvas Posted November 18, 2010 Share Posted November 18, 2010 I figured out the Volume range is "0" at 0.009999 and "1" at 0.01;Apparently, this is the cause for the strange range @ Volume:local volume = math.Clamp(math.floor(value*100),0,100)self.Volume = volumeself.SND:ChangeVolume(volume)That's in addons folder or GMod folder, depending on where you installed it -> "wire\lua\entities\gmod_wire_soundemitter\init.lua" -- Line 112;You could easily change this line "local volume = math.Clamp(math.floor(value*100),0,100)" to "local volume = math.Clamp( value,0,1 )" so you have your "normal" range back, however I'm not sure if this affects other mechanisms. Worth a try Quote Link to comment
Ashley Posted November 18, 2010 Author Share Posted November 18, 2010 I figured out the Volume range is "0" at 0.009999 and "1" at 0.01;Apparently, this is the cause for the strange range @ Volume:local volume = math.Clamp(math.floor(value*100),0,100)self.Volume = volumeself.SND:ChangeVolume(volume)That's in addons folder or GMod folder, depending on where you installed it -> "wire\lua\entities\gmod_wire_soundemitter\init.lua" -- Line 112;You could easily change this line "local volume = math.Clamp(math.floor(value*100),0,100)" to "local volume = math.Clamp( value,0,1 )" so you have your "normal" range back, however I'm not sure if this affects other mechanisms. Worth a try Well one thing I'm very strict about along with hundreds of other "serious" WireMod "engineers" is that coding in expression2 or changing files is an absolute nono - everything that we want to accomplish has to be done by default wiremod options bar Expression2, to create as realistic devices possible without spoiling itRe-coding lua or using Expression2 is just fooling yourself in my opinion; where creativity counts - so I'm looking for already available output/input value options to accomplish this; which either is possible or isn't Quote Link to comment
Deluvas Posted November 18, 2010 Share Posted November 18, 2010 (edited) I see. Okay then, good luck finding the solution :') Edited November 18, 2010 by Deluvas Quote Link to comment
Clavus Posted November 18, 2010 Share Posted November 18, 2010 Well one thing I'm very strict about along with hundreds of other "serious" WireMod "engineers" is that coding in expression2 or changing files is an absolute nono - everything that we want to accomplish has to be done by default wiremod options bar Expression2, to create as realistic devices possible without spoiling itRe-coding lua or using Expression2 is just fooling yourself in my opinion; where creativity counts - so I'm looking for already available output/input value options to accomplish this; which either is possible or isn'tThat is seriously one of the most pointless things I've ever heard. Did the developer declare his code holy or something? If something doesn't work and you can fix it, just do it. There's this great little ctrl+z key combination if it fucks things up. Quote Link to comment
Ashley Posted November 18, 2010 Author Share Posted November 18, 2010 That's not the issue; the issue is that there are basically a few kinds of WireMod builders; one large group of builders gets a kick out of coding the most impressive things by re-coding LUA or putting everything in an expression2 chip - but an even larger group doesn't see the fun in that.Maybe to you it sounds pointless not to - but to us it seems pointless to just code whatever we want to get out of a sandbox game; where for us the fun lies within creativity using presented options with basic wiremod and the source game itself.It's about what we find the most fun; I personally find it more fun to try and accomplish something that seems impossible after spending countless of hours building chipboards with over 100 chips; someone else finds it more fun to just create an entity in LUA - they're two entirely different games to play; I choose the firstThat's pretty damn nice. I don't know much about wire, at all. But I do a lot about GLua programming. As far as I know GMod and Source can't manipulate mp3 file playback directly (only start / stop), so I figure that for the speeding up / slowing down you showed there's already some sort of module being used.Also the speeding up/slowing down is just pitch control which can be manipulated using the PitchRelative (5th) output on the Sound emitters; already default with WireMod; so no other module did that for me Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.