Monday, 17 December 2012

Video Editing


This is the video I made to do a bit of video and sound editing, hope you enjoy

Digital Image Processing


Digital Image Processing


Digital processing has a lot of great uses that have helped with problems caused before the invention of things like a digital camera.

Moving on to digital was very helpful as it was the end of Darkrooms in everyday pictures. A darkroom was home to a very lengthy process in developing pictures. 
Because of digital pictures now anyone can take photos and receive them with ease.

Digital images have also made it much easier to manipulate images. Instead of putting filters over the camera lens or making sure you've got exactly what you want in the picture and nothing around the edges but with digital images this can all be done with a few simple clicks. 





Wednesday, 12 December 2012

Harmonics






Harmonics

This post will take a look at the use of harmonics. 

A harmonic of a wave is a component frequency of the signal that is an integer multiple of the fundamental frequency (http://en.wikipedia.org/wiki/Harmonic)

These screen show the addition of harmonics on a basic sine wave along with the formula to be written to add the harmonics to the wave.

This is the original sine wave


This is what the sine wave looks like when its 3rd harmonic has been added.

The sine wave with 3rd and 5th harmonics

This is what the expression looks like for a sine wave with 3rd and 5th harmonics


This is as the wave progresses into 3rd, 5th and 7th harmonics

 Expression used to add 3rd, 5th and 7th harmonics



The final wave with 3rd, 5th, 7th and now 9th harmonics


The expression with the 9th harmonic added

As you can see the wave is slowly approaching a square wave more and more with each harmonic


The Human Ear

The Human Ear

As a blog about Audio, Image and Video processing a post must be included about the human ear, the way we all hear the sounds mentioned in this blog. I will explain different parts of the ear and how they work in slight detail.


Outer ear

The outer ear is the part of the ear you can see, it is designed to funnel the sound into the ear canal that carries the sound to the middle ear. The shape of the ear is designed on purpose to get as much sound into your ear, increasing the effectiveness of human hearing.

Middle Ear

The sound after traveling down the ear canal hits the ear drum which is a very thin membrane. The ear drum is so thin that loud enough noises can burst it. The ear drum vibrating causes a small bone called the hammer, one of three small bones in the ear, to vibrate accordingly passing the vibration onto the anvil and then the stirrup. 

Inner Ear

The stirrup passes the vibration to the Choclea that is the start of the inner ear. The choclea is a liquid filled sack shaped like a shell which is full of tiny little cells attached to nerve fibers which transmits the signals through to the brain which is then interpreted as sound.



Digital Signal Processing

Digital Signal Processing


This post is about storing sound waves in a digital way.

To convert an analogue sound wave into a digital one is must pass through a digital signal processing system, this puts the sound through a filter to remove unwanted frequencies and then it is converted from analogue to digital. You can then process the signal as you wish using certain operations such as filters etc. To then listen to the sound it must be passed through a converter changing it back to analogue then another filter which brings it back to an analogue sound for the human ear.











There are some advantages and some down sides to converting an analogue signal to a digital one.

This link will take you to a page giving you a list of all the pros and cons http://www.planetoftunes.com/digiaudio/pros_cons.html

I will first explain one of the downsides to the conversion which is the sample rate.

Converting to digital is a complex process as a sound wave is a flowing curve but to get the signal in a digital way you have to choose a sample rate, which means for every time it takes a sample it will take the point it is at in the curve. after collecting all the points it will use them to make a line that resembles a curve

This means that the signal will lose detail unless you increase the sample rate but the more you increase the sample rate the larger the size of the digital file.

In this image example the top file would be much larger in size than the one at the bottom.

Yet one advantage to digital signals is they are extremely easy to alter. As the signal basically becomes a line of code meaning you can change almost everything about the file with a program such as the pitch. This would be a lot harder to do on an analogue signal.

Thursday, 4 October 2012

Getting familiar with waves



Wavelength is dependant on the velocity and frequency of the sound. You can figure out a wave length by dividing the velocity by the frequency.  At the normal speed of sound through air and at a frequency of 1KHz the wave length will be 0.333m roughly the length of a standard ruler. But if you increase the frequency the wave length will get shorter, so doubling the frequency to 2KHz means the wave length drops to 0.1665m about half the size from before, and if you half the frequency to 500Hz the wave length will double up to 0.666m. The relation between frequency and wavelength is linear in air.

Frequency is used in many different ways when working with sound, for example there is a concert pitch which is a generic frequency used to tune concert instruments. The tuning instrument will play an A note at a frequency of 440Hz, this is the standard frequency but it can also be tuned to 442 or 443 depending on the what was chosen for the piece, a sound at this frequency though will have a wave length of 0.757m.

Acoustic waves traveling through a solid object find it easier at a lower frequency than I higher frequency, this is because at a higher frequency the wavelength is smaller and the material it is passing through is likely to have within its structure parts roughly the same size as the wave length which means the wave is more likely to reflect inside the object and travel less far. The lower the frequency though the larger the wavelength which isn’t hindered by the material it is passing through and is carried further along the material ending in a better sound.

A standing wave is a wave that doesn’t move in a direction yet the wave still pulses up and down. This can occur when two waves of the same frequency and intensity going opposite directions meet. This can also happen when a wave is confined within boundaries, an example can be the string on a violin or a guitar, the string is held in place but can still move up and down to create the sound. Because there is no velocity the wave is standing.

Constructive interference is an even that occurs when two waves of the same frequency are travelling in the same direction. If you add the two waves together you get a wave that is the same as the two waves before but with a larger amplitude.

Destructive interference is when two waves of the same frequency are travelling in the same direction but the waves are identical in placement. The waves join together with an up wave meeting a down wave and they cancel each other out, the two waves becoming nothing.


The reason Decibels are use to measure the volume of sound is because  the loudness climbs at such a large rate that the numbers would be too large and inconvenient, because decibels work in a logarithmic way the difference in loudness can be expressed with a smaller number. For example 0 decibels (dB) is a value of one in loudness.  10 dB has a value of 10 in power, yet 20 dB has climbed to 100. If you go up to 100 dB you are looking at 10000000000. The scale is used to you can accurately measure the increase in volume of a sound as it is much easier to use a number with 3 digits than 11.

A sound with a frequency of 1KHz will take exactly the same amount of time to travel a distance of 20m as a sound with 10KHz or 20KHz, all of them would take 0.06 seconds to reach 20m.

Sound is known to travel underwater at an even faster speed than it does through air but this isn’t the only difference between the two. For example the human ear underwater finds it harder to hear the sounds made, it requires a higher frequency or loud volume to be heard. The reason sound travels faster through water than air is because the molecules in water are much closer together than in air so the vibration passes through much faster. An interesting fact is that salt water carries sound faster than fresh water does. This is because the increase in salt molecules in the water give more particles to vibrate off increasing the speed.

Thursday, 27 September 2012

Lecture 1 Sound - Volume

Decibel
A decibel is a measurement of volume. That starts at 0 which is sound that can barely be heard and goes up in levels of 10, so 10 decibels is 10 times the start level, 20 is 10 times 10 decibels so 100 times the start, 30 is 10 times more so is 1000 times the original level. Which caps off for the human ear at about 120 decibels before your ear drum can take no more and can break if pushed high enough.



The Inverse-square law

"The intensity of the sound received varies inversely as the square of the distance R from the source i.e. as 1/R²" 
Traveling through air sound decays, so if the person or microphone receiving the sound was 3 meters away from the source it would be nine times less intense than if  it was 1 meter away from the source.
So if the person was 6 meters away from the source it would be 1/6² - 1/36th of the intensity from 1m.

Though this doesn't always happen in rooms and so on because of surfaces that reflect sound. This is why we have Echos and reverberations. The difference between these is if a sound comes back in under 100ms the brain cant destinguish it as a different sound and it adds on to the sound you've already heard making it a richer sound overall but if the delay is over 100ms the brain hears 2 seperate noises and it is heard as an echo.

Though reflection of sound can be completely removed in an Acoustic Anechoic Chamber.
The chamber is made up of walls normally out of foam and in shaped that deflect the sound instead of sending it back towards the source. These are useful tool for sound recording as it removes all reverberations or echo's.

Lecture 1 Sound - Movement

The velocity of sound changes depending on what the sound is moving through, The standard for sound to move through air is 333m/s which is roughly 700mph but sound moves much faster through water at 1500m/s and even faster through steel 5000m/s. So sound traveling through air down the length of a football pitch (120m) would take : 120/333s - 0.36s. It would take around a third of a second for the sound to make it down the whole pitch. If the pitch was full of water it would take even less time: 120/1500s - 0.08s.

The frequency of a wave is the number of complete cycles per second and this is measures in Hertz (Hz).

The velocity of a wave length can be figured out by multiplying the wavelength by the frequency.

V= λ x f  m/s  , this equation can shuffled round to work out different parts. It can be used to find the wavelength by changing it round to  λ= v/f m . 

So a 1kHz tone in air has a wavelength, 
l = v/f m 
= 333/1000 m 
= 0.333 m 


 Harmonics


Sound is made up of vibrations, there is the main vibration which is the fundamental tone and other vibrations are the harmonic tones. 
" A harmonic is an integer multiple of the fundamental frequency e.g. 2 x fundamental, 3 x fundamental, etc. 
So a sound consisting of components at frequencies of 1000 Hz and 3000 Hz would contain a 3rd harmonic of the 1 kHz fundamental. 
 "

Lecture 1 Sound - Waves


Sounds exist in this world as a wave, that passes as a motion through different mediums. The waves are split into two different types, Transverse and Longitudinal.

A transverse wave is a wave that moves up and down at a right angle to the direction of the particles, carrying the energy along the path from its source.



A longitudinal wave of the other hand is a vibration that moves parallel to the direction of motion. This kind of wave is the wave that is found in the travel of sound. 

The molecules don't move along the path instead they pass the energy onto a neighbouring molecule and so on, until the energy reaches the end. An example of the transfer of energy is the Newton's cradle.

This means sound waves are made up of a series of alternate compressions and rarefactions which are an increase and decrease in density in the medium the sound is traveling through.

Both the waves can be measured with wavelength and amplitude. The wavelength is, in the case of a transverse wave, the distance between the waves and for longitudinal waves it is the distance between two peak compression. The change in wavelength is what accounts for different pitch. If the sound is of a high pitch the wave length will be shorter between waves and at a lower pitch the wavelength will be longer.