* While you are supposed to have knowledge of trigonometry and complex numbers and equations to understand this subject, i’ll do my best to try and make a brief introduction for those who dont.
http://math.tutorvista.com/trigonometry/sine-curve.html
“ What is sound ?! "
Wikipedia (1) says that “Sound is a mechanical wave that is an oscillation of pressure transmitted through a solid, liquid, or gas, composed of frequencies within the range of hearing.”
But we also know that we, humans, can only perceive a certain range of frequencies. To quote : “ The perception of sound in any organism is limited to a certain range of frequencies. For humans, hearing is normally limited to frequencies between about 20 Hz and 20,000 Hz (20 kHz), although these limits are not definite. The upper limit generally decreases with age.”.That gives us a limit to where concentrate our efforts regarding creating sounds, between ( at least) 20 Hz and 20,000 Hz. To be more realistical, not many people can hear above 16 kHz.
* Quote: “ The hertz (symbol Hz) is the SI unit of frequency defined as the number of cycles per second of a periodic phenomenon.”(2)
One of the basic sounds we get is a Sine Wave .
The sine wave is important because is it acoustically unique; it retains its waveshape when added to another sine wave of the same frequency and arbitrary phase and magnitude. It is the only periodic waveform that has this property.
This property leads to its importance in Fourier analysis . (3)
The mathmatical equation to translate a sinewave is
y(t) = A sin (2π f t + φ ) = A sin(ω + φ)
where:
In general, a sine wave is given by the formula
A - .Amplitude is defined as the maximum displacement ( peak deviation) of the function from it's centre position (or zero). It can also be seen as half the distance between the maximum and minimum values of a function. The amplitude of a sine curve is 1.
f - the ordinary frequency, is the number of oscillations (cycles) that occur each second of time.
ω = 2πf - the angular frequency, is the rate of change of the function argument in units of radians per secondHere we will use a floating point
φ - the phase, specifies (in radians) where in its cycle the oscillation is at t = 0.
When φ is non-zero, the entire waveform appears to be shifted in time by the amount φ / ω seconds. A negative value represents a delay, and a positive value represents an advance.
Discrete Time Fourier Transform converts signal from time domain to frequency domain.
Freq =1/Period
Period measured in Seconds (Continuous time)or samples(Discrete time)
Frequency measured in Radians/time or Cycles/time
Plotting Complex Sinusoids as Circular Motion
Euler's relation graphically as it applies to sinusoids. A point travelling with uniform velocity around a circle with radius 1 may be represented by
e is Euler's number, the base of natural logarithms,
i is the imaginary unit, which satisfies i2 = −1, and
π is pi, the ratio of the circumference of a circle to its diameter.
** eiφ = cos(φ) + i*sin(φ) **
** eψt=eψft **
in the complex plane, where:
t is time and is the number of revolutions per second.e is Euler's number, the base of natural logarithms,
i is the imaginary unit, which satisfies i2 = −1, and
π is pi, the ratio of the circumference of a circle to its diameter.
** Discrete Computational Methods **
The three options for generating/Sample the discrete sinusoid signals are :** Table Lookup
The table look-up method pre-computes the unique samples of every outputsinusoid at the start of the simulation, and recalls the samples from
memory as needed. Because a table of finite length can only be constructed
if all output sequences repeat, the method requires that the period of
every sinusoid in the output be evenly divisible by the sample period.
That is, 1/(fiTs) = ki must be an integer value for every channel i = 1, 2, ..., N.
The table that is constructed for each channel contains ki elements.
For long output sequences, the table look-up method requires far fewer floating-point operations than any of the other methods, but may demand considerably more memory, especially for high sample rates (long tables).
This is the recommended method for models that are intended to emulate or generate code for DSP hardware, and that therefore need to be optimized for execution speed.
** Differential
The differential method uses an incremental (differential) algorithm rather than one based on absolute time.This mode offers reduced computational load, but is subject to drift over time due to cumulative quantization error.
Because the method is not contingent on an absolute time value, there is no danger of discontinuity during extended operations (when an absolute time variable might overflow).
** Trigonometric Fcn
If the period of every sinusoid in the output is evenly divisible by the sample period, meaning that1/(fiTs) = ki is an integer for every output yi, then the sinusoidal output in the ith channel is a repeating sequence with a period of ki samples. At each sample time, the block evaluates the sine function at the appropriate time value within the first cycle of the sinusoid. By constraining trigonometric evaluations to the first cycle of each sinusoid, the block avoids the imprecision of computing the sine of very large numbers, and eliminates the possibility of discontinuity during extended operations (when an absolute time variable might overflow). This method therefore avoids the memory demands of the table look-up method at the expense of many more floating-point operations.
(1) http://en.wikipedia.org/wiki/Sound
(2) http://en.wikipedia.org/wiki/Sound_frequency
(3) http://en.wikipedia.org/wiki/Sine_wave
(4) https://ccrma.stanford.edu/~jos/Welcome.html
(5) http://lionel.cordesses.free.fr/gpages/DDS1.pdf
(6) http://www.youtube.com/watch?v=fCAZ7jcO-vc
No comments:
Post a Comment
Feel free to contact me with any suggestions, doubts or requests.
Bless