rimio / specgram Goto Github PK
View Code? Open in Web Editor NEWSmall program that computes and plots spectrograms, either in a live window or to disk, with support for stdin input.
License: MIT License
Small program that computes and plots spectrograms, either in a live window or to disk, with support for stdin input.
License: MIT License
First sentence under Display Options
reads You will notice that there isn't much difference between the output of the above command and the others
which makes no sense, as the rx_sdr
example has been added.
then you can use the -q
-> then you can use -q
Fix these.
Unit testing for testable things like ColorMap
, FFT
, InputParser
, InputReader
, parts of Renderer
, ValueMap
, WindowFunction
.
Log info message when file is written to disk.
Run valgrind on a bunch of functional tests.
Header files should explain way better the purpose and workings of the module.
The jet colormap is a classic, but I have to admit it looks like crap for live (scrolling) spectrograms.
A cool but easy on the eyes colormap is required.
This seems to be a default behavior in multiple CLI tools, so it should be supported by specgram as well.
Mismatch:
project (specgram VERSION 1.0.0 LANGUAGES CXX)
# Version
set (VERSION_MAJOR 0)
set (VERSION_MINOR 9)
set (VERSION_PATCH 2)
Allow definition of custom scale strings using the -s, --scale
options.
dBFS
will remain a special case and default option, as it uses the dBFSValueMap
which clamps the values to an upper limit of 0.
Add new LinearValueMap
and dBValueMap
value maps which map the values accordingly.
If the string begins with db
or dB
then it defaults to dBValueMap
and the rest of the string is used for display purposes. Limits can be specified with, maybe, commas? I.e. -s dBm,20,-20
specifies the limits for a dBValueMap
.
Otherwise it uses a LinearValueMap
with the limits specified as above.
As per one user's request:
(also, I wonder if it would make sense for specgram to stop whenever the stream ends; I'm guessing around AsyncInputReader::ReachedEOF(). Since, once we get an EOF on stdin, there should be no way to get more data in... right?)
While good for latency during high throughput scenarios, it's not necessarily nice to keep a CPU at 100% while waiting for input.
Explore the ideas of:
std::this_thread::sleep_for
in the two cases where we wait for input within the main loopAllow dumping of PNG image data to stdout, where the user can display it with imagemagick
. E.g.:
specgram -i infile - | display
LiveOutput
caches the Configuration
object, but also caches ColorMap and ValueMap. Maybe split relevant stuff from Configuration
?Renderer
caches Configuration
, maybe shouldnt?Renderer::*fft_area*
stuff refer to the spectrogram fields, so should be named accordingly.const auto MustDumpToStdout() const
-> auto MustDumpToStdout() const
On latest Gentoo install, using i3
, Esc
key does not close window.
Rename all factory methods to something like Build(...)
.
The program's logging needs are rather simplistic, so there's no need to keep spdlog
as a dependency, especially after the incompatibility issues with fmt 8.0.0
.
Write own logging routine.
Build fails under ArchLinux, cannot find std::clamp()
.
$ ./specgram -lq -x 1 -y 100
[INFO] Creating 1024-wide FFTW plan
[INFO] Scale decibel, unit FS, bounds [-120, 0]
specgram: /home/rimio/git/specgram/src/renderer.cpp:396: std::__cxx11::list<std::tuple<double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > Renderer::GetNiceTicks(double, double, const string&, unsigned int, unsigned int, bool): Assertion `fval <= v_max' failed.
Aborted (core dumped)
Write functional tests that make sure the overall output to known inputs is correct.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.