Go to file
Vanya A. Sergeev 60e259c36d blocks/sources/wavfile: return dummy rate for flowgraph input rate validation
in CompositeBlock:_validate_rates().

resolves #71.
2023-07-13 01:52:07 -05:00
.github/workflows ci: add github actions workflow 2023-07-12 02:15:28 -05:00
benchmarks benchmarks/luaradio: fix connectivity in pll benchmark 2020-10-22 01:38:55 -05:00
docs docs: regenerate reference manual for v0.11.0 2022-11-11 00:50:52 -06:00
embed embed: refactor install targets in Makefile 2023-03-11 19:42:18 -06:00
examples examples/readme: update usage and description of AM and SSB examples 2016-07-28 23:37:40 -07:00
radio blocks/sources/wavfile: return dummy rate for flowgraph input rate validation 2023-07-13 01:52:07 -05:00
tests core/composite: add successful exit return value to wait() and stop() 2022-11-11 00:50:51 -06:00
website website: update version to v0.11.0 2022-11-11 00:50:52 -06:00
.busted busted: add .busted config 2019-12-13 01:19:01 -06:00
.gitignore embed: add Makefile to build libluaradio 2016-02-29 20:35:00 -08:00
CHANGELOG.md changelog: update for v0.11.0 2022-11-11 00:50:52 -06:00
CONTRIBUTING.md contributing: update travis-ci link 2022-11-11 00:50:51 -06:00
LICENSE license: update copyright years 2021-01-04 00:22:12 -06:00
README.md readme: update tests status badge 2023-07-12 02:15:28 -05:00
luaradio luaradio: add application support to runner 2021-04-04 23:34:35 -05:00


LuaRadio Tests Status GitHub release License Reference Manual Mailing List

LuaRadio is a lightweight, embeddable flow graph signal processing framework for software-defined radio. It provides a suite of source, sink, and processing blocks, with a simple API for defining flow graphs, running flow graphs, creating blocks, and creating data types. LuaRadio is built on LuaJIT, has a small binary footprint of under 750 KB (including LuaJIT), has no external hard dependencies, and is MIT licensed.

LuaRadio can be used to rapidly prototype software radios, modulation/demodulation utilities, and signal processing experiments. It can also be embedded into existing radio applications to serve as a user scriptable engine for signal processing.

LuaRadio blocks are written in pure Lua, but can use LuaJIT's FFI to wrap external libraries, like VOLK, liquid-dsp, and others, for computational acceleration, sophisticated processing, and interfacing with SDR hardware.

Use GNU Radio? See how LuaRadio compares to GNU Radio.

See the LuaRadio mailing list for general discussion.


Wideband FM Broadcast Radio Receiver

local radio = require('radio')

    radio.RtlSdrSource(88.5e6 - 250e3, 1102500), -- RTL-SDR source, offset-tuned to 88.5MHz-250kHz
    radio.TunerBlock(-250e3, 200e3, 5),          -- Translate -250 kHz, filter 200 kHz, decimate by 5
    radio.FrequencyDiscriminatorBlock(1.25),     -- Frequency demodulate with 1.25 modulation index
    radio.LowpassFilterBlock(128, 15e3),         -- Low-pass filter 15 kHz for L+R audio
    radio.FMDeemphasisFilterBlock(75e-6),        -- FM de-emphasis filter with 75 uS time constant
    radio.DownsamplerBlock(5),                   -- Downsample by 5
    radio.PulseAudioSink(1)                      -- Play to system audio with PulseAudio

Check out some more examples of what you can build with LuaRadio.

Built-in Applications

LuaRadio comes with a collection of built-in command-line applications. These applications include radio receivers that are compatible with all SDR sources supported by the framework, as well as file and network sources:

$ luaradio
Usage: luaradio [options] <script> [args]

  -h, --help            Print help and exit
  --version             Print version and exit
  --platform            Dump platform and exit
  -v, --verbose         Enable debug verbosity
  -a, --application     Run built-in application

Application Usage: ./luaradio -a <application> [args]

Built-in Applications:
  rx_raw                Raw Receiver
  rx_wbfm               Wideband FM Receiver
  rx_nbfm               Narrowband FM Receiver
  rx_am                 AM Receiver
  rx_ssb                SSB Receiver
  rx_rds                RDS Receiver
  rx_ax25               AX.25 Receiver
  rx_pocsag             POCSAG Receiver
  rx_ert                ERT Receiver (IDM, SCM, SCM+)
  iq_converter          IQ File Converter

See the Applications documentation for more information on running built-in applications.


With LuaJIT installed, LuaRadio can be run directly from the repository:

git clone https://github.com/vsergeev/luaradio.git
$ cd luaradio
$ ./luaradio --platform
luajit          LuaJIT 2.0.5
os              Linux
arch            x64
page size       4096
cpu count       4
cpu model       Intel(R) Core(TM) i5-4570T CPU @ 2.90GHz
    fftw3f      true    fftw-3.3.8-sse2-avx
    volk        true    2.0 (avx2_64_mmx_orc)
    liquid      true    1.3.2

LuaRadio is accelerated by the optional libraries liquid-dsp, VOLK, and fftw. For best real-time performance, install these libraries and check that the features are marked true in the platform information:

  • Arch Linux: sudo pacman -S liquid-dsp libvolk fftw
  • macOS (Homebrew): brew install liquid-dsp fftw
  • macOS (MacPorts): sudo port install liquid-dsp volk fftw-3
  • Ubuntu/Debian/Raspbian: sudo apt-get install libliquid-dev libvolk2-dev libfftw3-dev
  • Fedora/CentOS: sudo yum install liquid-dsp fftw

Try out one of the examples with an RTL-SDR dongle:

$ ./luaradio examples/rtlsdr_wbfm_mono.lua 91.1e6

LuaRadio primarily supports Linux. It also strives to support FreeBSD and macOS, but real-time and audio support on these platforms is currently experimental. LuaRadio and all of its examples run great on the Raspberry Pi 3 with Arch Linux or Raspbian.

See the Getting Started guide for a tutorial on building your own flow graphs.


Arch Linux users can install LuaRadio with the AUR package luaradio.

macOS users can install LuaRadio with the Homebrew or MacPorts package luaradio.

See the Installation guide for other installation methods and details.

Project Roadmap

Check out the project roadmap for upcoming changes.

Contributions are welcome! See the contributing document for guidelines.


LuaRadio documentation is contained in the docs folder.

  1. Reference Manual
  2. Installation
  3. Getting Started
  4. Creating Blocks
  5. Embedding LuaRadio
  6. Architecture
  7. Comparison to GNU Radio
  8. Supported Hardware

Project Structure


LuaRadio unit tests are run with busted.

Install busted with LuaRocks:

sudo luarocks --lua-version=5.1 install busted

Run unit tests with:



LuaRadio is MIT licensed. See the included LICENSE file.