Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

Typedefs | Functions
Supersonic explosions
SDTGases.h: Air turbulence and explosions

## Typedefs
typedef struct SDTExplosion | SDTExplosion
| Opaque data structure for an explosion object.

## Functions
SDTExplosion * | SDTExplosion_new (long maxScatter, long maxDelay)
| Object constructor. More...
void | SDTExplosion_free (SDTExplosion *x)
| Object destructor. More...
void | SDTExplosion_setBlastTime (SDTExplosion *x, double f)
| Sets the duration of the initial spike. More...
void | SDTExplosion_setScatterTime (SDTExplosion *x, double f)
| Sets the duration of the scattering. More...
void | SDTExplosion_setDispersion (SDTExplosion *x, double f)
| Sets the balance between initial spike and successive scattering. More...
void | SDTExplosion_setDistance (SDTExplosion *x, double f)
| Sets the distance of the listener from the explosion. More...
void | SDTExplosion_setWaveSpeed (SDTExplosion *x, double f)
| Sets the propagation velocity of the shockwave. More...
void | SDTExplosion_setWindSpeed (SDTExplosion *x, double f)
| Sets the propagation velocity of the blast wind. More...
void | SDTExplosion_update (SDTExplosion *x)
| Updates the internal state of the object. Please call this function after having reset one or more synthesis parameters.
void | SDTExplosion_dsp (SDTExplosion *x, double *outs)
| Signal processing routine. Call this function at sample rate to synthesize an explosion sound. More...

## Detailed Description

Powerful explosions, as well as objects travelling at supersonic speed such as rifle bullets or cracking whip tails.

## Function Documentation

void SDTExplosion_dsp | ( | SDTExplosion * | x,
|  | double * | outs
| ) |  |

Signal processing routine. Call this function at sample rate to synthesize an explosion sound.

Returns
  Computed audio sample

void SDTExplosion_free | ( | SDTExplosion * | x | ) |

Object destructor.

Parameters

  [in] | x | Pointer to the instance to destroy

SDTExplosion* SDTExplosion_new | ( | long | maxScatter,
|  | long | maxDelay
| ) |  |

Object constructor.

Parameters

  [in] | maxScatter | Maximum scattering time, in samples)
  [in] | maxDelay | Maximum delay between explosion and sound, in samples

Returns
  Pointer to the new instance

void SDTExplosion_setBlastTime | ( | SDTExplosion * | x,
|  | double | f
| ) |  |

Sets the duration of the initial spike.

Parameters

  [in] | f | Blast time, in s

void SDTExplosion_setDispersion | ( | SDTExplosion * | x,
|  | double | f
| ) |  |

Sets the balance between initial spike and successive scattering.

Parameters

  [in] | f | Amount of scattering, [0,1]

void SDTExplosion_setDistance | ( | SDTExplosion * | x,
|  | double | f
| ) |  |

Sets the distance of the listener from the explosion.

Parameters

  [in] | f | Distance between explosion and listener, in m

void SDTExplosion_setScatterTime | ( | SDTExplosion * | x,
|  | double | f
| ) |  |

Sets the duration of the scattering.

Parameters

  [in] | f | Scattering time, in s

void SDTExplosion_setWaveSpeed | ( | SDTExplosion * | x,
|  | double | f
| ) |  |

Sets the propagation velocity of the shockwave.

Parameters

  [in] | f | Propagation velocity of the shockwave, in m/s

void SDTExplosion_setWindSpeed | ( | SDTExplosion * | x,
|  | double | f
| ) |  |

Sets the propagation velocity of the blast wind.

Parameters

  [in] | f | Propagation velocity of the blast wind, in m/s