Skip to main content

Using devices as receivers

If a device with microphones is placed within a simulation, the signal they record is automatically processed and stored as a DeviceIR. Device impulse responses contain a channel of rendered signal for each microphone on the device:

results = sim.get_results_object()

device_ir = results.get_device_ir("kitchen-talker", "device")
device_ir.plot()

To use your device exclusively as a receiver, inject a spatial receiver into your simulation and render the device after the simulation has finished running. In the example above, the couch-listener spatial receiver can be repurposed as a microphone device by rendering the receiver's spatial IR:

spatial_ir = results.get_spatial_ir("kitchen-talker", "couch-listener")
device_ir = spatial_ir.render_device_ir(
device=device,
orientation=treble.Rotation(azimuth=90, elevation=0, roll=0),
)