Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

Typedefs | Functions
Bubbles
SDTLiquids.h: Liquid sounds

## Typedefs
typedef struct SDTBubble | SDTBubble
| Opaque data structure representing a bubble object.

## Functions
SDTBubble * | SDTBubble_new ()
| Object constructor. More...
void | SDTBubble_free (SDTBubble *x)
| Object destructor. More...
void | SDTBubble_setRadius (SDTBubble *x, double f)
| Sets the bubble radius. More...
void | SDTBubble_setDepth (SDTBubble *x, double f)
| Sets the bubble depth. More...
void | SDTBubble_setRiseFactor (SDTBubble *x, double f)
| Sets the amount of blooping. More...
void | SDTBubble_update (SDTBubble *x)
| Triggers a new bubble.
void | SDTBubble_normAmp (SDTBubble *x)
| Sets bubble amplitude to the maximum instead of computing it from radius and depth.
double | SDTBubble_dsp (SDTBubble *x)
| Signal processing routine. Call this function at sample rate to obtain a bubble sound. More...

## Detailed Description

The main responsible for acoustic emission in water and other liquids, rather than the liquid mass on its own, is the gas trapped inside emerging as a population of bubbles. From a physical point of view, a spherical bubble acts as an exponentially decaying sinusoidal oscillator. Frequency, decay time and relative amplitude of each bubble can be derived from its radius and depth.

When the bubble is formed close to the surface and therefore the effective mass around the liquid is reduced, the oscillating frequency rises and a characteristic ''blooping'' sound is generated. The amount of blooping can be set as an independent parameter in the model.

## Function Documentation

double SDTBubble_dsp | ( | SDTBubble * | x | ) |

Signal processing routine. Call this function at sample rate to obtain a bubble sound.

Returns
  Output sample

void SDTBubble_free | ( | SDTBubble * | x | ) |

Object destructor.

Parameters

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

SDTBubble* SDTBubble_new | ( |  | ) |

Object constructor.

Returns
  Pointer to the new instance

void SDTBubble_setDepth | ( | SDTBubble * | x,
|  | double | f
| ) |  |

Sets the bubble depth.

Parameters

  [in] | f | Bubble depth [0, 1]. 0 means very deep, 1 means touching the surface.

void SDTBubble_setRadius | ( | SDTBubble * | x,
|  | double | f
| ) |  |

Sets the bubble radius.

Parameters

  [in] | f | Bubble radius, in m [0.00015, 0.150]

void SDTBubble_setRiseFactor | ( | SDTBubble * | x,
|  | double | f
| ) |  |

Sets the amount of blooping.

Parameters

  [in] | f | Rise factor, positive scalar. Typical value for bubbles in water = 0.1