|
HARDT - The Ham Radio DSP Toolkit
|
Hardt is a simple framework that encapsulates standard DSP concepts in use when you want to play around with digital sampled sound (or RF). The framework provides building blocks such as generators, filters and soundcard in- and output.
By combining a set of building blocks, one can construct a DSP chain to perform almost any task imaginable. However, the simplicity of the framework comes with a price!.. There will be a performance hit since many operations could be combined and optimized if you where to design a production-quality application that performs. This performance hit is never the less by design since the framework is aimed mostly at experimenting, fixing small one-time jobs or writing smaller applications that do not need to perform to the highest level.
Hardt is based on a Readers and Writers concept, so that the (very) general architecture of a DSP chain implemented using Hardt would be (input)reader -> reader -> processor -> writer -> writer(output). The processor being the "motor" driving samples through the chain (no reader ever pushes data, nor does any writer unless written to).
All you have to do is to construct a chain that could look something like this: HSoundcardReader -> HFilter -> HFilter -> HGain -> HStreamProcessor -> HMultiplier -> HFilter -> HGain -> HSoundcardWriter Look into the examples section where you will find a few very simple examples demonstrating how to construct such a chain. There are also an example on how to transfer samples over the network, and a bit larger example showing how one could construct a receiver for the SAQ/Grimeton VLF transmitter.
Current version of Hardt is 1.2-13.
A prebuild Debian package can be downloaded here: http://hardttoolkit.org/hardt_1.2-13_amd64.deb Install the package with the command "dpkg -i hardt_1.2-13_amd64.deb
If you want the source, it is available here: http://hardttoolkit.org/hardt_1.2.orig.tar.gz or on Gitub: https://github.com/The3rdPlace/Hardt
Hardt builds on Linux, RaspBerry (raspian) and MacOS (you need to brew clang and cmake). Windows is in the pipeline but not there yet. Unpack the sources, run cmake and then make. I prefer out-of-source builds, so for me, that would be: "mkdir build; cd build; cmake ../.; make" and optionally "make install"
Hardt depends on the following packages as well as your standard (clang) c++ build tools:
Hardt provides the most commonly needed building blocks for DSP applications. That is in- and output from soundcards or files (pcm or wav format), filters, generators (sine/cosine), gain/attenuation and some utility classes such as FFT spectrum calculation, signallevel monitor and splitters.
Should you need something that is not provided by Hardt, you just pick a class that is the closest match, inherit and extend it
Hardt is a quite new framework so it is not complete.! Basic audio DSP processing is covered but there is no modulators/demodulators, rtty-generators or FT8 support. Also input from the RTL dongles is very high on the wishlist, but not yet available.
During development of a DSP application, you may want to test your parameters for the filters, checking the output spectrum at various stages and so forth. A good tip is to start with a small sample of the signal you wish to process, then use a HFileReader (for PCM) or HWavReader (for wav files) as the input, and then a corresponding HfileWriter og HWavWriter as the output, then use the "dspcmd" tool to check the spectrum of the output file. Run the command "dspcmd -h" to get help on how to use the dspcmd tool - it can do a lot of things.
Finally, if you need advice or have a problem you want to report, please contact me at henrik@hardttoolkit.org. Also, I would love to present a list of projects using this framework, so please let me know If you have a project that uses Hardt.
1.8.17