14 November 2009

Interval expansion

The video shown above is an example of interval expansion, an effect that can only be achieved through spectrogram resynthesis. It consists in expanding the spacing in pitch between notes so that each interval doubles. Therefore, two notes one semitone apart become two semitones apart, which creates a melody that sounds different from the original melody. This is done here by setting analysis parameters so that only about 5 octaves of the original sound are analysed, then the frequency settings are changed so that these 5 octaves are stretched in pitch across 10 octaves.

Calculating the frequencies

There are two factors that need deciding, the expansion ratio we want, here 2, and which centre frequency we want, that is, which frequency will stay the same throughout the expansion. Here I chose A4 (440 Hz). Now, we want to cover the entire audible range for the output, so we want the result to range from 20 Hz to 20,000 Hz.

So with all these parameters, we now need to calculate the minimum and maximum frequencies we want to use for analysis, that's what we'll put in config.txt prior to opening the sound. First, the maximum frequency. Because we will expand the sound in pitch by a factor of two, we need half the interval (in octaves) between the centre frequency of 440 Hz and the maximum frequency for analysis than we'll have between the cetnre frequency and the maximum frequency of the synthesised sound, which is 20,000 Hz. We'll use the following formula :

Fmax' = Fcentre * (Fmax / Fcentre)^(1 / ratio) which gives us here
Fmax' = 440 * (20,000 / 440)^(1 / 2) which you can type in Google to obtain the answer which is
Fmax' = 2966.479 Hz

Same formula for the minimum frequency by replacing 20,000 in the formula with 20, which gives you 93.808 Hz.

Once you've entered those two values in the file config.txt for 'min_frequency' and 'max_frequency' you can load Photosounder, load your sound, set the Min. and Max. Frequency knobs to 20 and 20,000 to obtain the desired result.


Anonymous Anonymous said...

Nice feature, but there's way too much aliasing to make it useful in my opinion.

November 16, 2009 11:59 AM  
Blogger Michel Rouzic said...

There's no aliasing, it's just the way the overtones sound, because the harmonics get further apart (the 1st harmonic becomes the 3rd, the 2nd harmonic becomes the 8th, the 3rd becomes the 15th, the 4th becomes the 24th, and so forth). Well that could be 'fixed' by toning down the overtones I guess, but yeah, it's definitely going to sound like a different instrument regardless because of how it pulls overtones apart.

November 16, 2009 6:59 PM  

Post a Comment

Links to this post:

Create a Link

<< Home

©2008-2009 Michel Rouzic