Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

Typedefs | Functions
Breaking
SDTControl.h: Compound solid interactions

## Typedefs
typedef struct SDTBreaking | SDTBreaking
| Opaque data structure for the breaking object.

## Functions
SDTBreaking * | SDTBreaking_new ()
| Object constructor. More...
void | SDTBreaking_free (SDTBreaking *x)
| Object destructor. More...
void | SDTBreaking_setStoredEnergy (SDTBreaking *x, double f)
| Sets the total energy stored in the object. More...
void | SDTBreaking_setCrushingEnergy (SDTBreaking *x, double f)
| Sets the crushing energy. More...
void | SDTBreaking_setGranularity (SDTBreaking *x, double f)
| Sets the event density of the crumpling process. More...
void | SDTBreaking_setFragmentation (SDTBreaking *x, double f)
| Sets the amount of progressive fragmentation of the object during the process. More...
void | SDTBreaking_reset (SDTBreaking *x)
| Resets the crumpling process, restoring its initial energy and triggering the first micro impact. More...
void | SDTBreaking_dsp (SDTBreaking *x, double *outs)
| Single iteration of the whole breaking process. Call this routine in a loop to simulate a breaking process. The loop should end when SDTBreaking_hasFinished() returns true. More...
int | SDTBreaking_hasFinished (SDTBreaking *x)
| Checks if the breaking process is finished, i.e. if the remaining energy is 0. More...

## Detailed Description

Control layer for the impact model, generating breaking sonic textures. Two main outputs are exposed: energy and size. The former should be used to control the impact velocity, the latter should be used to control the size of the resonators.

## Function Documentation

void SDTBreaking_dsp | ( | SDTBreaking * | x,
|  | double * | outs
| ) |  |

Single iteration of the whole breaking process. Call this routine in a loop to simulate a breaking process. The loop should end when SDTBreaking_hasFinished() returns true.

Parameters

  [out] | outs | Pointer to the output array: impact energy and fragment size

void SDTBreaking_free | ( | SDTBreaking * | x | ) |

Object destructor.

Parameters

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

int SDTBreaking_hasFinished | ( | SDTBreaking * | x | ) |

Checks if the breaking process is finished, i.e. if the remaining energy is 0.

Returns
  1 (true) if the remaining energy is <= 0, 0 (false) otherwise.

SDTBreaking* SDTBreaking_new | ( |  | ) |

Object constructor.

Returns
  Pointer to the new instance

void SDTBreaking_reset | ( | SDTBreaking * | x | ) |

Resets the crumpling process, restoring its initial energy and triggering the first micro impact.

Parameters

  [out] | outs | Pointer to the output array: impact energy and fragment size

void SDTBreaking_setCrushingEnergy | ( | SDTBreaking * | x,
|  | double | f
| ) |  |

Sets the crushing energy.

Parameters

  [in] | f | Average energy of the micro impacts, compared to the global energy of the process, in N

void SDTBreaking_setFragmentation | ( | SDTBreaking * | x,
|  | double | f
| ) |  |

Sets the amount of progressive fragmentation of the object during the process.

Parameters

  [in] | f | Object fragmentation [0, 1]

void SDTBreaking_setGranularity | ( | SDTBreaking * | x,
|  | double | f
| ) |  |

Sets the event density of the crumpling process.

Parameters

  [in] | f | Event density [0, 1]

void SDTBreaking_setStoredEnergy | ( | SDTBreaking * | x,
|  | double | f
| ) |  |

Sets the total energy stored in the object.

Parameters

  [in] | f | Total stored energy consumed by the micro impacts, in N