We solve the wave equation with the following parameters and initial displacement:

c=1;L=2;h=1;f[x_]:=Piecewise[{{0,x<0},{h x,x<L/2},{-h (x-L),x<L},{0,x>L}}];

Plot[f[x],{x,-L/2,3L/2}]

Compute the Fourier coefficients. Since the initial velocity g(x)=0, we have (Subscript[B, n])=0 and

A[n_] = (2/L) Integrate[f[x]Sin[n Pi x/L],{x,0,L}]

with eigenvalues

Lambda[n_]=(c n Pi/L)^2;

The n-th partial sum of the Fourier series solution of the wave equation is

u[x_,t_,N_]:=Sum[A[n] Cos[Sqrt[Lambda[n]]t]Sin[n Pi x/L],{n,1,N}]

We plot the (partial sum approximation to the) solution at time t=0.

Plot[u[x,0,20],{x,0,L}]

Some more plots at different times t:

Plot[u[x,1/2,20],{x,0,L}]
Plot[u[x,1,20],{x,0,L}]
Plot[u[x,3/2,20],{x,0,L}]

And now a little movie:

Manipulate[Plot[u[x,t,20],{x,0,L},PlotRange->{-1,1}],{t,0,20}]

Normal modes and overtones:

mode[x_,t_,n_]=A[n] Cos[Sqrt[Lambda[n]]t]Sin[n Pi x/L];

Manipulate[Plot[mode[x,t,1],{x,0,L},PlotRange->{-1,1}],{t,0,20}]

Now for some overtones.
Note that all “even” modes are zero (see the solution above).
Therefore modes 3 and 5

Manipulate[Plot[mode[x,t,3],{x,0,L},PlotRange->{-1,1}],{t,0,20}]
Manipulate[Plot[mode[x,t,5],{x,0,L},PlotRange->{-1,1}],{t,0,20}]

Traveling Waves
Next we illustrate the traveling wave interpretation.
First we need to extend the function f defining the initial displacement to an odd 2L-periodic function:

fbar[x_]=Piecewise[{{-h(x+L),x≤-L/2},{h x,x<L/2},{-h(x-L),x<3L/2},{h(x-2L),x<5L/2},{-h(x-3L),x≥5*L/2}}];

and plot it

Plot[fbar[x],{x,-L,3L}]

Now we can show the traveling waves.
First the one which travels to the right:

Manipulate[Plot[fbar[x-c t],{x,0,L},PlotRange->{-1,1}],{t,0,2}]

Then one traveling to the left:

Manipulate[Plot[fbar[x+c t],{x,0,L},PlotRange->{-1,1}],{t,0,2}]

And now, the two waves together with their average:

Manipulate[Plot[{fbar[x-c t],fbar[x+c t],(fbar[x-c t]+fbar[x+c t])/2},{x,0,L},PlotRange->{-1,1}],{t,0,2}]