from tdw.physics_audio.modes import Modes
This class is used only in PyImpact, which has been deprecated. See: Clatter
.
Resonant mode properties: Frequencies, powers, and times.
-
frequencies
A numpy array of mode frequencies in Hz. -
powers
A numpy array of mode onset powers in dB re 1. -
decay_times
A numpy array of mode decay times i.e. the time in ms it takes for each mode to decay 60dB from its onset power.
Modes(frequencies, powers, decay_times)
Parameter | Type | Default | Description |
---|---|---|---|
frequencies | np.ndarray | A numpy array of mode frequencies in Hz. | |
powers | np.ndarray | A numpy array of mode onset powers in dB re 1. | |
decay_times | np.ndarray | A numpy array of mode decay times i.e. the time in ms it takes for each mode to decay 60dB from its onset power. |
self.sum_modes()
self.sum_modes(fs=44100, resonance=1.0)
Create mode time-series from mode properties and sum them together.
Parameter | Type | Default | Description |
---|---|---|---|
fs | int | 44100 | The framerate. |
resonance | float | 1.0 | The object resonance. |
Returns: A synthesized sound.
Modes.mode_add(a, b)
(Static)
Add together numpy arrays of different lengths by zero-padding the shorter.
Parameter | Type | Default | Description |
---|---|---|---|
a | np.ndarray | The first array. | |
b | np.ndarray | The second array. |
Returns: The summed modes.