Optimising sound?

Discuss game development design and post your game ideas

Post » Tue Mar 20, 2012 2:35 am

Hey all,

Getting to the stage of implementing sounds and just wondered if someone could tell me off the top of their head if there are ways to optimise sound (I.E bring down filesize with a loss to the sound quality).

Or anyone know of some sneaky tricks? For instance im thinking of breaking down a track into short sequences that could be repeated a number of times before the beat changes instead of having 1 massive track. Would this be wise?

Cheers to anyone with info.GenkiGenga2012-03-20 13:52:04
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Thu Apr 19, 2012 4:05 pm

Been doing some research.

Thought I would share a link to some beginner information for those of us not familiar.

http://books.google.com.au/books?id=fWBO0izdpF8C&pg=PA382&lpg=PA382&dq=prepare+sound+for+video+games+reduce+filesize&source=bl&ots=-smomTdTY2&sig=VRqCPXwT-5SAOsrun32p_FN6eOE&hl=en&sa=X&ei=kSOQT43ZOue0iQeak7GCBA&ved=0CFIQ6AEwBQ#

Bottom of p381 and p382.

Still not sure how much of the sound I want to stream, perhaps only the music.

Edit : The way you apply the chart is by importing your sounds into your sound editor (Audacity is free) and then changing the sample rate and then exporting the sound again.GenkiGenga2012-04-19 16:12:07
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Fri Apr 20, 2012 12:09 pm

Did you know you can choose the quality/filesize when importing audio to Construct 2? Doesn't that do everything you need?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Fri Apr 20, 2012 10:20 pm

Hey @Ashley thanks for the input,

To be honest I havent checked the size of the sound files when exported yet, but my assumption was that I could further save filesize by making them as small as possible before importing them into C2.

Am I doing all this work for nothing perhaps?GenkiGenga2012-04-20 23:58:09
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Sat Apr 21, 2012 6:15 pm

Maybe, because you can make the files smaller as you import them to Construct 2, by choosing a different quality setting in Construct 2's import dialog!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Sat Apr 21, 2012 10:33 pm

Well, after doing a couple of tests, the file size in the end was only a a couple of kb lighter going through Audactiy.

The only positive is that when Construct had a hard time formatting some of my bigger sound files to a lesser quality (when it comes up with an error saying it wasnt formatted), I found it worked when I reduced the quality in Audactiy first. GenkiGenga2012-04-21 22:34:51
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Sun Apr 22, 2012 1:51 am

A feature in the future to change the quality of a sound after they are imported and used in the game would be nice.
My project for example is getting quite big, if I could shrink the size of sounds and music without needing to re import them again and set the event sheets to play the right sound I would be very happy.
B
18
S
1
Posts: 19
Reputation: 1,473

Post » Sun Apr 22, 2012 12:24 pm

I'd be very careful breaking songs down into sections. The audio support in browsers is so sketchy that this could bring more trouble than help!
I usually just create 1 minute loops of my music. I have 5 songs in AirScape and it still fit on the arcade ;)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Sun Apr 22, 2012 10:23 pm

Cheers Squid,

I did end up deciding to go with 1-2 min loops instead of breaking them up. I just hope there isnt issues with streaming.
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Mon Apr 23, 2012 8:53 am

I can imagine an audio optimisation tool in C2, to let the common C2 users do it themselves the testing of the different combinations of: sample rate/number of bits/number of channels/encoding bitrate values.

I have some experiance about the digital file formats, cause I'm originally a sound engineer...:)

This tool is unavoidable cause of the very different properties of each SFX or music.

An example:
Rumble SFX with a very low tone: the initial wav file have a 44,1Khz sample rate, 16 bit, PCM - not compressed.

- The 44,1Khz means that the maximal frequency of the sound could be 22,05Khz what is not hearable for most people above 20 years. If You change the sample rate to 22,05KHz, the change in sound quality may not be hearable, but You have a sound file, what is half in size.
- If You make the bit depth to 8 from 16, cause of the low tone, that makes relatively large waveforms, You may also cant notice any difference, but again have half file size.
- For a very low tone, You ears can not detect direction information, so You can switch to mono from stereo mode. It's also a half in size.

I did not done any tests with ogg/aac encoding, but the original wave file size could be reduced to 1/8 in the exapmle above. It can not be an averange, but about 40-60% reduce in sound file sizes may not be unreal, so its even a very good point of size optimisation.

I would like to recommend a tool in C2 that have prelisten mode with A/B testing: play, and in playtime switch to original and optimized.
By this, any C2 users could be able to deside what is the optimal sound quality/size ratio for their game. It may be apply only on exporting, so we can keep the original files in project, and do not need to reimport when want to set a better quality.

I have ideas about a basic FFT graph to help users to decide to cut sample rate, but this is not a must-have...

I can offer to make a tutorial about this feature with sample sounds, basic optimisation tips and I can perform the encoding tests too.
B
19
S
5
G
4
Posts: 109
Reputation: 4,195

Next

Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 1 guest