treble_tsdk.results.moving_ir

Classes

class treble_tsdk.results.moving_ir.MovingIR
__init__(data_loader: IRDataLoader, source: Source, receiver: Receiver, simulation_type: SimulationType, filter_definitions: list[FilterDefinition] = None)
convolve_with_audio_signal(audio: AudioSignal, device: DeviceObj | None = None, speed: float | None = None, positions: np.ndarray | None = None, receiver_orientation: Rotation | TrajectoryOrientation | list[Rotation] | None = None) → ConvolvedAudioSignal

Convolve the moving IR with an audio signal using the specified auralization method.

This method uses MovingAuralizer internally to handle the crossfading between IRs at different positions along the trajectory.

Parameters:
  • audio – The audio signal to convolve with the moving IR.

  • device – The device to render the spatial IRs for. If None, the spatial IRs will be used.

  • speed – Constant movement speed in m/s. If omitted and positions is also omitted, speed is chosen to traverse the full trajectory over the audio.

  • positions – Sampled distance along the trajectory, uniformly sampled over the audio duration. Scene schedules can be passed via DynamicPosition.get_positions_array().

  • receiver_orientation – A fixed Rotation, position-based TrajectoryOrientation, or time-sampled list of Rotation objects. A scene DynamicOrientation can be passed via DynamicOrientation.get_orientations_list().

Returns:

A ConvolvedAudioSignal containing the auralized output.

get_device_ir(point_index: int) → DeviceIR

Get the device impulse response of one trajectory point, as rendered by the solver onto the device receiver’s microphones.

get_ir_type() → ReceiverType

Gets the type of the IR of each point in the moving source/receiver.

get_mono_ir(point_index: int) → MonoIR
get_spatial_ir(point_index: int) → SpatialIR
get_speed_to_match_audio(audio: AudioSignal) → float

Compute the constant speed (m/s) at which traversing the full trajectory takes exactly audio.duration seconds.

Useful for inspecting the value that convolve_with_audio_signal will pick when speed=None.

Parameters:

audio – The dry audio signal whose duration should be matched.

Returns:

Speed in m/s such that trajectory_length / speed == audio.duration.

Raises:

ValueError – If the audio has zero duration or the trajectory has zero length.

get_srd_device_ir(point_index: int, simulation: Simulation | None = None) → DeviceIR

Deprecated, use get_device_ir(point_index). simulation is ignored.

Deprecated

‘get_srd_device_ir’ is deprecated, use ‘get_device_ir(point_index)’ instead.

Use MovingIR.get_device_ir instead.

get_trajectory() → Trajectory
plot(model=None)

Plot the moving impulse response with interactive visualization.

Creates an interactive Dash app with tabs for different plot types (Impulse Response, Frequency Response, Phase Response, EDC) and a slider to select which point along the trajectory to display.

Parameters:

model – Optional ModelObj. When provided, the right panel shows the 3D model view (like the trajectory plot) with the moving source/receiver position synced to the slider.

property point_count: int