Friday, 26 October 2012

Week 6 - Audio Signal Processing

Applying the compression effect to the audio piece caused a reduce dynamic range, producing consistent volume levels and increasing perceived loudness.

Compression is particularly effective for voice-overs, because it helps the speaker stand out over musical soundtracks and background audio.


Some info I found on helping remember what each setting does:


Standard settings

Amount  
Controls the level of compression.

Advanced settings

Threshold  
Sets the input level at which compression begins. The best setting depends on audio content and style. To compress only extreme peaks and retain more dynamic range, try thresholds around 5 dB below the peak input level. To highly compress audio and greatly reduce dynamic range, try settings around 15 dB below the peak input level.
Ratio  
Sets a compression ratio between 1‑to‑1 and 30‑to‑1. For example, a setting of 3 outputs 1 dB for every 3-dB increase above the threshold. Typical settings range from 2 to 5; higher settings produce the extremely compressed sound often heard in pop music.
Attack  
Determines how quickly compression starts after audio exceeds the Threshold setting. The default, 10 milliseconds, works well for a wide range of source material. Use faster settings only for audio with quick transients, such as percussion recordings.
Release  
Determines how quickly compression stops when audio drops below the Threshold setting. The default, 100 milliseconds, works well for a wide range of audio. Try faster settings for audio with fast transients, and slower settings for less percussive audio.
Output Gain  
Boosts or cuts amplitude after compression. Possible values range from ‑30 dB to +30 dB, where 0 is unity gain.


Ambient Sound and Reverb:

The 'reverb' you hear on records is sometimes the result of ambient miking techniques, rather than artificial reverb. Opening the doors of a studio and placing ambient mics in hallways or adjacent spaces, as described by producer Ben Hillier, seems to be a popular technique.


Friday, 19 October 2012

The Ear and Hearing


The Outer Ear
The external ear (pinna) and the ear canal act as a guide, directing sound waves that vibrate the ear drum. The acoustic transfer functions formed by the shape, size and position of the head and pinna also provide information on the relative direction of the sound source. The roughly horn shape of the pinna and ear canal create an acoustic transfer function which is directionally sensitive and also amplifies sound at certain frequencies e.g. 10 dB to 20 dB gain around 2.5 kHz.

The Middle Ear
The vibration of the eardrum is transferred through the chain of small bones (
ossicles) in the middle ear that in turn vibrate the oval window of the cochlea.  This impedance matching chain of transmission acts to reduce power loss as the air-borne vibrations are transferred to the fluid medium in the cochlea. Excessive movement of the ossicles is constrained by a neuro-muscular feedback mechanism that acts to prevent damage due to loud sounds.

The Inner Ear
Vibration of the oval window produces pressure waves in the cochlear fluid that stimulate cochlear structures that perform a spectral analysis. Sensor "hair" cells within the cochlea cause neurons connected to the auditory nerve to "fire”. They transmit timing, amplitude and frequency information to the auditory brain stem where a hierarchy of neural processing commences.

Human Hearing and Speech
Human hearing covers a range of frequencies from about 20 Hz to 20 kHz and can respond to an enormous range of sound levels.
Within this range are those frequencies and levels generated by conversational speech. A rough guide to the separation in frequency and level between vowel sounds and consonants is shown.
The lowest sound pressure level (SPL) that humans can hear varies with frequency and is called the Hearing Threshold.
Greatest sensitivity is normally in the frequency range 1 kHz to 4 kHz.

MPEG/MP3 Audio Coding
The use in MP3 of a lossy compression algorithm is designed to greatly reduce the amount of data required to represent the audio recording and still sound like a faithful reproduction of the original uncompressed audio for most listeners. An MP3 file that is created using the setting of 128 kbit/s will result in a file that is about 11 times smaller than the CD file created from the original audio source. An MP3 file can also be constructed at higher or lower bit rates, with higher or lower resulting quality.
The compression works by reducing accuracy of certain parts of sound that are considered to be beyond the auditory resolution ability of most people. This method is commonly referred to as perceptual coding. It uses psychoacoustic models to discard or reduce precision of components less audible to human hearing, and then records the remaining information in an efficient manner.






Friday, 12 October 2012

Digital Signal Processing - Lab 2 Video

A Typical Digital Signal Processing System




Signal processing is an area of systems engineering, electrical engineering and applied mathematics that deals with operations on or analysis of signals, in either discrete or continuous time, to perform useful operations on those signals. Signals of interest can include sound, images. Signals are analog or digital electrical representations of time-varying or spatial-varying physical quantities.

Electronic filters are electronic circuits which perform signal processing functions, specifically to remove unwanted frequency components from the signal, to enhance wanted ones, or both. Electronic filters can be:

1) passive or active

A passive component, depending on field, may be either a component that consumes (but does not produce) energy, or a component that is incapable of power gain .

An active filter is a type of analog electronic filter, distinguished by the use of one or more active components i.e. voltage amplifiers or buffer amplifiers. Typically this will be a vacuum tube, or solid-state (transistor or operational amplifier).

2) analog or digital

3) high-pass, low-pass, bandpass, band-reject (band reject; notch), or all-pass.

A high-pass filter (HPF) is a device that passes high frequencies and attenuates (i.e., reduces the amplitude of) frequencies lower than its cutoff frequency. A high-pass filter is usually modeled as a linear time-invariant system.
High-pass filters have many uses, such as blocking DC from circuitry sensitive to non-zero average voltages or RF devices. They can also be used in conjunction with a low-pass filter to make a bandpass filter. The actual amount of attenuation for each frequency is a design parameter of the filter.
A low-pass filter is an electronic filter that passes low-frequency signals but attenuates (reduces the amplitude of) signals with frequencies higher than the cutoff frequency. The actual amount of attenuation for each frequency varies from filter to filter. It is sometimes called a high-cut filter, or treble cut filter when used in audio applications. A low-pass filter is the opposite of a high-pass filter.
A band-pass filter is a combination of a low-pass and a high-pass.
Low-pass filters exist in many different forms, including electronic circuits (such as a hiss filter used in audio), anti-aliasing filters for conditioning signals prior to analog-to-digital conversion, digital filters for smoothing sets of data, acoustic barriers, blurring of images, and so on. Low-pass filters provide a smoother form of a signal, removing the short-term fluctuations, and leaving the longer-term trend.
In signal processing, a band-stop filter or band-rejection filter is a filter that passes most frequencies unaltered, but attenuates those in a specific range to very low levels. It is the opposite of a band-pass filter. A notch filter is a band-stop filter with a narrow stopband (high Q factor).

4) discrete-time (sampled) or continuous-time

5) linear or non-linear

6) infinite impulse response (IIR type) or finite impulse response (FIR type)
Infinite impulse response (IIR) is a property of signal processing systems. Systems with this property are known as IIR systems or, when dealing with filter systems, as IIR filters. IIR systems have an impulse response function that is non-zero over an infinite length of time. This is in contrast to finite impulse response (FIR) filters, which have fixed-duration impulse responses. The simplest analog IIR filter is an RC filter made up of a single resistor (R) feeding into a node shared with a single capacitor (C). This filter has an exponential impulse response characterized by an RC time constant.
IIR filters may be implemented as either analog or digital filters. In digital IIR filters, the output feedback is immediately apparent in the equations defining the output.

The most common types of electronic filters are linear filters, regardless of other aspects of their design. See the article on linear filters for details on their design and analysis.

Pitch is an auditory perceptual property that allows the ordering of sounds on a frequency-related scale. Pitches are compared as "higher" and "lower" in the sense associated with musical melodies, which require "sound whose frequency is clear and stable enough to be heard as not noise". Pitch is a major auditory attribute of musical tones, along with duration, loudness, and timbre.


DSP System Needs

Input and output filtering
Analogue to digital, and digital to analogue conversion
Digital Processing Unit


Why Use Digital Processing?

1) Precision - In theory the precision of Digital Signal Processing systems is limited only by the conversion process at input and output.
In practice, sampling rate (sampling frequency) and word length restrictions (number of bits) modify this.
However the increasing operating speed and word length of modern digital logic is allowing many more areas  of application.

2) Robustness - Due to logic noise margins, digital systems are inherently less susceptible than analogue systems to: a) electrical noise and b) component tolerance variations.
Adjustments for electrical drift and component ageing are essentially removed; importnat for complex system.

3) Flexibility - Programmability allows upgrading and expansion of the processing operations, without necessarily incurring large scale hardware changes. Practical systems with desired Time Varying and/or Adaptive characteristics can be constructed.

Simple Sound Card Architecture



Sampling a Signal





Friday, 5 October 2012

Week 2 - Getting familiar with waves


Q1 In a recording room an acoustic wave was measured to have a frequency of 1KHz. What would its wavelength in cm be?
Answer: The sound will be traveling through air so the velocity of sound will be 340m/s. To get the wavelength, the velocity 340m/s needs to be divided by the frequency of the wave which is 1000Hz. This gives the answer of 34cm.

Q2 If an acoustic wave is traveling along a work bench has a wavelength of 3.33m what will its frequency be? Why do you suppose that is it easier for this type if wave to be travel through solid materials?
Answer: The velocity of the sound through the bench is about  4000m/s. To get the frequency, the velocity 4000m/s needs to be divided by the wavelength of 3.33m. Its frequency then is 1.2KHz.

Q3 Research the topic “Standing Waves”. Write a detailed note explaining the term and give an example of this that occurs in real life. (Where possible draw diagrams and describe what represent)
Answer: A standing wave is a wave that resonates up and down but does not actually move. An example of this in real life would be the string on a guitar. When you pluck it, the string moves up and down but it is not travelling along the guitar.

Q4 What is meant by terms constructive and destructive interference?
Answer: Constructive interference occurs when the crest of one wave overlaps the crest of another to combine and produce a wave of increased amplitude, whereas destructive interference occurs when the crest of one wave overlaps the trough of another and no change occurs.

Q5 What aspect of an acoustic wave determines its loudness?
Answer: The higher the amplitude the louder the sound will be.

Q6 Why are decibels used in the measurement of relative loudness of acoustics waves?
Answer: Decibels are used because it is a logarithmic measurement that reflects the range of sound intensity our ears can perceive and closely correlates to the function of our ears and our perception of loudness.

Q7 Does sound travel under water? If so what effect does the water have?
Answer: Sound does travel under water. Sound in water travels faster than in air because water particles are closer together than in air so the vibrations will happen quicker thus the sound will travel faster.