-
Notifications
You must be signed in to change notification settings - Fork 1
/
gen-to-pipe
executable file
·26 lines (21 loc) · 1.28 KB
/
gen-to-pipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Generates band of some radio stations taken from audio streams
# Samplerate is 48000
# Replace <STREAM_URL> with any audio stream URL
for i in {1..6}; do mkfifo ./data/P$i; done
mkfifo ./data/iq_output_pipe
ffmpeg -y -v quiet -i "<STREAM_URL>" -f f32le -ac 1 -ar 48000 -filter:a "lowpass=f=3500,adelay=3000|3000" ./data/P1 &
ffmpeg -y -v quiet -i "<STREAM_URL>" -f f32le -ac 1 -ar 48000 -filter:a "lowpass=f=3500,adelay=10000|10000" ./data/P2 &
ffmpeg -y -v quiet -i "<STREAM_URL>" -f f32le -ac 1 -ar 48000 -filter:a "lowpass=f=3500,adelay=5000|5000" ./data/P3 &
ffmpeg -y -v quiet -i "<STREAM_URL>" -f f32le -ac 1 -ar 48000 -filter:a "lowpass=f=3500,adelay=4000|4000" ./data/P4 &
ffmpeg -y -v quiet -i "<STREAM_URL>" -f f32le -ac 1 -ar 48000 -filter:a "lowpass=f=3500,adelay=12000|12000" ./data/P5 &
ffmpeg -y -v quiet -i "<STREAM_URL>" -f f32le -ac 1 -ar 48000 -filter:a "lowpass=f=3500,adelay=8000|8000" ./data/P6 &
sleep 1
./bin/gen noise 1.5e-4 0 48000 \
| ./bin/tx ./data/P1 -15e3 2e-3 am 48000 1.0 \
| ./bin/tx ./data/P2 -5e3 1e-4 am 48000 1.0 \
| ./bin/tx ./data/P3 0e3 7e-4 am 48000 1.0 \
| ./bin/tx ./data/P4 10e3 5e-5 am 48000 1.0 \
| ./bin/tx ./data/P5 10e3 2e-4 am 48000 1.0 \
| ./bin/tx ./data/P6 15e3 2.5e-5 am 48000 1.0 \
> ./data/iq_output_pipe