Skip to content

Commit

Permalink
Refine GUI and add notice to README
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Aug 22, 2021
1 parent d121b18 commit 8c2bc8d
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 39 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Signal Estimator
- [Supported platforms](#supported-platforms)
- [Dependencies](#dependencies)
- [Installation](#installation)
- [Graphical interface](#graphical-interface)
- [Command-line options](#command-line-options)
- [Measuring latency](#measuring-latency)
- [Measuring losses](#measuring-losses)
Expand All @@ -26,7 +27,7 @@ Signal Estimator
Features
--------

`signal-estimator` is a small command-line tool allowing to measure different characteristics of the signal looped back from audio output to audio input.
`signal-estimator` is a small command-line and GUI tool allowing to measure different characteristics of the signal looped back from audio output to audio input.

Features:

Expand Down Expand Up @@ -112,6 +113,17 @@ Install into the system (optionally):
sudo make install
```

Graphical interface
-------------------

The tools comes with a simple GUI (`signal-estimator-gui`) that plots the signal in the real-time. It can be especially useful for troubleshooting problems with measurements.

It uses Qt and Qwt libraries. Internally, it invokes the command-line tool (`signal-estimator`) and parses its output.

Here is how it looks like:

<img src="https://github.com/gavv/signal-estimator/blob/main/doc/screenshot.png" width="600" />

Command-line options
--------------------

Expand Down Expand Up @@ -294,7 +306,7 @@ Note: Here `sw_hw` means `sw+hw` - total software + hardware latency, including
Dumping streams
---------------

In any mode, including `noop` mode, you can specify `--dump-output` and `--dump-input` options to dump output and input samples and their timestamps to text files.
In any mode, including `noop` mode, you can specify `--dump-output` and `--dump-input` options to dump output and input samples and their timestamps to text files or stdout (use `-`).

To reduce the file size, we dump only one maximum value per frame. To reduce the file size even more, we round every dumped value, and drop value if it's the same as the previois one. The frame size and rounding factor are configurable via command-line.

Expand Down Expand Up @@ -358,6 +370,8 @@ Acknowledgments

This tool was initially developed for a freelance project. Big thanks to my customer Samuel Blum at Boring Technologies, who sponsored the development and has kindly allowed to make it open-source!

And of course, thanks to everyone who contributed to the project!

Authors
-------

Expand Down
Binary file added doc/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
227 changes: 190 additions & 37 deletions src/gui/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>830</height>
<width>879</width>
<height>894</height>
</rect>
</property>
<property name="minimumSize">
Expand Down Expand Up @@ -39,6 +39,9 @@
<height>700</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
Expand All @@ -47,17 +50,11 @@
<rect>
<x>0</x>
<y>0</y>
<width>552</width>
<height>698</height>
<width>845</width>
<height>700</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout_4">
<property name="horizontalSpacing">
<number>4</number>
</property>
<property name="verticalSpacing">
<number>4</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>4</number>
</property>
Expand All @@ -70,7 +67,7 @@
<property name="bottomMargin">
<number>4</number>
</property>
<item row="0" column="0" colspan="2">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QComboBox" name="OutputDevices">
Expand Down Expand Up @@ -150,44 +147,207 @@
</item>
</layout>
</item>
<item row="1" column="1">
<item>
<widget class="QFrame" name="frame">
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>10</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="StopButton">
<widget class="QPushButton" name="StartButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Stop graphing. Please wait for the sounds of signal-estimator to stop&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Run signal-estimator and graph the results&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Stop</string>
<string>Start</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="StartButton">
<widget class="QPushButton" name="StopButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Run signal-estimator and graph the results&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Stop graphing. Please wait for the sounds of signal-estimator to stop&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Start</string>
<string>Stop</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="OutputLabel">
<property name="text">
<string>Output (Emitted) == red / Input (Captured) == blue</string>
<item>
<widget class="QFrame" name="frame_3">
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>10</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<item>
<widget class="QwtPlot" name="OutputSig">
<property name="autoReplot">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>10</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: red;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="OutputLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Output signal (emitted)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_4">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: blue;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Input signal (captured)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
Expand Down Expand Up @@ -252,16 +412,16 @@
<number>6</number>
</property>
<property name="minimum">
<double>0.0</double>
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>1.0</double>
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.1</double>
<double>0.100000000000000</double>
</property>
<property name="value">
<double>1.0</double>
<double>1.000000000000000</double>
</property>
</widget>
</item>
Expand Down Expand Up @@ -580,22 +740,15 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="ErrorLabel_2">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>22</height>
<width>879</width>
<height>28</height>
</rect>
</property>
</widget>
Expand Down

0 comments on commit 8c2bc8d

Please sign in to comment.