Lecture 10 – spectra
Perhaps one of the best ways to approach thinking spectrally is to think about the music that has been written in the last 40 years where the science of spectral analysis and understanding has been at its core.
What can you do with the FFT?
- noise reduction
- high-precision filtering
- pitch tracking
- time stretching and compression
- pitch shifting
- impulse response reverberation…
The Fast Fourier Transform
FFT analysis and it’s purpose is beautifully explained in great detail by Owen Green elsewhere on this site:
Jean Francois Charles’ Spectral Tutorial will be very helpful, download the (fairly old) code and have a play with what’s on offer:
and importantly read his tutorial as published in the MIT ‘Computer Music Journal’ in 2008:
SPEAR is also fun but it’s old software so you’ll have to persuade Apple to let you use it by downgrading your security settings. It’s a very good fun way to play with spectral data and remove parts of audio files, stretch them and manipulate them. It has its limits as it’s not audio you’re messing with, but data about the audio. Files are Sound Description (not design as I said in the lecture) Interchange Format:
The Patches Martin used in the session:
We’re not really teaching MaxMSP on this course so it’s not expected that you’ll really get deeply into the patching required to do beautiful FFT things in Max, but it’s worth opening the lid on this for some of you so that you can see what’s possibly when you’ve broken a signal into a description of “energy in bins”, essentially how loud a certain range of spectrum might be at any one time.
Download these for a very quick start on something that could go somewhere useful for you. I’m happy to make standalone versions of slightly more feature-rich FFT processing if you just want to use these for sound processing and exploration, let me know:
Do some noise reduction with SoX
First you’ll need some noise, so extract a segment of noise-filled silence from your file and save it as a sound-file.
When you have this, you can open the terminal and make a noise profile of that sound
sox Alison_RecordRm_RT_01.wav -n noiseprof AlisonRecRoomNoise.prof
Once you have the file called AlisonRecRoomNoise.prof, you can use this as the noise reduction filter with SoX like this
sox Rec1-Dirty.wav Rec1-cleaned-01.wav noisered AlisonRecRoomNoise.prof 0.1
The 0.1 argument at the end of that line specifies how much noise reduction to apply, this number will need very careful listening before you’ve done a safe job on the noise reduction.
Download the related resources for the above:
This afternoon’s task
Your task this afternoon is to design a spectral sound or sounds.
Take one of your existing sound files and manipulate with one of the spectral processing tools shown today, or with some other tool that manages the spectra. Make a note of
- the consequences of the processing
- the extremes of different settings and what your ear tells you is happening
- store the settings for the processses that you like
For example, using sox, generate a noise profile from something not quiet and use it as a filter on a diffrent sound with extreme settings.
Upload the sound and a .txt file explaining your settings/observations to the group folder. We’ll listen to and discuss these at the end of the session.
A quick note on making filters:
It’s well worth watching Tim Place’ really interesting video that will demystify how filters work and what they do and how they are made:
When you’ve imbibed that, you should perhaps go to Max’s Package Manager and install the SMFilter pack by Surreal Machines. They make superb-sounding analogue modelling plugins and you’ll enjoy explore the gen~ code that’s available in this package once it’s downloaded. The filters also sound great.