Rich and complex liquid sound simulations can be generated through a stochastic population of bubbles, modeled by a sinusoidal oscillator bank with each voice modulated in amplitude and frequency according to desired probability distributions. A simple stochastic algorithm controls the behavior of the bubble population: Bubble generation rate follows a Bernoulli process, while radius and depth for each new bubble are chosen at random. To limit the presence of sudden peaks and glitches, voices are updated based on their age: The bubble with the lowest amplitude gets "killed" in favor of the new one.
Signal processing routine. Call this function at sample rate to obtain a liquid sound.
- Returns
- Output sample
Object destructor.
- Parameters
-
| [in] | x | Poiter to the instance to destroy |
Object constructor.
- Parameters
-
| [in] | Number | of voices in the oscillator bank |
- Returns
- Pointer to the new instance
Sets the amount of generated bubbles per second.
- Parameters
-
| [in] | f | Average number of bubbles per second |
| void SDTFluidFlow_setExpDepth |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Sets the gamma factor for the depth assignment.
- Parameters
-
| [in] | f | Depth gamma factor. O to 1 = shallower bubbles, > 1 = deeper bubbles |
| void SDTFluidFlow_setExpRadius |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Sets the gamma factor for the radius assignment.
- Parameters
-
| [in] | f | Radius gamma factor. O to 1 = bigger bubbles, > 1 = smaller bubbles |
| void SDTFluidFlow_setMaxDepth |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Sets the maximum depth value for the bubble population.
- Parameters
-
| [in] | f | Maximum depth value of the generated bubbles, [0, 1] |
| void SDTFluidFlow_setMaxRadius |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Sets the maximum radius for the bubble population.
- Parameters
-
| [in] | f | Maximum radius of the generated bubbles, in m [0.00015, 0.150] |
| void SDTFluidFlow_setMinDepth |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Sets the minimum depth value for the bubble population.
- Parameters
-
| [in] | f | Minimum depth value of the generated bubbles, [0, 1] |
| void SDTFluidFlow_setMinRadius |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Sets the minimum radius for the bubble population.
- Parameters
-
| [in] | f | Minimum radius of the generated bubbles, in m [0.00015, 0.150] |
| void SDTFluidFlow_setRiseCutoff |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Bubbles deeper than this threshold do not rise in frequency.
- Parameters
-
| void SDTFluidFlow_setRiseFactor |
( |
SDTFluidFlow * |
x, |
|
|
double |
f |
|
) |
| |
Sets the amount of blooping for the bubble population.
- Parameters
-
| [in] | f | Rise factor. Typical value for water = 0.1 |