merlin_1102 wrote:Is the sample rate simply how many points it takes in a given second.
merlin_1102 wrote:E.g. 44100 is how many points along lets say a sine wave would be taken in a given second of the sine waves life? So in theory, if I had a sine wave with a frequency of '44100' , then it would be sampled 44100 times exactly.
Hmm, no. I think you are making it too complicated.
If you have 1 second (duration) of sound (any sound) and it has been recorded with a sampling rate of 44100Hz, then there will be 44100 samples. The "44100Hz" means the frequency at which samples are taken - in other words, it is the number of samples per second
2 seconds at 22050Hz is 2x22050 samples = 44100 samples
1 second at 48000Hz (48kHz) is 48000 samples
(Sample Rate) = (Number of samples) per second
(Number of samples) = (Sample Rate) x time
merlin_1102 wrote:If I were to generate a sine wave at 200Hz then it would be sampled a total of (44100*220.5) times (math below).
1/200Hz = period 0.005
1/44100 = 0.000022676
(0.005/0.000022676) = 220.5
Yes, but that seems a complicated way of saying that the number of samples in a 1/200 second period will be:
44100 x (1/200)
(sample rate) x time
merlin_1102 wrote:I guess I am confused as to why my audio sample grew
It didn't exactly "grow" - it got "stretched".
At 44100Hz, there is one new sample every 1/44100th of a second
but at 22050Hz there is a new sample every 1/22050th of a second.
The samples have been spaced out over twice the length of time.
merlin_1102 wrote:what would happen if I were to generate a sine wave of 88000 and only want a single sample at 44100.
You can't generate a tone of 88000 Hz if you are using a sample rate of 44100Hz.
The highest theoretical frequency that you can have, is less than half of the sampling frequency. If you think about it, to represent a waveform you need to have at least 2 samples per period (which would give a very rough indication of the signal), so at a sample rate of 44100Hz, the highest possible frequency that can be represented is less than 22050Hz. This is known as the Nyquist frequency: http://en.wikipedia.org/wiki/Nyquist_frequency