|
EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
|
The SignalWaveformPanel provides a preview of downsampled time-series waveforms of each Signal in the active Project. More...
#include <SignalWaveformPanel.hpp>
Classes | |
| struct | CallbackData |
Public Member Functions | |
| SignalWaveformPanel (Worker *parent_worker, WorkerResultDespatcher &despatcher, const Project *initial_project=nullptr) | |
| Create a new SignalWaveformPanel to display downsampled Signal waveforms in the time domain. | |
| SignalWaveformPanel (const SignalWaveformPanel &)=delete | |
| SignalWaveformPanel & | operator= (const SignalWaveformPanel &)=delete |
| SignalWaveformPanel (SignalWaveformPanel &&) noexcept | |
| SignalWaveformPanel & | operator= (SignalWaveformPanel &&) noexcept=delete |
| const char * | get_imgui_name () const noexcept override |
| Retrieves the name of the IPanel for Dear ImGui API functions. | |
| void | draw () noexcept override |
| Draw the panel to the active rendering context. | |
| void | change_active_project (const Project *new_project) override |
| Updates the active Project being described by the IPanel. | |
| Public Member Functions inherited from echomap::IPanel | |
| virtual void | update_gpu (const wgpu::CommandEncoder &command_encoder) |
| Delegate work to the GPU via the WebGPU platform. | |
Static Public Member Functions | |
| static const char * | get_imgui_stable_name () noexcept |
Private Member Functions | |
| void | handle_downsampled_result (DownsampleResult &&result) |
| void | update_bounding_box (const Signal &signal) noexcept |
| void | update_bounding_box () noexcept |
| const Signal * | get_downsampled_signal (std::shared_ptr< Signal > signal) |
| Retrieves a downsampled Signal from the cache. | |
Static Private Member Functions | |
| static ImPlotPoint | get_indexed_signal_point (int index, void *user_data) noexcept |
Private Attributes | |
| std::unordered_map< id_type, std::unique_ptr< Signal > > | downsample_cache |
| The duplicated Signal objects, downsampled for visualisation. | |
| ImPlotRect | bounding_box |
| The maximum bounding box of an LTTB-downsampled wave form plot. | |
| std::string | panel_name |
| ImPlotSpec | plotting_spec_2d |
| Worker * | parent_worker |
| const Project * | active_project = nullptr |
| std::vector< sigc::scoped_connection > | connections |
Static Private Attributes | |
| static constexpr float | default_downsample_factor = 50.0f |
Additional Inherited Members | |
| Static Protected Attributes inherited from echomap::IPanel | |
| static constexpr ImVec2 | button_size {80.0f, 20.0f} |
| static constexpr auto | table_flags |
The SignalWaveformPanel provides a preview of downsampled time-series waveforms of each Signal in the active Project.
Additionally, the panel owns the downsampled time series in a cache used exclusively for visualisation.
Definition at line 32 of file SignalWaveformPanel.hpp.
|
explicit |
Create a new SignalWaveformPanel to display downsampled Signal waveforms in the time domain.
The SignalWaveformPanel consumes the DownsampleResult message.
| parent_worker | The Worker to receive ITask commands over the command bus. |
| despatcher | The despatcher to expose the result buses. |
| initial_project | An optional initial Project for the IPanel to display. |
Definition at line 23 of file SignalWaveformPanel.cpp.
|
overridevirtual |
Updates the active Project being described by the IPanel.
| new_project | An observing pointer to the new active Project. |
Implements echomap::IProjectPanel.
Definition at line 96 of file SignalWaveformPanel.cpp.
|
overridevirtualnoexcept |
Draw the panel to the active rendering context.
Implements echomap::IPanel.
Definition at line 52 of file SignalWaveformPanel.cpp.
|
private |
Retrieves a downsampled Signal from the cache.
If the downsampled variant is not present, it is computed and cached.
| signal | The original Signal to downsample. |
Definition at line 163 of file SignalWaveformPanel.cpp.
|
nodiscardoverridevirtualnoexcept |
Retrieves the name of the IPanel for Dear ImGui API functions.
Implements echomap::IPanel.
Definition at line 47 of file SignalWaveformPanel.cpp.
|
staticnoexcept |
Definition at line 105 of file SignalWaveformPanel.cpp.
|
staticprivatenoexcept |
Definition at line 135 of file SignalWaveformPanel.cpp.
|
private |
Definition at line 110 of file SignalWaveformPanel.cpp.
|
privatenoexcept |
Definition at line 155 of file SignalWaveformPanel.cpp.
|
privatenoexcept |
Definition at line 144 of file SignalWaveformPanel.cpp.
|
private |
Definition at line 122 of file SignalWaveformPanel.hpp.
|
private |
The maximum bounding box of an LTTB-downsampled wave form plot.
The Y axis (amplitude) is fixed, since our PCM-normalised values, given as a constraint from the Signal samples, are within a fixed range. The X range is variable and should be updated as new Signal objects are received.
Definition at line 117 of file SignalWaveformPanel.hpp.
|
private |
Definition at line 123 of file SignalWaveformPanel.hpp.
|
staticconstexprprivate |
Definition at line 67 of file SignalWaveformPanel.hpp.
|
private |
The duplicated Signal objects, downsampled for visualisation.
This map associates the IDs of the original Signal objects with owning containers of their downsampled counterparts.
It is typically undesirable for the panels to own any non-trivial state. In this case, however, the data is generated exclusively for the purposes of visualisation on this panel, and the elements' construction and destruction is at the whim of the renderer such that downsampled time series are only created ad-hoc when they need to be visualised. Therefore, the SignalWaveformPanel seems to be the natural owner.
Definition at line 109 of file SignalWaveformPanel.hpp.
|
private |
Definition at line 119 of file SignalWaveformPanel.hpp.
|
private |
Definition at line 121 of file SignalWaveformPanel.hpp.
|
private |
Definition at line 120 of file SignalWaveformPanel.hpp.