1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

noise generators

This commit is contained in:
2024-09-19 09:54:12 +02:00
parent c246310cab
commit 09c631b4e5
2 changed files with 9 additions and 2 deletions

View File

@@ -2019,6 +2019,10 @@ in
stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3"; stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3";
station = "Hitradio FFH"; station = "Hitradio FFH";
} }
{ # Lex Fridman's favourite
stream = "av://lavfi:anoisesrc=color=brown";
station = "Brownian noise";
}
] ]
++ map (name: { ++ map (name: {
stream = "https://${name}.stream.publicradio.org/${name}.aac"; stream = "https://${name}.stream.publicradio.org/${name}.aac";

View File

@@ -1,7 +1,7 @@
{ sox, mpv, writers, coreutils }: { sox, mpv, writers, coreutils }:
# ref https://askubuntu.com/a/789472 # ref https://askubuntu.com/a/789472
writers.writeDashBin "noise-waves" '' writers.writeDashBin "noise-waves" ''
file="/tmp/noise.wav" file="/tmp/noise-$(${coreutils}/bin/date +%s | ${coreutils}/bin/md5sum | ${coreutils}/bin/cut -d' ' -f1).wav"
trap clean EXIT trap clean EXIT
clean() { clean() {
rm "$file" rm "$file"
@@ -9,6 +9,9 @@ writers.writeDashBin "noise-waves" ''
${coreutils}/bin/mkfifo "$file" ${coreutils}/bin/mkfifo "$file"
${sox}/bin/sox -n "$file" synth brownnoise synth pinknoise mix synth sine amod 0.3 10 & ${sox}/bin/sox -c2 -r44.1k -b8 -n "$file" synth brownnoise synth pinknoise mix synth sine amod 0.3 10 &
${mpv}/bin/mpv "$file" ${mpv}/bin/mpv "$file"
'' ''
# play -c2 -r44.1k -b8 -n synth -1 brownnoise .1 40
# play -c2 -r44.1k -b8 -n synth -1 pinknoise .1 60