Friday, May 21, 2021

Cleaning Audio For Ambience - Not so quiet suburbia.


As an exercise, decided to see if some ambience recorded in a public park could be used for say
a scene of a character walking in the woods or a forrest.

I planned my ambience and SFX tracks, background birds, footsteps, perhaps a bubbling brook, etc.

The first few were easy, a 30 second recording of me walking on gravel and an indoor water feature.
Time for a walk in the park to record some birds, as it turns out, not exactly a "walk in the park".

Guaranteed that no matter the time of day you go to a public place like a park, you will not be alone.
Other people means, other noises, very unwanted noises.

I did my 30 second recording and as predicted, lots of unwanted noises.
Below, the raw recording, quietest one of five:


Not exactly great, especially towards the end.
People talking in the distance, cars, and other general crud.

After about 10 minutes of cleaning and layering the other SFX over it,
the result is not too bad.



All recordings were done with a modest Hisense H20 Smartphone, format was
wav @ 44.1 KHz


Thursday, May 20, 2021

Repairing Damaged Audio Pt4 - Old McDonald has (no more) farm....


I recently discovered a funny video on Youtube.
An old man decides to interrupt a TV interview in a very unique way.
I't in Greek but that ain't important, watch....



I don't think the broadcaster was too impressed.
Can the interview be saved, assuming it wasn't live ?

You bet it can.



The animal farm has gone, but now it looks very odd with the old man opening his mouth
and no sounds coming out.

Easily fixed with a bit of zooming.


Wednesday, May 19, 2021

Repairing Damaged Audio Pt3 The Plastic Corneta

Whilst discussing DSP with a good friend of mine, Julio Costa, he reminded me of a terrible sound
that was unleashed on the world nearly 11 years ago.

It's of course the vuvuzela, something so loud,  it makes bagpipes sound like gentle whispers.
The bane of every sportscaster and millions of people around the globe.

It became such as nuisance, that several broadcasters developed real time techniques to try and
eliminate or, greatly decrease the drone, with varying degrees of success.

This then, is the perfect sound (or noise - depending on your tastes) to try some DSP on.
Of course it's not real time but still a good exercise.

A quick analysis revealed a very strong fundamental in the low mid range, with harmonics going up
to the 5-7 KHz range, depending on the quality of the recording of course.

A simple notch filter will not be up to the task, those pesky harmonics make sure of that.
Rather what is needed, is a recursive filter, however most traditional "plugin" notch filters, leave a lot
to be desired as regards rejection, ripple, Q and phase changes.
These short comings negatively impact the wanted audio as well, creating a horrible metallic sound.

A bit of head scratching and several Google searches later, revealed a new technique whereby one
can control not only the rejection, but also Q (as the harmonic increases) and phase discontinuities. 
At a cost of course, CPU cycles, lots and lots of them.

The idea being:











So what is the result?
First, the original:


And after:



Not 100% gone, but a big improvement and no horrible metallic sound.

Repairing Damaged Audio Pt2

Leading on from my previous post on how to repair audio, Part 1 here are a few more examples:

Let's take an extreme example, trying to report from a construction site or other very noisy location,
littered with loud, percussive sounds.
I have simulated the noises by using a drum.

WARNING: Loud and obnoxious, turn your volume down!!


Not exactly useable.

Now, in this case, the unwanted noises were so loud and intrusive that we will never
completely get rid of them.
Nor should we, imagine this in a video, where the reporter is clearly in say a
construction site.
It would be very odd to not have the background noises included, however,
they should not be so loud that the reported cannot be heard over them.

Below, a much improved version.


Yet another example, crazy traffic that India is so well known for.

Before:


And after, note how the hooting and general noise has been "tamed" to allow
the presenter to be better understood.
These noises were not completely removed as the traffic ambience is important.



Click for Part 3 - The Plastic Corneta

Repairing Damaged Audio

One of the big advantages of DSP is, the ability to separate, filter, amplify or attenuate sounds that are very close to each other in frequency.

Something that cannot be achieved using just EQ, at least not without changing the overall sonic characteristics of the clip.

Consider the plots below, by storing the samples in buffers and manipulating them with a FIR, more
precise control is then possible.
Note how harmonics and other unwanted sounds can be controlled in either amplitude, frequency, or both.


Like wise, we have full control over amplitude, sample by sample.
Extremely handy for using on clipped or otherwise distorted sound.


This has many applications in cleaning up audio, that would otherwise sound terrible,
be distracting to the listener or just down right un-usable.
Consider this first example, you are recording some outdoor ambience sounds and a freight train 
starts blowing it's hooter, something you really didn't want.



You now have two options:

- Re-record (not always possible).
- Apply some DSP magic.

Here is the same clip, with no hooter.
Note how little change there is to the original quality of the clip.
Small artifacts can easily be masked with a bit more FX, equalization  or music if appropriate.


In my next entry, will post more "before and after" examples.

Click for Part 2 Here






Expand your Horizons

This time, I want to have a look at what is possible using only open source software and using only Linux. I don't mean replacing your c...