Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read

WON'T YOU JOIN US?
You are not a registered member and
are viewing this site as a guest.
Registration is simple and FREE.
Join this CrowdGather community today.
Registration offers the following perks:

» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging

join

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old November 25th, 2011, 23:31   #10
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
Quote:
Originally Posted by tykel View Post
I think it looks good. Once there is a consensus I will be able to add it to the next revision of the spec, along with PAL.
Just clarify one thing for me, what is the frequency for? How does it differ from the sample rate?
Ok, the frequency of the sound is like the musical note you can hear like when you play middle C on a piano for example, and it is how many cycles a sound wave goes trough each second and is measured in Hertz (Hz).

Here is a table of musical note frequencies:
http://www.phy.mtu.edu/~suits/notefreqs.html

and here is some ASCII art I created to try and explain it better:

Code:
volume  +1      |--------|
                |        |
                |        |
                |        |
        0                |        |
                         |        |
                         |        |
volume  -1               |--------|


                0                 1 second

                <----------------->
                       time
A frequency of 1Hz means the waveform does one full cycle (as above) in 1 second time period.

It is entirely possible for the waveform to have more cycles per second (> 1Hz), or less cycles per second (< 1Hz).

So a waveform with a frequency of 120.5Hz means it 'fits' 120.5 full cycles of itself in a 1 second time period.

Now, the sample rate is how many samples, or discrete parts of an analog signal, is read per second to re-create a digital version of the original analog signal.

So the more samples per second (Hz) you have when sampling an analog signal, the better, or smoother the reproduction is (and better sound quality). The downside is that it takes more memory (or disk space) to store that sound because of more samples per second.

But that is not an issue for us as we are only playing it in memory and it won't hang around very long.

See here for a good description of sampling rate:
http://en.wikipedia.org/wiki/Sampling_rate

Does this help a bit?

cheers,
Paul
paul_nicholls is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 09:36.

© 2006 - 2012 Emu Forums | About Emu Forums | Advertisers | Investors | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.