Generate buzzer sound I'm trying to generate a buzzer sound like this one in matlab.



When you look at the waveform, it's got sinusoidal notches cut into an otherwise normal looking sinewave.

I generate a sinewave tone, 

fs = 44100 ;
t = 0 : (1/fs) : 2 ;
f = 200 ;
y = 0.5*(sin( f*2*pi*t )) ;
sound( y, fs ) ;


I don't know how to cut the notches! How would you do it, so it sounds "buzzy"?

The spectrum:
Based on the spectrum, it looks to me like this was generated by FM synthesis. The mathematics of starting with a sound and working backwards to generate it using FM synthesis can be time consuming. The best reference I know of is Computer Music. I've seen pdf editions of this book online that I thought were legal, but I'm only seeing illegal looking things now, so I'm not linking.

Some simpler approximations that might work, but almost certainly won't sound the same:


white noise with a bandpass filter. (maybe plus a little clipped sine wave)
a clipped sine wave or square wave through a low pass filter. (subtractive synthesis)