From f98999fe76f3ac54ca4249dcc1e04cb2a5ec0f2a Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Mon, 30 Dec 2024 13:10:00 +0100 Subject: [PATCH] add readme --- README.md | 6 ++++++ stereo_coder.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..270de73 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# STCode +STCode is a simple stereo encoder for FM, it uses pasimple and math to: + - Calculate mono signal from s16le ((L+R)/2) + - Generate the stereo pilot in phase to the stereo subcarrier + - Generate the stereo diffrence signal using DSB-SC +All that in about 3.5% cpu usage on a RPI-5! \ No newline at end of file diff --git a/stereo_coder.c b/stereo_coder.c index b30b228..acbd95e 100644 --- a/stereo_coder.c +++ b/stereo_coder.c @@ -8,7 +8,7 @@ #define INPUT_DEVICE "real_real_tx_audio_input.monitor" #define OUTPUT_DEVICE "alsa_output.platform-soc_sound.stereo-fallback" #define BUFFER_SIZE 512 -#define CLIPPER_THRESHOLD 0.7 +#define CLIPPER_THRESHOLD 0.5 // Adjust this as needed #define MONO_VOLUME 0.5f // L+R Signal #define PILOT_VOLUME 0.025f // 19 KHz Pilot