{"id":13434938,"url":"https://github.com/jgaeddert/liquid-dsp","last_synced_at":"2025-05-13T19:04:15.725Z","repository":{"id":899990,"uuid":"655580","full_name":"jgaeddert/liquid-dsp","owner":"jgaeddert","description":"digital signal processing library for software-defined radios","archived":false,"fork":false,"pushed_at":"2025-04-20T20:46:55.000Z","size":25805,"stargazers_count":1981,"open_issues_count":150,"forks_count":460,"subscribers_count":132,"default_branch":"master","last_synced_at":"2025-04-28T01:44:32.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://liquidsdr.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgaeddert.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-05-07T20:11:10.000Z","updated_at":"2025-04-26T19:46:12.000Z","dependencies_parsed_at":"2024-05-21T20:49:39.250Z","dependency_job_id":"233d5935-b537-4990-9196-d3961364d33a","html_url":"https://github.com/jgaeddert/liquid-dsp","commit_stats":{"total_commits":6884,"total_committers":36,"mean_commits":"191.22222222222223","dds":"0.30142359093550264","last_synced_commit":"7a624d6dd24f32bb658b721b4a90586c1024f489"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-dsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-dsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-dsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-dsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgaeddert","download_url":"https://codeload.github.com/jgaeddert/liquid-dsp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010798,"owners_count":21998993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:00:28.148Z","updated_at":"2025-05-13T19:04:15.707Z","avatar_url":"https://github.com/jgaeddert.png","language":"C","funding_links":[],"categories":["C","Algorithm","Data processing"],"sub_categories":["math library","DSP and Filtering"],"readme":"\nliquid-dsp documentation\n========================\n\nSoftware-Defined Radio Digital Signal Processing Library -\n`https://liquidsdr.org \u003chttps://liquidsdr.org\u003e`_\n\nliquid-dsp is a free and open-source digital signal processing (DSP)\nlibrary designed specifically for software-defined radios on embedded\nplatforms. The aim is to provide a lightweight DSP library that does not\nrely on a myriad of external dependencies or proprietary and otherwise\ncumbersome frameworks. All signal processing elements are designed to be\nflexible, scalable, and dynamic, including filters, filter design,\noscillators, modems, synchronizers, complex mathematical operations, and\nmuch more.\n\n.. code-block:: c\n\n    // get in, process data, get out\n    #include \u003cliquid/liquid.h\u003e\n    int main() {\n        unsigned int M  = 4;     // interpolation factor\n        unsigned int m  = 12;    // filter delay [symbols]\n        float        As = 60.0f; // filter stop-band attenuation [dB]\n\n        // create interpolator from prototype\n        firinterp_crcf interp = firinterp_crcf_create_kaiser(M,m,As);\n        float complex x = 1.0f;  // input sample\n        float complex y[M];      // interpolated output buffer\n\n        // repeat on input sample data as needed\n        {\n            firinterp_crcf_execute(interp, x, y);\n        }\n\n        // destroy interpolator object\n        firinterp_crcf_destroy(interp);\n        return 0;\n    }\n\n\nFor more information, please refer to the\n`documentation \u003chttps://liquidsdr.org/doc\u003e`_ online.\n\nInstallation and Dependencies\n=============================\n\nliquid-dsp only relies on ``libc`` and ``libm`` (standard C and math)\nlibraries to run; however liquid will take advantage of other libraries\n(such as `FFTW \u003chttp://www.fftw.org)\u003e`_ if they are available.\nStarting with version 1.7.0, liquid-dsp has moved to the\n`CMake \u003chttps://cmake.org\u003e`_ build system which can be installed with\n``brew install cmake`` on macOS,\n``sudo apt-get install cmake`` on Debian variants.\n\nInstallation\n------------\n\nThe recommended way to obtain the source code is to clone the entire\n`repository \u003chttps://github.com/jgaeddert/liquid-dsp\u003e`_ from\n`GitHub \u003chttps://github.com\u003e`_:\n\n.. code-block:: bash\n\n    git clone git://github.com/jgaeddert/liquid-dsp.git\n\nBuilding and installing the main library is a simple as\n\n.. code-block:: bash\n\n    mkdir build\n    cd build\n    cmake ..\n    make\n    sudo make install\n\nIf you are installing on Linux for the first time, you will also need\nto rebind your dynamic libraries with ``sudo ldconfig`` to make the\nshared object available.\nThis is not necessary on macOS.\n\n\nRun all test scripts\n--------------------\n\nSource code validation is a critical step in any software library,\nparticularly for verifying the portability of code to different\nprocessors and platforms. Packaged with liquid-dsp are a number of\nautomatic test scripts to validate the correctness of the source code.\nThe test scripts are located under each module's ``tests/`` directory and\ntake the form of a C source file. When configured with ``BUILD_AUTOTESTS``\nenabled, these tests are parsed, compliled, and linked into an executable\nwhich will run the tests.\n\n.. code-block:: bash\n\n    ./xautotest\n    # ...\n    # autotest seed: 1738416409\n    # ==================================\n    #  PASSED ALL 716450 CHECKS\n    # ==================================\n\nThere are currently more than 700,000 checks across 1,316 tests to verify\nfunctional correctness. Drop me a line if these aren't running on your platform.\n\nTesting Code Coverage\n---------------------\n\nIn addition to the full test suite, you can configure ``gcc`` to export symbol\nfiles to check for code coverage and then use ``gcovr`` to generate a full\nreport of precisely which lines are covered in the autotests. These symbol\nfiles aren't generated by default and need to be enabled at compile-time\nthrough a CMake option:\n\n.. code-block:: bash\n\n    cmake -DBUILD_AUTOTESTS=ON -DCOVERAGE=ON ..\n\nA coverage report can be generated by running the autotests and running\n`gcovr \u003chttps://gcovr.com/en/stable/\u003e`_:\n\n.. code-block:: bash\n\n    make -j4 xautotest\n    ./xautotest -q -o autotest.json\n    cd ..\n    gcovr --filter=\"src/.*/src/.*.c\" --print-summary\n    # ...\n    # ------------------------------------------------------------------------------\n    # TOTAL                                      20730   17014    82%\n    # ------------------------------------------------------------------------------\n    # lines: 82.1% (17014 out of 20730)\n    # functions: 62.9% (1742 out of 2770)\n    # branches: 64.0% (5676 out of 8874)\n\nExamples\n--------\n\nNearly all signal processing elements have a corresponding example in\nthe ``examples/`` directory.  Most example scripts generate an output\n``.m`` file for plotting with `GNU octave \u003chttps://www.gnu.org/software/octave/\u003e`_\nAll examples are built as stand-alone programs and can be compiled with\nthe ``BUILD_EXAMPLES`` CMake flag:\n\n.. code-block:: bash\n\n    cmake -DBUILD_EXAMPLES=ON ..\n    make\n    ./examples/modem_example -m qpsk\n    # \u003cliquid.modemcf, scheme=\"qpsk\", order=4\u003e\n    #    0 :   0.70710677 + j*  0.70710677\n    #    1 :  -0.70710677 + j*  0.70710677\n    #    2 :   0.70710677 + j* -0.70710677\n    #    3 :  -0.70710677 + j* -0.70710677\n    # num sym errors:    0 /    4\n    # num bit errors:    0 /    8\n    # results written to modem_example.m.\n\nSometimes, however, it is useful to build one example individually.\nThis can be accomplished by directly targeting its binary\n(e.g. ``make examples/modem_example``). The example then can be run at the\ncommand line, viz. ``./examples/modem_example``.\n\nBenchmarking Tool\n-----------------\n\nPackaged with liquid are benchmarks to determine the speed each signal\nprocessing element can run on your machine. Initially the tool provides\nan estimate of the processor's clock frequency and will then estimate\nthe number of trials so that each benchmark will take between 50 and\n500 ms to run. You can build and run the benchmark program with the\nfollowing command:\n\n.. code-block:: bash\n\n    make bench\n\nLinking from C++\n----------------\n\nCompiling and linking to C++ programs is straightforward.\nJust include ``\u003ccomplex\u003e`` before ``\u003cliquid/liquid.h\u003e`` and use \n``std::complex\u003cfloat\u003e`` in favor of ``float complex``.\nHere is the same example as the one above but in C++ instead of C:\n\n.. code-block:: c++\n\n    // get in, process data, get out\n    #include \u003ccomplex\u003e\n    #include \u003cliquid/liquid.h\u003e\n    int main() {\n        unsigned int M  = 4;     // interpolation factor\n        unsigned int m  = 12;    // filter delay [symbols]\n        float        As = 60.0f; // filter stop-band attenuation [dB]\n\n        // create interpolator from prototype\n        firinterp_crcf interp = firinterp_crcf_create_kaiser(M,m,As);\n        std::complex\u003cfloat\u003e x = 1.0f;   // input sample\n        std::complex\u003cfloat\u003e y[M];       // interpolated output buffer\n\n        // repeat on input sample data as needed\n        {\n            firinterp_crcf_execute(interp, x, y);\n        }\n\n        // destroy interpolator object\n        firinterp_crcf_destroy(interp);\n        return 0;\n    }\n\nPlatformIO\n----------\n\nCross-compling for embedded platforms is most easily achieved with\n`platformio \u003chttps://platformio.org\u003e`_.\nJust add ``liquid-dsp`` to your ``platform.io`` list of dependencies:\n\n.. code-block:: ini\n\n    [env:native]\n    platform = native\n    lib_deps = https://github.com/jgaeddert/liquid-dsp.git\n\nTo test this, compile the example program for a\n`Raspberry Pi Pico microcontroller \u003chttps://www.raspberrypi.com/documentation/microcontrollers/pico-series.html\u003e`_:\n\n.. code-block:: bash\n\n    # create a virtual environment, install platformio, and compile an example\n    virtualenv pio\n    source pio/bin/activate\n    pip install platformio\n    pio ci --lib=\".\" --board=pico examples/platformio_example.c\n    # ...\n    # Generating UF2 image\n    # elf2uf2 \".pio/build/pico/firmware.elf\" \".pio/build/pico/firmware.uf2\"\n    # Checking size .pio/build/pico/firmware.elf\n    # Advanced Memory Usage is available via \"PlatformIO Home \u003e Project Inspect\"\n    # RAM:   [==        ]  15.5% (used 41820 bytes from 270336 bytes)\n    # Flash: [          ]   0.2% (used 5196 bytes from 2097152 bytes)\n    # Building .pio/build/pico/firmware.bin\n    # ===================== [SUCCESS] Took 23.63 seconds =====================\n\nBuild\n-----\n\nHere is a table of CMake options available for configuring liquid:\n\n+------------------------+---------+--------------------------------------------------------------------+\n| Option                 | Default | Description                                                        |\n+========================+=========+====================================================================+\n| ``BUILD_EXAMPLES``     | ON      | Compile example programs                                           |\n+------------------------+---------+--------------------------------------------------------------------+\n| ``BUILD_AUTOTESTS``    | ON      | Parse and compile autotests into executable binary                 |\n+------------------------+---------+--------------------------------------------------------------------+\n| ``BUILD_BENCHMARKS``   | ON      | Parse and compile benchmarks into executable binary                |\n+------------------------+---------+--------------------------------------------------------------------+\n| ``ENABLE_SIMD``        | ON      | Enable use of single instruction, multiple data (SIMD) extensions  |\n+------------------------+---------+--------------------------------------------------------------------+\n| ``BUILD_SANDBOX``      | OFF     | Compile sandbox (testing) programs                                 |\n+------------------------+---------+--------------------------------------------------------------------+\n| ``BUILD_DOC``          | OFF     | Generate documentation                                             |\n+------------------------+---------+--------------------------------------------------------------------+\n| ``COVERAGE``           | OFF     | Set flags to enable code coverage testing                          |\n+------------------------+---------+--------------------------------------------------------------------+\n\nFor example, if you want to benchmark how fast a vector dot product\nruns without SIMD extensions, you could run the following:\n\n.. code-block:: bash\n\n    cmake -DENABLE_SIMD=OFF -DBUILD_BENCHMARKS=ON ..\n    make\n    ./benchmark -s dotprod_rrrf\n\nAvailable Modules\n-----------------\n\n* **agc**: automatic gain control, received signal strength\n* **audio**: source audio encoders/decoders: cvsd, filterbanks\n* **buffer**: internal buffering, circular/static, ports (threaded)\n* **channel**: additive noise, multi-path fading, carrier phase/frequency\n  offsets, timing phase/rate offsets\n* **dotprod**: inner dot products (real, complex), vector sum of squares\n* **equalization**: adaptive equalizers: least mean-squares, recursive\n  least squares, semi-blind\n* **fec**: basic forward error correction codes including several\n  Hamming codes, single error correction/double error detection,\n  Golay block code, as well as several checksums and cyclic\n  redundancy checks, interleaving, soft decoding\n* **fft**: fast Fourier transforms (arbitrary length), discrete sin/cos\n  transforms\n* **filter**: finite/infinite impulse response, polyphase, hilbert,\n  interpolation, decimation, filter design, resampling, symbol\n  timing recovery\n* **framing**: flexible framing structures for amazingly easy packet\n  software radio; dynamically adjust modulation and coding on the\n  fly with single- and multi-carrier framing structures\n* **math**: transcendental functions not in the C standard library\n  (gamma, besseli, etc.), polynomial operations (curve-fitting,\n  root-finding, etc.)\n* **matrix**: basic math, LU/QR/Cholesky factorization, inversion,\n  Gauss elimination, Gram-Schmidt decomposition, linear solver,\n  sparse matrix representation\n* **modem**: modulate, demodulate, PSK, differential PSK, QAM, optimal\n  QAM, as well as analog and non-linear digital modulations GMSK)\n* **multichannel**: filterbank channelizers, OFDM\n* **nco**: numerically-controlled oscillator: mixing, frequency\n  synthesis, phase-locked loops\n* **optim**: (non-linear optimization) Newton-Raphson, evoluationary\n  algorithms, gradient descent, line search\n* **quantization**: analog/digital converters, compression/expansion\n* **random**: (random number generators) uniform, exponential, gamma,\n  Nakagami-m, Gauss, Rice-K, Weibull\n* **sequence**: linear feedback shift registers, complementary codes,\n  maximal-length sequences\n* **utility**: useful miscellany, mostly bit manipulation (shifting,\n  packing, and unpacking of arrays)\n* **vector**: generic vector operations\n\nLicense\n-------\n\nliquid projects are released under the X11/MIT license.\nBy default, this project will try to link to `FFTW`_ if it\nis available on your build platform.\nBecause FFTW starting with version 1.3 is\n`licensed \u003chttp://www.fftw.org/faq/section1.html\u003e`_\nunder the `GNU General Public License v2 \u003chttp://www.fftw.org/doc/License-and-Copyright.html\u003e`_\nthis unfortunately means that (and I'm clearly not a lawyer, here)\nyou cannot distribute ``liquid-dsp`` without also distributing the source code\nif you link to FFTW.\nThis is a similar situation with the classic\n`libfec \u003chttps://github.com/quiet/libfec\u003e`_\nwhich uses the\n`GNU Lesser GPL \u003chttps://www.gnu.org/licenses/licenses.html#LGPL\u003e`_.\nFinally, ``liquid-dsp`` makes extensive use of GNU\n`autoconf \u003chttps://www.gnu.org/software/autoconf/\u003e`_,\n`automake \u003chttps://www.gnu.org/software/automake/\u003e`_,\nand related tools.\nThese are fantastic libraires with amazing functionality and their authors\nshould be lauded for their efforts.\nIn a similar vain, much the software I write for a living I give away for\nfree;\nhowever I believe in more permissive licenses to allow individuals the\nflexibility to use software with fewer limitations.\nIf these restrictions are not acceptible, ``liquid-dsp`` can be compiled and run\nwithout use of these external libraries, albeit a bit slower and with limited\nfunctionality.\n\nShort version: this code is copyrighted to me (Joseph D. Gaeddert),\nI give you full permission to do whatever you want with it except remove my\nname from the credits.\nSeriously, go nuts! but take caution when linking to other libraries with\ndifferent licenses.\nSee the `license \u003chttps://opensource.org/licenses/MIT\u003e`_ for specific terms.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaeddert%2Fliquid-dsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgaeddert%2Fliquid-dsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaeddert%2Fliquid-dsp/lists"}