home made music for game

Started by
21 comments, last by sakky 21 years, 9 months ago
Hi, I play guitar and I would like to know witch typr of sound format I should use. I''m making up a lot of cool sounds for one of my friends RPG and my Galaxian clone. My problem is I want a file that won''t take up tons of space, but will still sound good. I was thinking something like 8 bit stereo .WAV. I notice that wav files take up alot of space witch I don''t want. The key here that I want is small size and quality. Because if I put hours into a song and it turns out sounding like a cat getting his nuts beaten with a rubber mallet, there were first stapled to plywood. Then it dosn''t realy do me much good, does it.
Take back the internet with the most awsome browser around, FireFox
Advertisement
Ogg Vorbis; Small, free, open-source, good quality and non of the nasty mp3-licensing issues. Alternately, under Windows .WMA offers (subjectively) better quality and plenty of documentation in the MSDN.
Cool, just what I was looking for.
Now I can have my music on my game.
This Galaxian clone is coming along pretty good
Alot better then I though it was going to be.
Cool, just what I was looking for.
Now I can have my music on my game.
This Galaxian clone is coming along pretty good
Alot better then I though it was going to be.
Of course you can always downsample the sound to something like 22KHz 8-bit Mono (you don''t really need stereo for SFX)...but you will loose some of the *really* high freqs. But if you have lots of action and some music in the background anyway, you definitely won''t notice it

Alternatively, just zip or RAR the files and just decompress them while the game loads or something...I dunno. I''m no expert on game coding at all...
But a compressive audio format such as mp3, WMA or ogg will have better quality, and a much smaller file size then even 8-bit 22Khz files. Only psychoacoustically redundant information ( inaudible frequencies ) are removed, and whilst this will be apparent to audio gimps, most people won''t notice. The only advantage with a WAV is more optimal playback, although if this a problem the mp3s can be converted back into a PCM format on install or at runtime ( although, of course, they will still be ''lossy''. )

Sampling at 22Khz means more than just losing the high end. Even though Nyquist tells us that this rate will sample up to 11Khz with no aliasing, the perceived sound is most certainly changed. This is why most ( all? ) audio sequencers now permit a sample rate of 96Khz despite the 20Khz limit on human hearing; and the increase in quality IS noticeable.


of course, the difference is noticeable.

ie, a sample rate of 44kHz means that you have about
8 samples for a complete wave at 6 kHz, which even my 80 year old
grandma can hear. EIGHT lousy samples to describe a complete period... how accurate...
( I think about 6 kHz is the upper border of frequencies that music intruments
produce as "ground frequency", so not only the multiples of the freqs are described
inaccurate (sorry, I don''t know the correct terms in english))
And so many people don''t see this, and say things like
"44kHz already is double of the freq audible to human, why use higher ?"
They should just think a bit about it...

BTW, mp3 with less than 256kbps sound awful to me,
and even 256 or higher sometimes turn hi-hat clicks into typewriter hits.
Those who say >=128kbps will have no artifacts, and sound as good as CD,
probably visit clubs too often
(at many clubs my ears ache when I stand in front of the entrance ,
many play music insanely loud nowadays, no ten horses will get me in there...)

The Nyquist Theory:

With a sampling rate of X, any wave up to frequency of X/2 can be perfectly reconstructed.

Note the bold word.

Now, if you sample at twice the maximal hearing frequency of the human ear, you''ll be able to reproduce exactly what you''re hearing. There''s no ifs or buts about it, pure, simple, scientific fact.


Or is it?

http://www.byte.com/documents/s=527/BYT20010105S0001/

Note that the fault does NOT lie in the sampled signal. From a theoretical standpoint, 44.1Khz is enough. It''s the reconstruction that buggers up. Forcing reconstruction to operate at higher frequencies (such as 48Khz or even the dreaded 96Khz) allows the reconstruction filter to be REALLY bad, and yet never actually encroach upon what the human ear picks up.

So, by having higher sampling rates, you''re basically forcing hardware manufacturers to keep up with you, which can be a good thing.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
quote:Original post by MadKeithV
The Nyquist Theory:

With a sampling rate of X, any wave up to frequency of X/2 can be perfectly reconstructed.




I heard of this.
I doubt that you reproduce a complete wave period, let''s say a sine just from
0...2pi, with two sample values!

What do you understand by the word "perfectly" ?
May be "acceptable".
It may sound ok, but is it "exactly what you''re hearing" ?

The human ear is far more accurate than many think. In fact, it''s the most
accurate sense humans have.

you said:
"There''s no ifs or buts about it, pure, simple, scientific fact"

well, I would not give all things that were once researched by scientist
the state of "the word of god".

at my uni, there''s a professor that doubts several of todays "facts" concerning about how
humans "really" hear, and he''s getting more people convinced of his way of viewing.

When I''m at home, I''ll post the link to his page, it''s really interesting.
(I don''t remember the url)

One thing he said, which I just remember, is:
" ''facts'' can''t be simple enough for marketing "




however, I found this at prorec.com:
"
A little known aspect of Nyquist theory is that integration over all samples is required to produce the original waveform. The Nyquist frequency is an asymptotic limit, which
is approached, but never reached."

"
Since our ears don''t integrate over all time, there has to be a gradual approach to this failing point. I think that human perception places a window on the math, and therefore
forces a gradual degredation in reproduction as the Nyquist frequency is approached. A rule of thumb we used when I was a co-op was to make the sampling rate 2.5x the
highest frequency of interest. This way the sampling artifacting would be minimized.
"

Well, they use 2.5, but it''s a rule of the thumb .




quote:Original post by UnshavenBastard
What do you understand by the word "perfectly" ?


Exactly what it says. An indistinguishable reproduction of the original input wave.

quote:Original post by UnshavenBastard
May be "acceptable".
It may sound ok, but is it "exactly what you''re hearing" ?

Yes.


quote:Original post by UnshavenBastard
well, I would not give all things that were once researched by scientist the state of "the word of god".

Now you''re just crapshooting. If you''re going to disprove me, disprove me. The Nyquist theorem is very mathematically sound.

quote:Original post by UnshavenBastard
at my uni, there''s a professor that doubts several of todays "facts" concerning about how humans "really" hear, and he''s getting more people convinced of his way of viewing.


You''re suddenly confusing a whole bunch of things at once. The Nyquist theorem has NOTHING to do with human hearing. Its about sampling and reconstruction. It is peripheral - it might be that human hearing achieves an accuracy of Y, rather than X, but that doesn''t change the fact that a Nyquist rate of 2Y would be sufficient for an audibly perfect reconstruction.

quote:Original post by UnshavenBastard
When I''m at home, I''ll post the link to his page, it''s really interesting.

I''m interested in it - psychoacoustics can be very important. But that doesn''t change the Nyquist theorem.


quote:Original post by UnshavenBastard
One thing he said, which I just remember, is:
" ''facts'' can''t be simple enough for marketing "

Translated to "if we can put a larger number on the box, people will think it''s better." That actually goes against your argument



quote:Original post by UnshavenBastard
A little known aspect of Nyquist theory is that integration over all samples is required to produce the original waveform. The Nyquist frequency is an asymptotic limit, which
is approached, but never reached."


Which is reconstruction. Did you even read all the way through my post? You didn''t, did you... it''s exactly this part that leads to the quality of the reconstruction filters. An infinite filter is impossible, so it all depends on how large (and accurate) the reconstruction filter is. The higher the sampling rate, the less sensitive the process is to errors within a fixed bound.

It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.

This topic is closed to new replies.

Advertisement