|
> To Continue with Chapter 5
Morphing
In recent years, the idea of morphing, or turning one sound (or image) into another has become quite popular. What is especially interesting, besides the idea of having a lion roar change gradually and imperceptibly into a meow is the idea that there are sounds "in-between" other sounds.
|
|
|
|
|
|
|
|
|
|
 |
|
|
Figure .x Image morphing: several stages of a morph. |
|
What does it mean to change one sound into another? Well, what would it mean graphically to change a picture into another? Would you replace, over time, little bits of one picture with those of another? Would you change the most important shapes of one gradually into those of the other? Would you look for important features (background, foreground, color, brightness, saturation, etc.), isolate them and cross-fade each independently? You can see that there are lots of ways to morph, and each way produces a different set of effects. The same is true for sound
|
|
|
|
|
|
|
|
|
|
 |
|
|
Soundfile .x
Max Mathews, who we met in a previous chapter, was also involved in some early computer composition experiments. One of the most charming was his "morphing" piece (excerpted here), called ?????? in which he morphed two melodies by gradually interpolating their pitches. |
|
Simple Morphing
The simplest sonic morph is essentially an amplitude cross-fade. Clearly, this doesnt do much (you could do it on a little audio mixer).
|
|
|
|
|
|
|
|
|
|
|
|
 |
|
|
|
 |
|
|
Figure .x Picture of an amplitude crossfade of a number of different data points |
|
|
What would constitute a more interesting morph, even limiting us to the time domain? How about this: lets take a sound, and gradually replace little bits of it with another sound. If we overlap the segments that were "replacing," we will avoid horrible clicks that will result from samples jumping drastically at the points of insertion.
Interpolation and Replacement Morphing
The two ways of morphing described above might be called replacement and interpolation morphing, respectively. In a replacement morph, intact values are gradually substituted from one sound into another. In an interpolation morph, we compare the values between two sounds, and select values somewhere between them for the new sound.
In the former, we are morphing completely some part of the time, in the latter we are morphing somewhat all of the time. In general, we can specify a morphing degree, by convention called , which tells how far from one sound we are from the other. A general formula for (linear) interpolation is:
This equation is a complicated way of saying: take some sound (SourceSound), and add to it some percentage of the difference between it and another sound TargetSound SourceSound), to get the new sound.
Sonic morphing is more interesting in the frequency domain, in the creation of sounds whose spectral content is some kind of hybrid of two other sounds. Convolution, by the way, could be thought of as a kind of morph!
An interesting approach is to take some feature of a sound and morph that feature onto another sound, trying to leave everything else the same. This is called feature morphing, and it's often most effective if the feature morphed is a perceptually meaningful one. Theoretically, one could take any mathematical or statistical feature of the sound, even perceptually meaningless ones like the standard deviation of every 13th bin and come up with a simple way to morph that feature. This can produce interesting effects. But most researchers have concentrated their efforts on features, or some organized representation of the data, that is perceptually, cognitively, or even musically salient, such as attack time, brightness, roughness, harmonicity, etc.
An Example of feature morphing: Morphing the Centroid
A commonly used measure of sounds, by music cognition researchers and computer musicians, is called the spectral centroid. The spectral centroid is a measure of the "brightness" of a sound, and it turns out to be extremely important in the way we compare different sounds. If two sounds have a radically different centroid, they are generally perceived to be timbrally distant (sometimes this is called a spectral metric).
Basically, the centroid can be considered the average frequency component (taking into consideration the amplitude of all the frequency components). The formula for the spectral centroid of one FFT frame of a sound is:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The standard formula for the (average) spectral centroid of a sound. Ci is the centroid for one spectral frame, and i is the number of frames for the sound. A spectral frame is some number of samples which is equal to the size of the FFT. |
|
The (individual) centroid of a spectral frame is defined as the average frequency weighted by amplitudes, divided by the sum of the amplitudes. |
|
We add up all the amplitudes (the denominator) and add up all the frequencies multiplied by their amplitudes, and then divide. The "strongest" frequency wins! In other words, its the average frequency weighted by amplitude: where the frequency concentration of a sound is.
|
|
|
|
|
|
|
|
|
|
|
|
 |
|
|
|
|
 |
|
|
Figure .x The centroid curve of a sound over time. Note that centroids tend to be suprisingly high, and never the "fundamental" (unless our sound is a pure sinewave). One of these curves is of a violin tone, the other of a rapidly changing voice (Australian sound poet, Chris Mann). The soundfile for Chris Mann is included as well. |
|
But remember that the formula for the centroid above is for just one frame of sound. If we average ci over a sounds duration (remember that we tend to take FFTs of short time segments), we can get some idea of the average brightness of a sound (higher centroids are brighter sounds, lower ones are "duller"). Or, perhaps more interestingly, we can look at the curve over time for the centroid (as in the figures above), and get a picture of how the sounds brightness varies (called the time variant centroid).
The nice thing about this measure is that its more cognitive than acoustical or mathematical. People really seem to hear this feature, and use it to a great extent in categorizing sounds, and in judging how different one sound is from another.
|
|
|
|
|
|
|
|
|
|
 |
|
|
 |
|
|
|
Sounds and their centroids! Here is a spectral centroid (over time) of a violin tone. The soundfile is a single violin sound, and the picture above is its centroid. |
|
Now lets take things one step further, and try to morph the centroid of one sound onto that of another. Our goal is to take the time-variant centroid from one sound, and graft that onto a second sound, preserving as much of the second sounds amplitude/ spectra relationship as possible. In other words, were trying to morph one feature while leaving others constant.
To do this we can think of the centroid in an unusual way: the frequency which divides the total soundfile energy into two parts (above and below). Thats what an average is. For some time-variant centroid (ci) extracted from one sound, and some total amplitude from another (ampsum), we simply "plop" the new centroid onto the sound, and scale the bins above and below the new centroid to (.5 * ampsum). This will produce a sort of "brightness morph." Notice that on either side of the cetnroid in the new sound, the spectral amplitude relationships remain the same. Weve just forced a new centroid.
INSERT EQUATION HERE FOR MORPHING THE CENTROID
> To Continue with Chapter 5
< Back to 5.5
< To Table of Contents
|