treble_tsdk.results.device_ir¶
Device impulse response handling.
Provides the DeviceIR class for working with device-rendered impulse responses from spatial audio data.
Classes
Device impulse response class for handling device impulse response data |
- class treble_tsdk.results.device_ir.DeviceIR¶
Device impulse response class for handling device impulse response data
- __init__(data: np.ndarray, sampling_rate: float, spatial_ir: SpatialIR = None, time: np.ndarray = None, data_fd: tuple[np.ndarray, np.ndarray] = None, source: list['SourceResults'] = None, receiver: list['ReceiverResults'] = None, zero_pad_samples: int = 0, normalization_coefficient: float = None, labels: list[str] = None)¶
Class containing everything related to device impulse responses.
- Parameters:
data (np.ndarray) – The time domain device rendered impulse response
sampling_rate (float) – Sampling rate of impulse response
spatial_ir (SpatialIR | None) – The SpatialIR object associated with the Device impulse response
time (np.ndarray | None) – Time vector for the time series
data_fd (np.ndarray | None) – The device rendered transfer function and the frequency vector , defaults to None
source (SourceDto | None) – The source associated with the IR, defaults to None
receiver (ReceiverDto | None) – The receiver associated with the IR
normalization_coefficient (float | None) – Coefficient used to normalize data when written to .wav
- change_device(device: DeviceDefinition, orientation: Rotation = Rotation(azimuth=0.0, elevation=0.0, roll=0.0), ignore_max_frequency: bool = False) DeviceIR¶
Render a new device impulse response
- Parameters:
device (DeviceDefinition) – An object representing a device/head related transfer function
Rotation – orientation rotation of the device in orientation, defaults to 0.0
ignore_max_frequency (bool) – Whether to ignore the maximum frequency of the device (if it contains a maximum valid frequency)
- Return DeviceIR:
The resulting impulse response object for the device