I know that if we run these formulas on some software like MatLab, we can obtain the waveforms of some effects:

- Ping wave:

f(t) = sin(2*pi*t*f) * exp(-t*4)

f(t) = sin(2*pi*t*f) * exp(-t*4) * (1 - exp( -t*10 )) * 2

- Ding-Dong wave

f(t) = sin(2*pi*t*725) * exp(-t*5) * (1 - exp(-t*30)) + (step(t-5) - step(t-.3)) * sin(2*pi*(t-.3)*565) * 1.3 * exp(-(t-.3)*5) * (1 - exp(-(t-.3)*30))

Here pi is π; step is a function that returns: 0 for t < 0, 1 for t >= 0; f is the frequency in Hertz.

Does anyone knows other formulas like these? I'm not looking for filters, or whatelse; i'm interested in equations to reproduce sounds like those I posted. Also links to books, sites, etc are welcome.

Thanks everyone!

  • 3
    Be careful with your terminology. Wave equation is a loaded term, meaning something very precise to electrical engineers, and something completely different than what you're looking for to mechanical and acoustic engineers. Physicists as well.
    – MBraedley
    Commented Sep 9, 2011 at 2:09
  • @MBraedley: while it's true that you would not normally call such equations wave equations, you can't say it's wrong: all of these are equations that have some particular types of waves as a solution (if we take wave to mean a bounded function function defined on all ℝⁿ). Wave equations would normally be differential equations rather than such trivially-solvable pointwise definitions, but that's just because the involved physics happens to be of the form of differential equations. Commented Sep 10, 2011 at 14:43
  • @MBraedly is there a more precise term to use in this context? We can always edit the question to make it clearer.
    – Warrior Bob
    Commented Sep 11, 2011 at 16:12

2 Answers 2


The area of synthesis that's closest to the formulas you posted is additive synthesis. Before I get into some sounds, one useful way to break up the formulas is into a waveform and an envelope. For example, in the following formula you posted, the waveform is the sin() part, and the envelope is the combination of exp() functions:

f(t) = sin(2*pi*t*f) * exp(-t*4) * (1 - exp( -t*10 )) * 2

In fact, it's helpful if you think in terms of standard components of an analog synth--Waveforms, Envelopes, and LFOs. An example of an LFO would be using a low frequency sinusoid as an envelope, as follows:

Amplitude Modulation

sin(2*pi*t*f) * sin(2*pi*t*.01*f) * exp(-t*4)

Or you could use the LFO to modulate the frequency instead:

Frequency Modulation

sin(2*pi*t * sin(2*pi*t*.003*f)) * exp(-t*4)

Then you can get into different waveform types. For example, a sawtooth with three harmonics:

Sawtooth Wave

exp(-t*4) * (sin(2*pi*t*f) + 1/2 * sin(2*pi*t*f*2) + 1/3 * sin(2*pi*t*f*3))

To add more harmonics to the sawtooth, the amplitudes are equal the inverse of the frequency, so the next few terms would be:

1/4 * sin(2*pi*t*f * 4) + 1/5 * sin(2*pi*t*f * 5) + ... + 1/n * sin(2*pi*t*f * n) 

The first few terms of a square wave, on the other hand, are:

Square Wave

exp(-t*4) * (sin(2*pi*t*f) + 1/3 * sin(2*pi*t*f*3) + 1/5 * sin(2*pi*t*f*5))

The formula is the same as the sawtooth, except only odd frequencies are used (i.e. 1,3,5,7,9,11...).

Those formulas are derived using Fourier Series, and if you've had any calculus, I'd recommend these Stanford lectures as an introduction.

Just mixing and matching various envelopes and waveforms can yield a large number of sounds, but here are a few other things to try:


 sin(2*pi*t*f) +  sin(2*pi*t*f*1.005) +  sin(2*pi*t*f*.995)

Inharmonic Frequencies

Just about any "random" combination of frequencies will yield some kind of metallic-type sound.

 exp(-t*4) * (sin(2*pi*t*f) + sin(2*pi*t*f*2.13232) + sin(2*pi*t*f*6.12342))

Analog Kick Drum

The trick with these is to modulate both the frequency and the amplitude with an exponential.

 exp(-t*4) * sin(2*pi*t*f * exp(-t*20))

Reese Bass

This is just two sawtooths at 55hz, detuned by 50 cents (i.e. a factor of 2^(50/1200) = 1.0293)

detune = 1.0293
sin(2*pi*t*f) + 1/2 * sin(2*pi*t*f*2) + 1/3 * sin(2*pi*t*f*3) + 
sin(2*pi*t*f*detune) + 1/2 * sin(2*pi*t*f*2*detune) + 1/3 * sin(2*pi*t*f*3*detune)


It's really much easier to do this type of thing (i.e. sound rendering) with full programs rather than individual formulas. If you want to get deeper into it, take a look at my answer to a related question here. Everything I reference there can be used as theory for deriving your own formulas.

  • Great answer, full of references and examples! thanks a lot!
    – Tommaso
    Commented Sep 16, 2011 at 13:24

Sound On Sound magazine has a series of articles on audio synthesis freely available on their website, outlining the theory and math involved in a variety of traditional synthesis techniques.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.