First time here? Check out the FAQ!
x

ModalFilter & WaveEquation

0 votes
811 views

Hi there,

I'm currently exploring the ModalFilter, getting some very nice results. One thing I'm scratching my head about is implementing the wave equation. I found the Sound 'Plucked String ModalFilter KBD' which uses a Position control. But I'm not really sure how the following expression

((!Position * i) normSin / i squared * 8 / Float pi squared)

can be understood. I can somehow imagine how the amplitude of each mode is expressed using the normSin (although I can't make the connection to the wave equation mathematically). Also dividing by i squared is like a 12dB/Oct Rolloff I guess, but why times 8? And last but not least why divide the whole thing by pi squared?

Some derivation of this formula in connection to the wave equation would be really helpful :)

Thanks!

asked Feb 16, 2016 in Sound Design by kymaguy (Virtuoso) (10,580 points)

1 Answer

+3 votes
 
Best answer
To derive it from the wave function, see

https://farside.ph.utexas.edu/teaching/315/Waveshtml/node25.html#s5.3

Starting with EQN 292 is where you see the strength of each mode when the string is plucked at the center.

= 2A * 2^2 * sin(m pi/2) / (m ^2 * pi ^2)

= A * 8 * sin ( m * pi/2) / (m^2 * pi^2)    (eqn A)

Our Capytalk is

((!Position * m) normSin / m squared * 8 / Float pi squared)

where normSin = sin (!Position * m * pi)

so

 8 * sin (!Position * m * pi) / (m^2 * pi^2)

If Position = 0.5 (plucked at the center), then

8 * sin (m * pi * 0.5) / (m^2 * pi^2)     same as (eqn A)

That's where the 8 came from and the divide by pi^2.

The (8 / pi^2) constant makes it so when you add up the mode amplitudes, they sum to 1.  You could probably just ignore it when reasoning about the amplitudes.  That leaves you with

sin (m * pi * 0.5) / m^2

so the mode strengths fall off with the square of the mode number (sort of like a triangle waveform).

Imagine when you pluck the string, you are pulling it out of alignment, creating a triangle shape. Depending on where you pluck it, the triangle is either asymmetric or symmetric (close to either fixed point or close to the center).    If you do a fourier analysis of that triangular displacement shape, you get the strengths of the modes when you pluck the string at that position.
answered Feb 16, 2016 by ssc (Savant) (127,060 points)
selected Feb 17, 2016 by kymaguy
very clever :) Thank you for the detailed explanation!
...