Wednesday, 22 October 2014

Week 5: Audio Lab 3

Week 5: Audio Lab
Combining a number of audio tracks to a single audio master file


Mixing a Music Session

Task 1 - In Audacity open and listen to the file OriginalJingleMix.wav. How many different types of sound can you hear? Can you name the instruments or other sound sources?

Drums, Bass Guitar, Keyboard, Vocals, Guitar and a Gong. I can hear 7 possibly more sounds but these are the instruments/sound sources I can name.

Task 2 - Session musicians recorded each of these tracks. Listen to each instrument track individually. Makes notes on the quality of each sound. Quality of sound is very subjective. Use any adjective that you feel is appropriate to describe each sound. Eg, Does the bass sound smooth or punchy? Is the guitar jangly or distorted? How loud does each track sound in relation to one-another?

Rickenbacker Bass - One of the quieter instruments used here. The quality of this sound is particularly good, more punchy than the other bass track.
SweepBass - Starts of fairly quiet before getting gradually louder. Not as good a quality as the Rickenbacker but still fairly decent. More of bouncy than the other bass, somewhat distorted.
TimpAndPiano - Initial drums fairly loud and the piano portion is particularly clear and loud too. Overall decent quality between each instrument, slightly better for the piano.
CEPVoices - Smooth sound, arguably one of the loudest pieces here. Noticeable fade out near the end. Clear and easy to understand voices, all harmonious together.
DLoopandAnnouncer - Quieter drum loop than before but a bit of a clearer sound, sudden cut off followed by the announcer, a similar note to the above voices. Very loud, and quite clear.
DopeOrgan - One of the more noticeable tracks, louder than the basses but more quiet than the voices. Sounds somewhat distorted as well. Decent quality though.
Drums1 - Again one of the louder tracks. Much clearer and more precise than any of the previous instruments with a clear and loud cymbal smash at the end. Possibly the loudest track.
FunkGuitar - Very much a jangly track. Moderate volume compared to the bass lines and some obvious distortion but overall a clear good-quality track.


Task 3 - Look at each track in the time domain and frequency domain and make note of any distinct features. Eg, what time does each sound event occur, loudness in dB, duration, envelope shape. What frequencies does it tend to occupy. How do these features inform your own personal impression of the sound as you hear it.

Rickenbacker Bass - Starts at the beginning of the track. Hits a height of -24dB. Sudden breaks in the waveform inbetween the bass strings being struck.  Hits frequencies of slightly above 5000Hz.
SweepBass - Starts at the beginning of the track. Hits a height of -24dB. Wave form seems to be fairly constant with a few breaks and deeper troughs as opposed to crests. Hits frequencies 5000Hz.
TimpAndPiano - Starts at the beginning of the track and fades out around 5 seconds in. Hits a height of around -36dB and has a fairly low frequency waveform. Frequency hits over 5000Hz.
CEPVoices - Starts at around 5-6 seconds in and fades out around 13 seconds. Decibel level of around -24dB and frequencies of over 20000Hz. Solid waveform with little breaks and a relatively high amplitude.
DLoopandAnnouncer - The first part of this track starts around 2-3 seconds in and stops at around 5 seconds. The second half comes in at 12 seconds and fades out at 15. Around -27dB and over 20000Hz and features two distinctly different waveforms. On which appears to be a solid pattern of low amplitude followed by one large burst and the other a more messy waveform.
DopeOrgan - Starts at around 2 seconds in and ends at around 11. About -36dB and 10000Hz, Features compressed parts of a waveform followed by small short bursts. This pattern is a constant through the track.
Drums1 - Starts at the beginning of the track. Another patterned waveform of high amp followed by low amp. Noticeably the highest amplitude of any track. -27dB and over 20000Hz, The last part of the track breaks from the pattern and becomes one solid compressed waveform lasting around 4 seconds.
FunkGuitar - Starts around half a second into the track and continues on until 14 seconds as a compressed parts as each string is struck. -39dB and over 5000Hz with a small spike at around 7500Hz.

Task 4 - Use the mix feature of Audacity for each track to create the final mix for this jingle. Be sure to use control-A to select all of each wav before mixing to the waveform mix waveform. Check that the waveform sounds as expected. (It should be identical to the OriginalJingleMix track)

The waveform does sound as expected. Identical to the the OriginalJingleMix track,



Creating your own version of the mix

Using the previously explored features of Audacity, modify the component wav files before mix to produce a new style of mix…

1. Make the Bass Guitar less prominent, Make the guitar sound smoother and Make the whole mix sound as if it was recorded in a large room.

In order to make both Bass Guitars less prominent I simply used the amplify effect and reversed it, essentially making the tracks quieter than they already were. The reverse was used for the guitar, I made it louder and changed it's pitch to make it a little less high and clangy. sounding. For the large room recording effect I used reverb and set the room size to 100%.



2. Make a special mix to your own taste, you may edit each individual track before mixing as many time as you feel necessary experimentation is the key here. You can even record you own tracks if you wish or add wavs obtained from freesound.org in the mix.



Matching an audio track to video events

In the early days this was called “Mickey mousing” where an organist in the cinema would improvise sounds to match the events taking place in cartoons and movies. This aimed to create a sense of drama, suspense, excitement and surprise in the mind of the viewer. We can do the same with video computer games or animation. Open the OldMovie file using Microsoft Movie Maker. Watch the film many times and make a note of any events that you consider important. When do they start when do they stop? Are they sudden or gradual?

The opening title card is obviously important. The arrival of a first map over the swing. This is followed by a second man taking off from the side he just landed on. Next in two different scenes two men arrive from the direction the initial man came from. Following the second one of these the screen fades and the closing title card is shown.

For my track I make use of a constant ragtime guitar riff, shorted to fit the video, that plays throughout the movie. Each time a person swings in our out one of three different audience cheer tracks plays. The track normally fades out as the person comes to a halt and becomes louder as the approach the area over the chasm. Another track is used to act as a sort of sound for the zipline as each person once more comes in and out.

Wednesday, 15 October 2014

Week 4: Audio Lab 2

Week 4: Audio Lab 2


1.      Run Audacity. Select Tracks-> Add New-> Audio Track which as you can see has defaults setting of MONO, Sampling Rate 44100Hz, 32 bit float. Click on the inverted triangle on the audio track to change the setting to 16 bit PCM What do each of these setting mean? (Research , discuss with your tutor and answer in your note)
MONO is single channel sound reproduction. This means that there is typically only one speaker, microphone or channels that are fed from a common signal path.
Sampling Rate is the conversion of a sound wave to a sequence of samples. A sample being a set of values linked into the sound wave.
PCM or Pulse Code Modulation is a method in which audio is converted into binary numbers, be it 16 or 24 bits or 32 bit float. By converting the audio into binary it can be represented digitally and then back into audio. Using PCM the waveform is measured at evenly spaced intervals and then amplitude is also noted for each of these measurements.

2.      Use Audacity Help at any time.
3.      Use the Generate->Tone option to generate 1 second of a sinusoid (single pure tone) of frequency 440 Hz at  amplitude 1, mono, 16bit, sample rate (frequency) 44100 kHz. Save the pure tone as a *.wav file in C:\TEMP or on your pen drive if you have one.

4.      By using the same option, create similar tracks for each of the harmonics up to and including the 9th in the proportions shown below. Add the fundamental and each of the harmonics to each other by selecting all waves (CTRL A) and pressing CTRL SHIFT M. Sketch or cut and paste the result into your lab document and describe what you see.
Harmonic
Number
1
2
3
4
5
6
7
8
9
Amplitude relative to Fundamental
Let it be x
1
0
1/3
0
1/5
0
1/7
0
1/9
Amplitude in dB
20 log x
0
0
-9.54
0
-13.98
0
-16.90
0
-19.10


Above are five screen captures of generated tones in audacity. The first of the five is the track for the fundamental. The next four are the fundamental being merged with first the third harmonic, then the third and fifth and so on and so fourth. As the harmonics for each track increase the wavelength decreases and the amplitude for each track also decreases. The general shape of the waveform is moving towards square in style but more so when all five are merged together. The first track is quite deep in sound. The second is a higher pitch and this trend continues. The merge track however shares most similarities with the first track (1st harmonic/100Hz). From this I can tell that the smaller wavelength means a higher pitch for the sound and the amplitude of each track obviously determines the volume.

5.      What shape is the waveform gradually approaching? Listen to the wave as you add more harmonics. Does the timbre change?

See Above.

6.      Similarly to the previous lab view the frequency content (Magnitude Spectrum) of the waveform using the Analyse->Plot Spectrum option. Compare the peaks in this display with the fundamental and the harmonics you have added to it. Sketch or cut and paste the spectrum in your lab note and describe it.






     The first image is the Freqency Analysis of the Fundamental in this case. The second image is of the fundamental and the third harmonic, the third is the fundamental plus the third and fifth and so on and so fourth again. As you can see with the addition of each harmonic the peak for each harmonic is lower than that of the previous harmonic or fundamental. The Fundamental hits 0dB and 2000Hz. The merge of the fundamental and third harmonic hits almost 3000Hz and just below -12dB for the harmonic. This pattern continues throughout the images. 


7.      Now view the Spectrogram of the waveform using the audio track triangle and selecting spectrum setting. Describe and sketch this result in your note. Save the final waveform as a *.wav file in C:\TEMP. Listen to the waveform and compare it with the sound of the original pure tone sinusoid.

Spectogram shows intensity by colour or brightness on the axis of frequency and time. The mixed track has a much higher pitch than the original pure tone. As you can see below the amplitude is displayed in the blue colour meaning that it is much less intense as the harmonics are added to the mix. Each track can be seen seperatly in the mixes in the form of the bright white lines meaning that their much more intense. The frequency also climbs as the harmonics are added as you can see the left axis for the first image says 0K and the final mix hits a high of 5K.
























8.      Now start afresh and add to the Fundamental pure tone the harmonics up to and including the 5th in the proportions shown below. Display and sketch the waveform each time you add another harmonic.
Harmonic
Number
1
2
3
4
5
Amplitude relative to Fundamental x
1
1/2
1/3
1/4
1/5
20 log x
0
-6.02
-9.54
-12.04
-13.98

















9.      What shape is the waveform gradually approaching?

As you can see from the above pictures. As you add the harmonics to the fundamental it slowly gains a sawtooth shapes and starts to become a sawtooth wave.

10.  View the frequency content (Magnitude Spectrum) of the waveform as previously. Identify the peaks in this display with the fundamental and the harmonics you have added to it. Sketch it in your lab note.






       The first image here is the fundamental again. The exact same as before. The following images are the merging of the 2nd, 3rd, 4th and 5th harmonics to the wave. Once again you see the same pattern. Each time a harmonic is added it's peak is lower than the one to it's left. A higher frequency occurred in the merger for the first set of harmonics as opposed to this set. A higher dB was also reached in the first set with this set not hitting above -18dB.


11.    Save the final waveform as a *.wav file in C:\TEMP. Listen to the waveform and compare it with the sound of the pure tone, and the previous waveform.

The pure tone is still a medium volume lower all round pitch sound. The Square wave is a much louder higher pitched sound due to the multiple amplitudes from the added harmonics. The Sawtooth wave is a similar volume to the Square Wave but it has a lower pitch.

Noise, Mixing, Signal-to-noise ratio, and Filtering 
1.      Open the waveform noise1.wav  This is a white noise file. Listen to this nuisance file. View and sketch this waveform in the time domain and in the frequency domain.

2.      Add a sinusoid of amplitude 0.02, 1kHz frequency of 1s duration. Does the resulting waveform look sinusoidal? How does it sound? How does it look in the frequency domain?



The resulting tone does indeed appear to be a sine wave, it does look sinusoidal. The White Noise track however does not look sinusoidal. The tone peaks at below -18dB and peaks at 1000Hz. The tone like before is a high pitched ring, quieter than the others though.

3.      View and sketch the spectrum, view the spectrogram, and listen to the waveform. Locate the pure tone if possible. Save the mixed waveform as an *.wav file in C:\TEMP.



You can visibly spot the peak of the tone among the white noise in the frequency domain. (The peak at 1000Hz).

4.      Try using the Effect Graphic Equaliser options of Audacity to select the tone and reject the noisy in the waveform( we need a slider at max at 1000KHz and sliders at zero elsewhere if possible). Does the waveform look more sinusoidal than before? If so is the period of the waveform approaching that of the original pure tone? How does it sound? To what extent did this filtering work?

As you can see above the resulting waveform following the equalization is getting closer to being sinusoidal. A comparison is shown with this waveform and that of the original pure tone, only more zoomed in. The White Noise is no longer quite as prominent but still very much there. To some extent I would say that this filtering has worked.

5.      On waveforms of your choice from freesound.org  explore the effect of the other filter options that are available.
Here you can see the original track, a line from the Austin Powers movie and below it the same track with several filters. I have used a fade in and out effect to bring down the volume at a  steady pace for the end of the track and to do the same in reverse for the start. The echo as you can see has kept out any breaks in the waveform as the sound continues to play through these parts. Most notably in the middle where Austin takes a break in his dialogue,







Week 4: Hearing - Lecture 3

Week 4: Hearing

The Ear and Hearing - Three base concepts of hearing include the Primitive Level, Symbolic Level and the Warning Level. By the Primitive Level we mean a situation where whatever noise you hear has little meaning to you and can be comforting or even irritating depending on your reaction to the noise. But none the less you know you can hear it. By Symbolic Level we mean a situation where two different noises have came together to convey the same thing. The example in this case is the spoken word of a car radio telling you traffic is bad and the actual sound of the traffic as you approach, both of which tell you that heavy traffic is ahead. By Warning Level we mean a situation where a certain sound has caused you to follow a certain instruction just by hearing it. For example hearing a siren approaching from behind and pulling over to let the vehicle pass.

How Does Normal Hearing Work - There are three main parts of the anatomy of an ear. You have the outer ear, the middle ear and of course the inner ear (cochlea). The outer ear is made of three parts; the pinna, ear canal and the eardrum. The middle ear is made of two parts; the ossicles and the ear drum and finally the inner ear is made up of the cochlea, the auditory nerve and the brain.

So, sound waves enter the ear canal and cause the ear drum to vibrate. This causes the ossicles in the middle ear to move. The end of the ossicles hits the membrane window of the cochlea and cause the fluid inside to move. This fluid movement causes a response in the hearing nerve,

The Journey of Sound Waves - You ear actively funnels sound waves into your outer ear canal. These waves then travel down this passage until they eventually hit the ear drum and cause it vibrate. As the ear drum vibrates your ossicles starts to move. Following this the vibrations are passed to a thin layer of tissue at the inner ear known as the oval window. As soon as the oval window reacts tot he vibrations wave-like motions are started in the fluid in your cochlea.

Your Body's Microphone - The main organ of hearing is the spiral organ known as the Corti that runs through your cochlea. The Corti is made up of thousands of tiny sensory hair cells attached to a membrane. A tiny sensory hair emerges from each cell and drill through a second membrane above. When the fluids in the cochlea are moving the first membrane in the Corti vibrates and squashes the sensory hairs against the second membrane. The movement of these hairs is then transformed into nerve impulses that travel through nerves into the brain.

Locating Sounds - Due to having two ears we are able to actually locate the sound of a sound. For example, if a sound is originating from the right then it will obviously reach your right ear before your left and as such will be louder in this ear. Through this we can tell the sound came from the left.
Source: http://www.electric-avenues.com/hearing.html
Source: http://www.hearinglink.org/how-the-ear-works

A Complete Structure of the Ear - 
Source: http://2eyeswatching.com/2012/11/16/this-insect-has-human-ears/

Cochlea and Frequencies -
Source: http://www.ifd.mavt.ethz.ch/research/group_lk/projects/cochlear_mechanics

Cochlear Structures - 
Source: https://www.studyblue.com/notes/note/n/cmscds-3213-study-guide-2012-13-marks/deck/9718820

Schematic of Auditory Periphery - 




















The Impedance Matching Mechanism of the Middle Ear. Impedance matching is a very important function of the middle ear. The middle ear transfers any incoming vibrations from the tympanic membrane to the oval window. The tympanic membrane is low impedance and the oval window is high impedance. The middle ear makes an efficient impedance transformer. This means that it will convert low pressure vibrations into high pressure vibrations that are suitable for moving the cochlear fluids. The impedance of the cochlear fluids is equal to sea water. Due to this only 0.1% of energy would be transmitted.

The two processes that are involved in the impedance matching are.

1. The area of the tympanic membrane is larger than that of the stapes foot plate in the cochlea. The forces that get collected in the ear drum are placed directly over a smaller area and due to this the pressure in the oval window increases.

2. The second process is the lever action of the middle ear bones. The incus is much shorter than the malleus and as such this produces a lever action that increases both the force and decreases the velocity at the stapes. With the malleus being 2.1 times longer than the incus then the force is multiplies by 2.1.

The ear functions as a type of fourier analysis device with the mechanism of the inner ear converting any of the mechanical waves into electrical impulses used to describe the intensity of sound in terms of frequency. Ohm's law of hearing is that the perception of the tone of a sound is a function of the amplitudes of the harmonics and not of the phase relationships between them. This is consistent with the place theory of hearing. This correlates the observed pitch to the position along the basilar membrane of the inner ear that is stimulated by the corresponding frequency.

Features of Auditory Processing - 
A two channel set of time-domain signals in contiguous, non-linearly spaced frequency bands. Seperation of: left from right ear signals, low from high frequency information and timing from intensity information. Re-integration and re-distribution at various specialized processing centre in the hierarchy. - Directly from the lecture.

Audible Frequency Range - 
Source: http://www.howequipmentworks.com/physics/medical_imaging/ultrasound_imaging/ultrasound.html


"Normal" Hearing in Humans - 
Hearing Threshold - 0 dB SPL = 20?Pa at 1 kHz.
Dynamic Range - 140 dB(Up to Pain Level)
Frequency Range - (In Air) ~ 20 Hz to 20 kHz
Most Sensitive Frequency Range - ~ 2 kHz to 4 kHz
Frequency Discrimination - ~ 0.3% at 1 kHz
Minimum Audible Range - ~ 1 degree
Minimum Binaural Time Difference - ~ 11?s

Human Hearing and Speech Data -
Source: http://upload.wikimedia.org/wikipedia/commons/b/bc/Audible.JPG

Source: http://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/HearingLoss.svg/500px-HearingLoss.svg.png



Human Hearing and Speech -
Human hearing covers a wide range of frequencies. About 20 Hz to 20 kHz. In this range there are frequencies generated by conversational speech. The lowest sound pressure level humans can hear is the hearing threshold. Normally 1 kHz to 4 Khz.

MPEG/MP3 Audio Coding -
Source: http://folk.uio.no/alexanje/research/formats/



Wednesday, 8 October 2014

Week 3: Focus of Activity

Week 2: Focus of Activity

Q1 - In a recording room an acoustic wave was measured to have a frequency of 1KHz. What would its wavelength in cm be?

0.333m or 33.3cm. This is according to the equation that Lambda is equal to the velocity over frequency. An acoustic wave would travel at 333m/s through air meaning that the velocity is 333 and the frequency from the question is 1000 Hz.

Q2 - If a violinist is tuning to concert pitch in the usual manner to a tuning fork what is the likely wavelength of the sound from the violinist if she is playing an A note along with sound from the pitch fork?

440 Hz is the frequency of Concert Pitch. The velocity of the wave through a steel tuning fork is 5,000 m/s. The wavelength in cm would be 1137 cm. This is once again according to the aforementioned formula.

Q3 - 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?

Frequency is equal to velocity over lambda. The velocity of the sound is once again 5000 m/s and the wavelength is stated as 3.33m. So the frequency of the wave would be around 1501 Hz. The wave travels faster through solid materials This is because the particles (atoms or molecules) in a solid material are touching each other and rather fixed together and as such they collide with each other faster as the sound wave moves through them.

Q4 - Sketch a sine wave accurately of amplitude 10, frequency 20Hz. Your sketch should show two complete cycles of wave. What is the duration of one cycle? What is the relationship between the frequency and the duration of one cycle?

The duration of one cycle is equal to the number of cycles over the frequency. As such if you have a higher frequency you will have a shorter duration for the cycle and as such the wavelength shortens.













Q5 - 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)

Standing waves are waves that remain in a constant position and do not travel through the transmission medium. These waves can be found in the strings of a musical instrument. In a violin string when it is either bowed or plucked the string vibrates as a whole between a two nodes at either end and an anti-node in the middle.

Q6 - What is meant by terms constructive and destructive interference?

Constructive Interference is when two waves that have been added together have a resulting larger amplitude. When this wave is larger than both of the originals then you have constructive interference. 

Destructive Interference is when the sum of the two waves added is less than than either original wave. So much so that it can be zero. This occurs when one of the waves starts with a trough and the other starts with a crest.

Q7 - What aspect of an acoustic wave determines its loudness?

The amplitude of the wave determines the loudness. A larger amplitude means more energy and as such produces a larger sound.

Q8 - Why are decibels used in the measurement of relative loudness of acoustics waves?

The reason that decibel is widely used as the measurement of relative loudness is that human ears perceive sounds in logarithmic scale instead of linear scale. So that we can graph a huge range of values such as there is in terms of volume, loudness we use this logarithm.

Q9 - How long does it take a short 1KHz pulse of sound to travel 20m verses a 10Hz pulse?

The frequency of a sound wave has no affect on the time it takes to travel. So using the equation that time is equal to distance divided by velocity.
t = 20/333s
= 0.06s

Q10 - The speed of sound in water is roughly 1,500 m/s. It moves much faster in water as opposed to air because the particles in water are much closer together than in a gas.



Wednesday, 1 October 2014

Week 2: Audio Lab 1

Task 1:
The file as it looked at the start:

The file as it looked zoomed in and then zoomed out:

Zoomed In: In this representation of the track we have zoomed in. The length of the track has exceeded the boundaries of the screen and now the the units of measurement have now changed to 0.10 seconds from 1.0 seconds and so on and so forth. The amplitude of the track is visibly less compressed in the zoomed in form as we are now able to actually see the crests and troughs in the sound wave separate from one another more clearly. The amplitude and wavelength of the track are now much more obvious. 

Zoomed Out: In this representation of the track we have zoomed out. The length of the track has shrunk drastically in the display and the units of measurement have changed to state that the entire visible bar is 15 seconds long without any increments between 0 and 15. The amplitude of the track has visibly compressed exponentially and now it is even harder to differentiate between the different crests and troughs. Rather than being stretched out the wavelength is visibly compressed inwards.

Task 2:
The file with different effects applied: Fade in and Fade out with Phaser in the middle. Displayed with no zoom. 

The fade in and fade out at the end visibly and physically alter the sound wave. You can see the amplitude starting off very small and building to the standard the rest of the track plays at only to then degrade back down as the track fades out, gradually getting quieter for the last few seconds. The phaser identifies certain tones in the middle of the track and both changes them in two ways. The amplitude raises and lowers depending on some characteristics and the wavelength stretches and compresses in suite. In doing this it adds a more electronic sound to the track.








Task 3:
Analysed and Plot Spectrum:


Here is the track following the selection of analyze and plot spectrum. Instead of viewing the wave form represented with time you now see the wave form represented with it's Hertz and Decibel measurements. If we change the axis from linear to log frequency the Hz measurements on the bottom axis change drastically moving to the hundreds rather than thousands. The shape of the wave also starts very rounded. Decibels are the measurements we use to measure the amplitude of a signal. Hertz is the value for the frequency.



Task 4:
Applying Reverb: Small Room Reverb:
When the reverb is set to settings of a small room the general amplitude of the track seems to lower and the wavelength seems to stretch a little in most parts. Though the overall sound seems to be unchanged bar what appears to be a small increase in sound.








Large Room Reverb:
When the reverb is set to settings of a large room the general amplitude seems to lower once more and there seems to be less of a gap between moments where little sound is present. The overall track once again seems unchanged bar from another small increase in sound.







Task 5: Other effects and features of Audacity -
Change Tempo - This effect allows you to change the tempo of a track or selection without actually changing the pitch. Doing this can lengthen or shorten the track/selection in seconds or change the BPM (beats per minute).

Echo - This effect repeats the selected track/selection over and over getting more quiet each time. There is no pause between the repeats so as to simulate a realistic echo.

Truncate Silence - This effect automatically finds any silences in the track and removes/eliminates these silences.