Linear Morphing between values in a formant filter

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I got some sample code from musicdsp about a nice formant filter, whihc has coefficients for some vowels sounds A E I O U of a female voice, defined in a 5x11 array as follows:

Code: Select all

const double coeff[5][11] = {
	{ 3.11044e-06,
	8.943665402, -36.83889529, 92.01697887, -154.337906, 181.6233289,
	-151.8651235, 89.09614114, -35.10298511, 8.388101016, -0.923313471  ///A
	},

	{ 4.36215e-06,
	8.90438318, -36.55179099, 91.05750846, -152.422234, 179.1170248,  ///E
	-149.6496211, 87.78352223, -34.60687431, 8.282228154, -0.914150747
	},
	{ 3.33819e-06,
	8.893102966, -36.49532826, 90.96543286, -152.4545478, 179.4835618,
	-150.315433, 88.43409371, -34.98612086, 8.407803364, -0.932568035  ///I
	},
	{ 1.13572e-06,
	8.994734087, -37.2084849, 93.22900521, -156.6929844, 184.596544,   ///O
	-154.3755513, 90.49663749, -35.58964535, 8.478996281, -0.929252233
	},
	{ 4.09431e-07,
	8.997322763, -37.20218544, 93.11385476, -156.2530937, 183.7080141,  ///U
	-153.2631681, 89.59539726, -35.12454591, 8.338655623, -0.910251753
	}
};

I wanted to create additional intermaediate values for in-between sounds A-E E-I I-O and O-U
I have read something about linear morphing but I can't find a way to apply to this values. WOUld it be possible to generate the interediate coefficients using a formula? or should I simply apply the average values between each couple of values of the arrays?

Post

A linear cross-fade between values worked fine for me. Here is how it sounds when driven by a sequence.

https://soundcloud.com/ichad-c/hydi-gremlin-preview

P.S. I didn't use that exact table.

Post

It may sound like a more natural transition to 'smoothstep' or cosine interpolate the value:-

Code: Select all

double CosineInterpolate(
   double y1,double y2,
   double mu)
{
   double mu2;

   mu2 = (1-cos(mu*PI))/2;
   return(y1*(1-mu2)+y2*mu2);
}
Example taken from here:- http://paulbourke.net/miscellaneous/interpolation/

Post

thnaks a lot quikquak,your function has proven very helpful!

Post

I don't know if there is a "correct" way of doing this. However for me, it would make the most sense to look at the poles of the formant filters in the complex plane, and interpolate them in polar coordinates. That is, interpolating the magnitude and angle individually, with say, linear interpolation.

This seems most appealing to me, since the location of the poles on the z-plane provide a clear link to the frequencies and shapes of the resonances.

Post

iiphii wrote:I don't know if there is a "correct" way of doing this. However for me, it would make the most sense to look at the poles of the formant filters in the complex plane, and interpolate them in polar coordinates. That is, interpolating the magnitude and angle individually, with say, linear interpolation.
While this is usually better than interpolation direct form coefficients, you can do slightly better still if you interpolate the angular frequencies in log-domain. This way your linear interpolation actually sounds linear to the ears. As far as the magnitude goes, I'd usually just interpolate the damping factor 1/Q as-is, since that works well enough, but I suppose you could do that in log-domain as well if you wanted to.

Post

this is the fnal result, i think it sounds quite cool. AEIOU and their in-between values, modulated in VCV Rack

https://www.youtube.com/watch?v=9EqaQ5t-bO8

Post

Sounds good!

Post

What I meant by more natural was the transition between two sounds having an ease-in and ease-out movement of formants because of the physical limitations of face muscles:

https://en.oxforddictionaries.com/definition/diphthong
& https://en.wikipedia.org/wiki/Diphthong

Image
Image

Post

Forgot to mention that my amplitude is in log-domain, but the rest in linear. After looking at Quickquak's post though, think I'll give the transition region some more consideration if I do a version 2.0.

Post Reply

Return to “DSP and Plugin Development”