## As though using sh on debian

sudo apt install -y libsndfile1-dev libfftw3-dev gnuplot ecl ffmpeg

mkdir ~/ecl
cd ~/ecl
mkdir cold
mkdir warm
mkdir tepid

lynx -dump gopher://gopher.club/0/users/screwtape/matched-filter-lisp/cold/cold.ecl > cold/cold.ecl
lynx -dump gopher://gopher.club/0/users/screwtape/matched-filter-lisp/cold/build.ecl > cold/build.ecl

lynx -dump gopher://gopher.club/0/users/screwtape/matched-filter-lisp/warm/warm.ecl > warm/warm.ecl
lynx -dump gopher://gopher.club/0/users/screwtape/matched-filter-lisp/warm/build.ecl > warm/build.ecl

lynx -dump gopher://gopher.club/0/users/screwtape/matched-filter-lisp/tepid/tepid.ecl > tepid/tepid.ecl
lynx -dump gopher://gopher.club/0/users/screwtape/matched-filter-lisp/tepid/build.ecl > tepid/build.ecl

## NOW when I dumped warm/warm.ecl somehow a newline split a variable name, 
## confusingly leading to an error. I shortened the line it happened to me on.
## You might need to resort to another means of downloading it.

cd ~/ecl/warm/
ecl --load build.ecl
cp warm.o ~/ecl/tepid/
cd ~/ecl/cold/
ecl --load build.ecl
cp cold.o ~/ecl/tepid/

cd ~/ecl/tepid
ecl --load build.ecl

mkdir test
mkdir records

ffmpeg -i random-song.mp3 -c:a pcm_f64le -ar 44100 test/random-song.wav

./tepid -i test/random-song.wav -o test/500.wav -f 500 > records/500.txt

mpv test/500.wav & gnuplot -p -e "plot 'records/500.txt' with lines;"