Skip to content

Commit

Permalink
samedec: doc: add rtl_fm example
Browse files Browse the repository at this point in the history
Also include more detailed instructions for use with gqrx.
  • Loading branch information
cbs228 committed Jun 1, 2024
1 parent 8e2201c commit b183a04
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions crates/samedec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,43 @@ pw-record --channels 1 --format s16 --rate 22050 -- - \

### Via a Software-Defined Radio

> For easy use with rtl-sdr dongles, first identify a weather station that you
> can receive and hear clearly.
>
> ```bash
> rtl_fm -f 162.4M -M fm -s 48k -o 4 -E dc -g 0 -F 9 | \
> play -t raw -r 48k -e signed -b 16 -c 1 -
> ```
>
> Adjust the `-g GAIN` value, `-F FIR_SIZE`, and `-E` options until you have
> clean audio that is largely free of noise and glitches. The gain is
> particularly important.
>
> Then you can pipe the audio into samedec:
>
> ```bash
> rtl_fm -f 162.4M -M fm -s 48k -o 4 -E dc -g 0 -F 9 | \
> samedec -r 48000
> ```
Use any compatible SDR software to demodulate and recover passband audio from a
station of interest. You will need a way to pipe passband audio into `samedec`.
* Some programs, like `rtl_fm`, support piping output directly.
* Some programs, like `gqrx`, can output audio via UDP. You can obtain UDP input
with either
* [gqrx](https://www.gqrx.dk/) can output demodulated audio via UDP. Tune to the
station you want, then click the `UDP` button in the Audio pane. You can
receive the UDP audio with either
[`netcat`](https://manpages.debian.org/testing/netcat-traditional/nc.1.en.html)
or [`socat`](https://manpages.debian.org/testing/socat/socat.1.en.html).
or [`socat`](https://manpages.debian.org/testing/socat/socat.1.en.html)
and pipe it into samedec.
```bash
nc -l -u 7355 | samedec -r 48000
```
You can then `Mute` the audio in gqrx.
* For some programs, you may need to create a virtual audio device and direct
the audio output to that. PulseAudio can do this "out of the box" with
[`module-null-sink`](https://freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-null-sink).
Expand Down

0 comments on commit b183a04

Please sign in to comment.