Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bx83 on Tue 06/08/2019 11:30:19

Title: Can I set System.Volume to over 100%?
Post by: bx83 on Tue 06/08/2019 11:30:19
Is there a way to amplify sound that's already there?
If I have a slider, can I set it to 200 and have the volume in/decrease from 100%?
Or is 100% the max, no amplification?
Title: Re: Can I set System.Volume to over 100%?
Post by: bx83 on Tue 06/08/2019 11:35:11
And (just to ask yet more questions), is there a way to set volumes for each sound type? Eg. Music, Sounds, ExtraSounds, Footprints, SomeOtherTypeIMadeUp, etc..
Title: Re: Can I set System.Volume to over 100%?
Post by: Laura Hunt on Tue 06/08/2019 11:43:39
1) Not that I know. 100% is 100%.

2) You can't set a default volume for audio types per se, but you can set a default volume for your audio folders, so any sounds you import into those folders will inherit that volume. AGS comes with folders "Music" and "Sounds" by default, but these folder names do NOT necessarily have to match the audio types of the files inside them, so in other words, if you create an audio type called "backgroundsound" you can still tag sounds inside your "Music" folder as "backgroundsound" if you feel like it... or in your case, since you have an audio type called "Footsteps", your best option is to create a folder called "Footsteps", move all your footstep sounds inside that folder, and set the default volume for the folder.

And then, of course, you can adjust each clip's volume independently for finer tuning.

Title: Re: Can I set System.Volume to over 100%?
Post by: Cassiebsg on Tue 06/08/2019 12:42:26
If you need to amplify sounds/music I suggest you install Audacity (it's free) and use it to amplify the volume (make sure you don't let the sound get clipped) then save to your original import files, and re-build the game again (it will pick up your files from the original import location, if available, and rebuild the audio cache with the new improved file).

Title: Re: Can I set System.Volume to over 100%?
Post by: Crimson Wizard on Tue 06/08/2019 13:02:31
You can change volume for sound type in script using Game.SetAudioTypeVolume
Title: Re: Can I set System.Volume to over 100%?
Post by: Khris on Tue 06/08/2019 14:23:11
Ideally, all sound files should be normalized to like 98% before you import them into AGS so they have a consistent volume in-game.
Title: Re: Can I set System.Volume to over 100%?
Post by: Laura Hunt on Tue 06/08/2019 16:00:09
Quote from: Cassiebsg on Tue 06/08/2019 12:42:26
save to your original import files, and re-build the game again (it will pick up your files from the original import location, if available, and rebuild the audio cache with the new improved file).

I had NO idea this worked like that. I thought that once an audio file was imported into the game, the original file was never used again. Very useful to know!
Title: Re: Can I set System.Volume to over 100%?
Post by: Cassiebsg on Tue 06/08/2019 16:11:06
I also got some sweat times trying to figure that... I used to delete and the re-import, then I tried finding the audio cached file and edit that one, and couldn't figure out why my changes didn't get "saved"... Until I figured out that it was reloading the original files at build time... lots of hours lost in frustration, I must say.
Title: Re: Can I set System.Volume to over 100%?
Post by: Khris on Tue 06/08/2019 17:04:13
For reference, this is mentioned at the bottom of the Music and Sound (https://www.adventuregamestudio.co.uk/manual/ags12.htm#AudioCache) page.
Title: Re: Can I set System.Volume to over 100%?
Post by: Cassiebsg on Tue 06/08/2019 17:17:18
I might have read that once a long time ago, and then forgot.  :-[

But I wonder why there just isn't a "reload from source" option instead, like there is for sprites.  (roll)
Title: Re: Can I set System.Volume to over 100%?
Post by: Laura Hunt on Tue 06/08/2019 17:42:08
Quote from: Cassiebsg on Tue 06/08/2019 17:17:18
I might have read that once a long time ago, and then forgot.  :-[

Same here, my brain probably stopped processing at "AGS can't rely on the audio files always being there because you might remove the USB stick or delete the files on it. Therefore, when you import audio into AGS it makes a copy of the file in the AudioCache folder", went "ah yeah that makes sense", and skipped the part immediately afterwards where it says "AGS also remembers where the file came from, and when you compile your game it will check if the file has been updated in its original location" :-D
Title: Re: Can I set System.Volume to over 100%?
Post by: Crimson Wizard on Tue 06/08/2019 17:49:01
Frankly, this Audio cache feature of AGS has been critisized in the past. It may be more convenient to just copy actual source files into subfolder and keep them there, ignoring audio cache folder (as in -not distributing and not checking in if you're using version control system). AGS will still have to build and use audio cache though, but you could turn blind eye on that.
The benefit of above is that AGS will keep relative paths to original files, and you may safely pass full game project to other people, and AGS won't complain about missing originals.