Skip to content

Latest commit

 

History

History
64 lines (36 loc) · 1.58 KB

File metadata and controls

64 lines (36 loc) · 1.58 KB

Modes

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.


Fields

  • 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.


Functions

__init__

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.

sum_modes

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.

mode_add

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.